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 YieldCurve
    Modifier and Type
    Method
    Description
    CreditCurve.bootstrap(int[] tenorYears, double[] parSpreads, double recovery, YieldCurve discount)
    Bootstraps from CDS par spreads.
    static double
    CvaApproximator.cva(double[] expectedExposure, double[] bucketEndYears, CreditCurve counterparty, YieldCurve discount, double lgd)
    Discrete unilateral CVA over the given exposure profile.
    static double
    CvaApproximator.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 a YieldCurve.
    static double
    CdsPricer.parSpread(CreditCurve credit, YieldCurve discount, double maturityYears)
    The zero-upfront (par) spread for this maturity.
    static double
    CdsPricer.premiumLegPv(CreditCurve credit, YieldCurve discount, double spread, double maturityYears)
    PV of the premium leg at the given running spread.
    static double
    CreditSpreads.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 double
    CdsPricer.protectionLegPv(CreditCurve credit, YieldCurve discount, double maturityYears)
    PV of the protection leg: (1-R) paid at default.
    static double
    CdsPricer.riskyAnnuity(CreditCurve credit, YieldCurve discount, double maturityYears)
    PV of 1bp-per-year premium stream per unit spread (the risky annuity / risky DV01 base).
    static double
    CdsPricer.upfront(CreditCurve credit, YieldCurve discount, double contractSpread, double maturityYears)
    Upfront points (per unit notional) the protection buyer pays on a contract with fixed running coupon contractSpread.
    static double
    CreditSpreads.zSpread(double dirtyPrice, double face, double couponRate, int frequency, double yearsToMaturity, YieldCurve curve)
    The Z-spread (continuously compounded, decimal) of a fixed-coupon bond over curve.
  • Uses of YieldCurve in com.quantfinlib.fx

    Methods in com.quantfinlib.fx with parameters of type YieldCurve
    Modifier and Type
    Method
    Description
    double
    FxSwap.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).
    double
    Ndf.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 YieldCurve
    Modifier and Type
    Method
    Description
    static YieldCurve
    YieldCurve.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 YieldCurve
    YieldCurve.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 YieldCurve
    Modifier and Type
    Method
    Description
    static double
    RatesOptions.annuity(YieldCurve curve, double startYears, double tenorYears, int paymentsPerYear)
    PV of 1 per year paid paymentsPerYear times a year (accrual τ = 1/f) over (start, start + tenor].
    static double
    RatesOptions.annuity(YieldCurve curve, int startYears, int tenorYears)
    PV of 1 per year paid annually over (startYears, startYears+tenorYears].
    static double
    RatesOptions.cap(YieldCurve curve, int maturityYears, double strike, double vol)
    Cap: strip of annual Black-76 caplets to maturityYears.
    static double
    RatesOptions.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 double
    RatesOptions.floor(YieldCurve curve, int maturityYears, double strike, double vol)
    Floor: the matching strip of floorlets.
    static double
    RatesOptions.forwardSwapRate(YieldCurve curve, double startYears, double tenorYears, int paymentsPerYear)
    Forward par swap rate with fixed-leg frequency paymentsPerYear.
    static double
    RatesOptions.forwardSwapRate(YieldCurve curve, int startYears, int tenorYears)
    Forward par swap rate for a swap starting at startYears.
    static double
    ShortRateModels.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 double
    ShortRateModels.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 double
    KeyRateDurations.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 double
    BondPricer.priceFromCurve(double face, double couponRate, int frequency, double yearsToMaturity, YieldCurve curve)
    Price by discounting each cash flow on a zero curve.
    static double
    RatesOptions.swaption(YieldCurve curve, double startYears, double tenorYears, int paymentsPerYear, double strike, double vol, boolean payer, RatesOptions.VolModel model)
    Swaption price per unit notional under any RatesOptions.VolModel: annuity × model value on the forward swap rate, expiry = start.
    static double
    RatesOptions.swaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer)
    Black-76 swaption price per unit notional.
    static double
    RatesOptions.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.