Skip to main content

Module short_rate

Module short_rate 

Expand description

The one-factor Hull-White short-rate engine.

dr = (theta(t) − a·r) dt + sigma dW. The term structure enters through theta, which is why nothing here re-derives it: the engine reads today’s discount curve live and the drift is implied by it.

Structs§

HullWhite
A validated one-factor Hull-White model, passive.
SolvedParameter
A parameter recovered by a passive solve, with the derivative its calibration condition implies.

Functions§

coupon_bond_option
The price of a European option on a coupon bond, by Jamshidian’s decomposition, in mode R, with the strike paid on the expiry itself.
coupon_bond_option_from 🔒
A European option, exercised at expiry, to exchange strike paid on start for the coupon bond Σ c_i paid on pay_dates — Jamshidian’s decomposition in mode R, with the strike leg forward-starting as a swaption’s is: the swap delivered at expiry starts a spot lag later.
discount_bond_affine
The affine factors of the model’s discount bond seen from t: P(t, T; r) = A(t, T) · e^{−B(t, T)·r}, with B = (1 − e^{−a(T−t)}) / a and A = P(0,T)/P(0,t) · exp(B·f(0,t) − σ²(1 − e^{−2at}) B² / 4a).
forward_bond_option_at 🔒
An option at t on the forward bond P(·, u)/P(·, s), struck at strike and paid in units of the bond maturing at s: the zero-bond formula with P(0, s) for P(0, t) and volatility σ_p(t, u) − σ_p(t, s). At s = t it is zero_bond_option_at, term for term.
hull_white_compounded_convexity_exponent
The exponent Λ of the Hull–White futures convexity for an overnight rate compounded in arrears from start to end (years from today, start the first instant not yet fixed): under the model E[exp ∫ₛᴱ r] = P(0, s)/P(0, E) · e^Λ (Mercurio 2018), with
hull_white_convexity_bias
The Hull–White convexity bias of a futures quote: the futures rate less the forward rate for a contract whose term rate fixes at t and runs to maturity (years from today), at futures_price (100 − 100 · rate) — the Hull-White convexity bias, the rates simple over T − t: 1 + τF_fut = (1 + τF_fwd)·e^Λ, Λ by hull_white_convexity_exponent.
hull_white_convexity_exponent
The exponent Λ of the Hull–White futures convexity for a term rate fixing at t and running to maturity (years from today): under the model E[1/P(t, T)] = P(0, t)/P(0, T) · e^Λ, with
in_period_variance 🔒
∫₀^τ B(θ)² dθ, B(θ) = (1 − e^{−aθ})/a: the variance per unit σ² an in-arrears period accrues while it fixes.
instantaneous_forward
The instantaneous forward f(0, date) off curve, in the mode: a forward difference of −ln P(0, ·) over the one day from date — the same stencil the lattice fit uses for its terminal displacement, so the two agree on the number.
payer_swaption
A European payer swaption under Hull-White: the par-struck put on the coupon bond paying fixed_rate·τ_i on pay_dates plus redemption, per unit notional. accruals are the fixed-period year fractions.
phi1 🔒
φ(a, x) = (1 − e^{−a·x}) / a, the duration factor over a span x, summed as its series x·Σ (−ax)^k/(k+1)! where |a·x| < 0.5 so it tends to x as a → 0 without cancellation. In the mode.
reattach
Reattaches a passively-solved parameter to the pricing mode.
receiver_swaption
A European receiver swaption under Hull-White: the par-struck call on the same coupon bond as payer_swaption.
sigma_from_price
The Hull-White sigma implying target_price for a zero-bond option.
swap_coupons 🔒
The fixed leg’s flows per unit notional with the redemption on the last.
swaption_from 🔒
A European swaption under Hull-White whose swap starts on start, on or after expiry: coupon_bond_option_from on the fixed leg’s flows, struck at par on the start — a payer is the put, a receiver the call. payer_swaption and receiver_swaption are this with the swap starting on the expiry.
zero_bond_option
The price of a European option on a zero-coupon bond, in mode R.
zero_bond_option_at 🔒
zero_bond_option over curve values already read — the half that depends on the model parameters, so a solver over σ reads the curve once and evaluates only this per iterate.