Heath-Jarrow-Morton¶
Overview¶
Heath-Jarrow-Morton (1992) is not a single model but the framework containing every arbitrage-free term structure model driven by Brownian motions: it takes the entire instantaneous forward curve as the state variable and shows that, under the risk-neutral measure, the drift of every forward rate is completely determined by the volatility structure. This implementation covers the Gaussian (deterministic-volatility) subclass with any number of factors: the user supplies factor volatility functions and the library computes the no-arbitrage drift by quadrature and prices by Monte Carlo. Constant volatility recovers Ho-Lee and exponentially damped volatility recovers Hull-White, which is how the implementation is validated in the test suite.
Dynamics¶
The instantaneous forward curve \(f(t, T)\) evolves as
with independent Brownian drivers. Absence of arbitrage forces the HJM drift condition:
The short rate is the left end of the curve, \(r(t) = f(t, t)\), and bond prices are
Because the initial condition is the market forward curve, the model fits the observed curve exactly by construction.
Special cases¶
\(\sigma(t, T) = \sigma\) (constant): Ho-Lee dynamics.
\(\sigma(t, T) = \sigma\, e^{-\lambda (T - t)}\): Hull-White dynamics with mean reversion \(\lambda\).
Both are available as the HJM.constant_vol and HJM.exponential_vol constructors, and general (multi-factor) structures are given as a list of callables vol(t, T_array).
Discretization¶
Simulation uses a uniform grid \(0 = t_0 < \dots < t_N = T_{\max}\) that doubles as the maturity grid. Each Euler step advances every live forward:
with the drift integral evaluated by cumulative trapezoidal quadrature along the maturity axis each step. The realized short-rate path is the grid diagonal \(r(t_k) = f(t_k, t_k)\); bond prices at expiry integrate the simulated curve by the trapezoidal rule. The martingale identity \(\mathbb E\left[e^{-\int_0^T r\, dt}\right] = P^M(0, T)\) is enforced in the tests as a direct check of the drift condition.
Parameters¶
Parameter |
Meaning |
Constraint |
|---|---|---|
|
market discount curve (initial forwards) |
— |
|
factor volatility spec: float, callable, or list of callables |
positive |
|
longest maturity on the grid and simulation horizon |
\(T_{\max} > 0\) |
|
number of time steps |
\(\geq 2\) |
Usage¶
import numpy as np
from interest_rate_models import HJM
# One factor, Hull-White-like
hjm = HJM.exponential_vol(curve, sigma=0.01, lam=0.1, T_max=5.0, n_steps=100)
# Two custom factors
def level(t, T):
return 0.008 * np.exp(-0.5 * (T - t))
def slope(t, T):
return 0.004 * np.ones_like(T)
hjm2 = HJM(curve, [level, slope], T_max=5.0, n_steps=100)
hjm.mc_bond_price(3.0, n_paths=50_000, seed=1) # == curve.discount(3.0) up to MC error
hjm.mc_bond_option(1.0, 3.0, strike=0.93, kind="call")
times, short_rates = hjm.simulate(n_paths=10_000, seed=1)
References¶
Heath, D., Jarrow, R., Morton, A. (1992). “Bond pricing and the term structure of interest rates: A new methodology for contingent claims valuation”, Econometrica, 60(1), 77-105.
Brigo, D., Mercurio, F. (2006). Interest Rate Models — Theory and Practice, 2nd ed., Springer, ch. 5.