Uses of Class
com.quantfinlib.rates.YieldCurve
Packages that use YieldCurve
Package
Description
Credit: the price of default.
FX-specific market machinery — spot conventions through NDFs:
CurrencyPair (pip/precision tables, T+1/T+2
spot lags, dual-calendar tenor dates with modified-following and end-end),
SwapPointsCurve (quoted forward points →
outrights, broken dates linear in days, covered-interest-parity carry),
FxSwap (near/far legs, points MTM, roll cost),
Ndf (fixing vs settlement lags per restricted
currency, USD-settled difference amounts),
FxVolSurface (delta-quoted smiles — ATM DNS,
RR/BF wings, premium-adjusted delta↔strike solving),
FixingRisk (WM/R-window TWAP/VWAP tracking
error and participation), and the hot-path pieces:
AggregatedBook (zero-alloc multi-venue BBO
with venue attribution), CrossRateEngine
(streaming synthetic crosses chained on the bus consumer thread),
FxTierBook (per-LP size-tier ladders:
sweep cost and full-amount quotes), LpScorecard
(streaming last-look analytics: reject rate, hold, post-reject markout),
LpRouter (expected-all-in routing that prices
rejects into the decision) and SyntheticCross
(direct-vs-legs execution arithmetic with spread composition).Fixed income with real market conventions:
YieldCurve (zero curve, discount factors,
implied forwards, bootstrap from annual par swaps),
BondPricer (price/yield, duration, convexity,
DV01 — both whole-period and date-based with accrued interest),
DayCount (ACT/360, ACT/365, 30/360,
ACT/ACT ISDA), BusinessCalendar
(holidays, roll conventions, T+n settlement, coupon schedules),
ShortRateModels (Vasicek, CIR and
curve-fitted Hull-White: closed-form zero-coupon bonds plus the
simulation steps a rates-factor Monte Carlo needs) and
KeyRateDurations (WHERE on the curve a
bond's DV01 lives — per-node bumps whose slices sum back to the
parallel move, tested).-
Uses of YieldCurve in com.quantfinlib.credit
Methods in com.quantfinlib.credit with parameters of type YieldCurveModifier and TypeMethodDescriptionstatic CreditCurveCreditCurve.bootstrap(int[] tenorYears, double[] parSpreads, double recovery, YieldCurve discount) Bootstraps from CDS par spreads.static doubleCvaApproximator.cva(double[] expectedExposure, double[] bucketEndYears, CreditCurve counterparty, YieldCurve discount, double lgd) Discrete unilateral CVA over the given exposure profile.static doubleCdsPricer.parSpread(CreditCurve credit, YieldCurve discount, double maturityYears) The zero-upfront (par) spread for this maturity.static doubleCdsPricer.premiumLegPv(CreditCurve credit, YieldCurve discount, double spread, double maturityYears) PV of the premium leg at the given running spread.static doubleCreditSpreads.priceWithZSpread(double face, double couponRate, int frequency, double yearsToMaturity, YieldCurve curve, double z) Bond PV under the curve shifted by a constant z (cc).static doubleCdsPricer.protectionLegPv(CreditCurve credit, YieldCurve discount, double maturityYears) PV of the protection leg: (1-R) paid at default.static doubleCdsPricer.riskyAnnuity(CreditCurve credit, YieldCurve discount, double maturityYears) PV of 1bp-per-year premium stream per unit spread (the risky annuity / risky DV01 base).static doubleCdsPricer.upfront(CreditCurve credit, YieldCurve discount, double contractSpread, double maturityYears) Upfront points (per unit notional) the protection BUYER pays on a contract with fixed running couponcontractSpread.static doubleCreditSpreads.zSpread(double dirtyPrice, double face, double couponRate, int frequency, double yearsToMaturity, YieldCurve curve) The Z-spread (continuously compounded, decimal) of a fixed-coupon bond overcurve. -
Uses of YieldCurve in com.quantfinlib.fx
Methods in com.quantfinlib.fx with parameters of type YieldCurveModifier and TypeMethodDescriptiondoubleFxSwap.markToMarket(SwapPointsCurve current, YieldCurve quoteDiscount) Discounted mark-to-market: live-leg P&Ls discounted off a quote-currency zero curve (ACT/365 from the valuation curve's spot date).doubleNdf.markToMarket(SwapPointsCurve current, YieldCurve baseDiscount) Discounted mark-to-market: the expected settlement discounted from the settlement date on a base-currency (USD) zero curve, ACT/365 from the curve's spot. -
Uses of YieldCurve in com.quantfinlib.rates
Methods in com.quantfinlib.rates that return YieldCurveModifier and TypeMethodDescriptionstatic YieldCurveYieldCurve.bootstrapAnnualParSwaps(int[] tenorYears, double[] parRates) Classic bootstrap from par swap rates with an annual fixed leg at integer-year pillars (missing years are filled by linear interpolation of the par rates):DF_n = (1 - parRate_n * A_{n-1}) / (1 + parRate_n).static YieldCurveYieldCurve.ofZeroRates(double[] tenorYears, double[] zeroRatesCc) Curve from parallel arrays of tenors (years) and continuous zero rates.Methods in com.quantfinlib.rates with parameters of type YieldCurveModifier and TypeMethodDescriptionstatic doubleRatesOptions.annuity(YieldCurve curve, int startYears, int tenorYears) PV of 1 per year paid annually over (startYears, startYears+tenorYears].static doubleSwapPricer.annuity(YieldCurve curve, int tenorYears) PV of the annual fixed-leg annuity, per unit notional.static doubleRatesOptions.cap(YieldCurve curve, int maturityYears, double strike, double vol) Cap: strip of annual Black-76 caplets tomaturityYears.static doubleSwapPricer.dv01(YieldCurve curve, int tenorYears, double fixedRate) DV01 per unit notional: the payer swap's PV change for a +1bp parallel shift of the zero curve (positive — rates up helps the fixed payer).static doubleRatesOptions.floor(YieldCurve curve, int maturityYears, double strike, double vol) Floor: the matching strip of floorlets.static doubleRatesOptions.forwardSwapRate(YieldCurve curve, int startYears, int tenorYears) Forward par swap rate for a swap starting atstartYears.static doubleShortRateModels.hullWhiteBond(YieldCurve curve, double tYears, double maturityYears, double shortRate, double a, double sigma) Hull-White zero-coupon bond price P(t, t+T) given the market curve and the short rate now.static doubleShortRateModels.instantaneousForward(YieldCurve curve, double tYears) The instantaneous forward rate f(0, t) off the curve, by symmetric finite difference of ln P (the curve carries no analytic derivative).static double[]KeyRateDurations.keyRateDv01s(double face, double couponRate, int frequency, double maturityYears, YieldCurve curve) Per-node price sensitivities of a fixed-coupon bond to a 1bp bump of each curve tenor, in price units per 100 face (positive = the bond LOSES that much when the node rises 1bp — DV01 sign convention).static doubleKeyRateDurations.parallelDv01(double face, double couponRate, int frequency, double maturityYears, YieldCurve curve) The parallel DV01 off the curve (every node bumped together) — the number the key-rate slices must add back up to, within the curve-interpolation tolerance the tests document.static doubleSwapPricer.parRate(YieldCurve curve, int tenorYears) The spot-starting par swap rate fortenorYears.static doubleSwapPricer.payerPv(YieldCurve curve, int tenorYears, double fixedRate) PV per unit notional of a PAYER swap (pay fixedfixedRate, receive float).static doubleBondPricer.priceFromCurve(double face, double couponRate, int frequency, double yearsToMaturity, YieldCurve curve) Price by discounting each cash flow on a zero curve.static doubleRatesOptions.swaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer) Black-76 swaption price per unit notional.