Class RatesOptions

java.lang.Object
com.quantfinlib.rates.RatesOptions

public final class RatesOptions extends Object
RATES VOLATILITY products priced off the curve — the bridge between YieldCurve (where forwards and discount factors live) and pricing.Black76 (the market-standard lognormal quoter for anything written on a forward rate).
  • Swaption — an option on a forward-starting swap. The underlying is the forward swap rate F = (DF(start) − DF(end)) / annuity, the natural numeraire is the ANNUITY (the PV of the fixed leg's 1%-per-year), and the price is simply annuity × Black76(F, K, vol, expiry) — discounting lives entirely in the annuity, which is why the Black-76 leg is called with rate 0. A PAYER swaption (right to pay fixed) is a CALL on the swap rate: it pays when rates rise.
  • Cap / floor — a strip of independent options (caplets), one per accrual period, each a Black-76 call (put) on that period's SIMPLE forward rate f_i = (DF(t_{i-1})/DF(t_i) − 1)/τ, fixing at the period START and paying at its end. The first period's rate is already fixed today, so its caplet is pure intrinsic — included, as the market convention includes it unless the trade says otherwise.

Two identities keep this honest (both pinned by tests): payer − receiver = annuity·(F − K) (swaption put-call parity), and cap − floor = the PV of the matching vanilla swap. Annual fixed legs and accrual periods (τ = 1), matching YieldCurve.bootstrapAnnualParSwaps(int[], double[]); one flat lognormal vol per product (no smile — pricing.SabrModel is where the smile lives). Research lane, deterministic.

  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    annuity(YieldCurve curve, int startYears, int tenorYears)
    PV of 1 per year paid annually over (startYears, startYears+tenorYears].
    static double
    cap(YieldCurve curve, int maturityYears, double strike, double vol)
    Cap: strip of annual Black-76 caplets to maturityYears.
    static double
    floor(YieldCurve curve, int maturityYears, double strike, double vol)
    Floor: the matching strip of floorlets.
    static double
    forwardSwapRate(YieldCurve curve, int startYears, int tenorYears)
    Forward par swap rate for a swap starting at startYears.
    static double
    swaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer)
    Black-76 swaption price per unit notional.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • annuity

      public static double annuity(YieldCurve curve, int startYears, int tenorYears)
      PV of 1 per year paid annually over (startYears, startYears+tenorYears].
    • forwardSwapRate

      public static double forwardSwapRate(YieldCurve curve, int startYears, int tenorYears)
      Forward par swap rate for a swap starting at startYears.
    • swaption

      public static double swaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer)
      Black-76 swaption price per unit notional.
      Parameters:
      vol - flat lognormal vol of the forward swap rate
      payer - true = payer swaption (call on the swap rate)
    • cap

      public static double cap(YieldCurve curve, int maturityYears, double strike, double vol)
      Cap: strip of annual Black-76 caplets to maturityYears.
    • floor

      public static double floor(YieldCurve curve, int maturityYears, double strike, double vol)
      Floor: the matching strip of floorlets.