Docs / nablatensor-quant / com.nablatensor.quant

final class

HullWhiteAnalytic

The Hull-White one-factor short-rate model made term-structure-consistent: given today's discount curve P^M(0, .) and the two parameters (a, sigma), it reprices that curve exactly and prices European bond options, caplets/floorlets and — by Jamshidian decomposition — European swaptions in closed form.

This is the analytic companion to the HullWhite1F Monte-Carlo step block (whose flat-forward assumption it removes) and the pricing engine HullWhiteCalibration fits (a, sigma) to a swaption grid with.

The bond reconstitution is @@PRE0@@ so today's curve is fitted with no separate theta(t) calibration; theta is exposed for a simulation that needs it. The a -> 0 limit is the Ho-Lee model and is handled without dividing by a.

Methods

static HullWhiteAnalytic of(YieldCurve discountCurve, double a, double sigma)
static HullWhiteAnalytic of(CurveSet curves, double a, double sigma)
double a()
double sigma()
double r0()

Today's initial short rate r(0) = f^M(0, 0).

double bFactor(double t, double bondMaturity)

B(t, T) = (1 - e^{-a(T-t)}) / a, with the a -> 0 limit T - t.

double instantaneousForward(double t)

Instantaneous forward f^M(0, t) = -d ln P^M / dt.

double theta(double t)

The Hull-White drift term theta(t) = d f^M/dt + a f^M(0,t) + (sigma^2 / (2a)) (1 - e^{-2 a t}) — needed only to simulate the short rate; the analytic prices in this class do not use it.

double bondReconstitution(double t, double bondMaturity, double shortRate)

Bond P(t, T) reconstituted from a realised short rate r(t).

double zeroBondCall(double optionExpiry, double bondMaturity, double strike)

European call on P(T, S) struck at K, T < S.

double zeroBondPut(double optionExpiry, double bondMaturity, double strike)

European put on P(T, S) struck at K, T < S.

double caplet(double resetTime, double accrual, double strikeRate)

A caplet on the simply-compounded rate for [resetTime, resetTime + accrual], strike rate strikeRate, unit notional — priced as (1 + K tau) puts on P(T, T+tau) struck at 1/(1 + K tau).

double floorlet(double resetTime, double accrual, double strikeRate)

A floorlet — (1 + K tau) calls on the same bond.

double cap(double firstReset, double accrual, int periods, double strikeRate)

A cap: the sum of its caplets on an equally spaced schedule.

double payerSwaption(double expiry, double accrual, int periods, double strikeRate)

Physically-settled European payer swaption: expiry expiry, then periods fixed payments of accrual accrual at expiry + i*accrual, strike strikeRate, unit notional.

Jamshidian: the payer swaption is a put on the fixed-coupon bond, which decomposes into a portfolio of puts on the individual zero-coupon bonds once the critical short rate r* (where the coupon bond is worth par) is found by a 1-D solve.

double receiverSwaption(double expiry, double accrual, int periods, double strikeRate)