Uses of Class
com.quantfinlib.rates.YieldCurve
Packages that use YieldCurve
Package
Description
Credit curves, CDS pricing and credit spreads.
FX market conventions and instruments, from spot dates to NDFs.
Fixed income: curves, bonds, swaps, day counts and calendars, with
market conventions.
-
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 doubleCvaApproximator.cvaBucketAverage(double eeAtZero, double[] expectedExposure, double[] bucketEndYears, CreditCurve counterparty, YieldCurve discount, double lgd) Discrete unilateral CVA with the discounted exposure averaged over each bucket (trapezoid rule), added in 3.1.MultiCurrencyExposureSimulator.Curve.of(YieldCurve c) Adapter for aYieldCurve.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, double startYears, double tenorYears, int paymentsPerYear) PV of 1 per year paidpaymentsPerYeartimes a year (accrual τ = 1/f) over (start, start + tenor].static doubleRatesOptions.annuity(YieldCurve curve, int startYears, int tenorYears) PV of 1 per year paid annually over (startYears, startYears+tenorYears].static doubleRatesOptions.cap(YieldCurve curve, int maturityYears, double strike, double vol) Cap: strip of annual Black-76 caplets tomaturityYears.static doubleRatesOptions.capFloor(YieldCurve curve, double maturityYears, int paymentsPerYear, double strike, double vol, boolean cap, RatesOptions.VolModel model) Cap (or floor,cap = false) with accrual τ = 1/f: caplet i fixes at (i−1)τ, pays τ·max(L_i − K, 0) at iτ, L_i the simple forward.static doubleRatesOptions.floor(YieldCurve curve, int maturityYears, double strike, double vol) Floor: the matching strip of floorlets.static doubleRatesOptions.forwardSwapRate(YieldCurve curve, double startYears, double tenorYears, int paymentsPerYear) Forward par swap rate with fixed-leg frequencypaymentsPerYear.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 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, double startYears, double tenorYears, int paymentsPerYear, double strike, double vol, boolean payer, RatesOptions.VolModel model) Swaption price per unit notional under anyRatesOptions.VolModel: annuity × model value on the forward swap rate, expiry = start.static doubleRatesOptions.swaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer) Black-76 swaption price per unit notional.static doubleRatesOptions.swaptionImpliedVol(YieldCurve curve, double startYears, double tenorYears, int paymentsPerYear, double strike, double price, boolean payer, RatesOptions.VolModel model) Implied vol (of the given model) of a swaption price per unit notional.