Class RatesOptions
java.lang.Object
com.quantfinlib.rates.RatesOptions
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 simplyannuity × 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 TypeMethodDescriptionstatic doubleannuity(YieldCurve curve, int startYears, int tenorYears) PV of 1 per year paid annually over (startYears, startYears+tenorYears].static doublecap(YieldCurve curve, int maturityYears, double strike, double vol) Cap: strip of annual Black-76 caplets tomaturityYears.static doublefloor(YieldCurve curve, int maturityYears, double strike, double vol) Floor: the matching strip of floorlets.static doubleforwardSwapRate(YieldCurve curve, int startYears, int tenorYears) Forward par swap rate for a swap starting atstartYears.static doubleswaption(YieldCurve curve, int startYears, int tenorYears, double strike, double vol, boolean payer) Black-76 swaption price per unit notional.
-
Method Details
-
annuity
PV of 1 per year paid annually over (startYears, startYears+tenorYears]. -
forwardSwapRate
Forward par swap rate for a swap starting atstartYears. -
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 ratepayer- true = payer swaption (call on the swap rate)
-
cap
Cap: strip of annual Black-76 caplets tomaturityYears. -
floor
Floor: the matching strip of floorlets.
-