HJM and market-model dynamics
Modelling the whole forward curve under a no-arbitrage drift restriction
01State HJM forward-rate dynamics and derive the no-arbitrage drift restriction.
02Explain how volatility choice determines drift under the risk-neutral measure.
03Relate HJM, Gaussian short-rate models and forward market models.
04Design curve simulations that preserve initial term structure and report discretisation diagnostics.
Identify the state variables and the behavior they add.
Heath–Jarrow–Morton models the entire instantaneous forward curve directly. Once forward-rate volatility is specified, no-arbitrage determines the risk-neutral drift—preventing each maturity from being evolved independently.
The state is an infinite-dimensional curve, approximated by factors and a maturity grid.
Volatility is the model input; drift is a no-arbitrage consequence under the chosen measure.
Market models discretise tradable forwards and often change numeraires to simplify their dynamics.
Ask which instruments can identify the dynamics.
HJM provides the organising theory for arbitrage-free curve evolution, while market models connect that theory to caps, swaptions and forward-rate simulation.
caps and floors
European and Bermudan swaptions
CMS products
callable and path-dependent rates structures
State forward definition, curve set, volatility coordinate, correlation/factor structure, probability measure, numeraire and rate-option quote convention.
Write the dynamics before interpreting parameters.
HJM forward dynamics
Every maturity evolves with linked Brownian factors and a measure-dependent drift.
Open in AnalyticsRisk-neutral HJM drift
No-arbitrage fixes the drift once volatility is specified under the money-market numeraire.
Open in AnalyticsFull derivation
Deriving the HJM drift from discounted bond martingales
Start from the bond price implied by the forward curve, apply Itô calculus and require discounted tradable bond prices to have zero drift.
- 01
Represent the bond
Write the log bond price as minus the integral of forwards from current time to maturity.
- 02
Differentiate the moving-boundary integral
The time derivative contributes the short rate f(t,t), while forward drifts and volatilities integrate over maturity.
- 03
Apply Itô to the exponential
Quadratic variation contributes half the squared integrated volatility to bond drift.
- 04
Discount by the money-market account
Under Q, P(t,T)/B_t must be a martingale, so its drift after subtracting r_t is zero.
- 05
Solve the restriction
Differentiate the resulting integrated relation in T to obtain α(t,T)=σ(t,T)·∫_t^Tσ(t,u)du.
HJM converts a chosen forward-volatility structure into an arbitrage-free drift; factorisation and discretisation make the curve model computational.
Inputs
f(t,T): instantaneous forward\sigma(t,T): forward volatility vector\alpha(t,T): HJM driftP(t,T): zero-coupon bond price
Assumptions and limits
- Naive maturity discretisation is high dimensional.
- Negative forwards remain possible in Gaussian specifications.
- Market-model lognormality, displacement and correlation are strong dynamic assumptions.
Bond reconstruction
The simulated forward curve must integrate to positive bond prices.
Open in AnalyticsCalibrate, compute, and challenge the dynamics.
Choose a factor volatility/correlation representation, enforce the measure-consistent drift, discretise time and maturity, reconstruct bond prices and validate cap/swaption prices or scenario moments.
Fit factor volatilities and correlations to a governed option basket, use dimension reduction where justified and test stability across grids and measures.
Implementation with current QuantLib
Use current upstream models and engines as implementation references for short-rate or market-model specialisations. Preserve numeraire, measure, tenor grid and correlation inputs explicitly; validate against bond and caplet invariants.
API authority: upstream QuantLib reference pinned in the source registry.06PYTHON IMPLEMENTATIONOpen the implementation and checks.
- Keep market conventions and quote lineage at the boundary.
- Solve curves and dynamics in framework-free deterministic kernels.
- Return residuals, state and sensitivities with every value.
- Test analytical limits, reconstruction identities and failure domains.
Discrete one-factor HJM drift
Compute the no-arbitrage drift from a maturity-dependent volatility field.
from __future__ import annotations import numpy as np def hjm_drift(maturity: np.ndarray, sigma: np.ndarray) -> np.ndarray: if maturity.ndim != 1 or maturity.shape != sigma.shape or np.any(np.diff(maturity) <= 0): raise ValueError("aligned increasing maturity grid required") integral = np.zeros_like(sigma) integral[1:] = np.cumsum(0.5 * (sigma[1:] + sigma[:-1]) * np.diff(maturity)) return sigma * integral T = np.linspace(0.0, 10.0, 101)sigma = 0.012 * np.exp(-0.15 * T)alpha = hjm_drift(T, sigma)assert alpha[0] == 0.0assert np.all(alpha >= 0.0)assert np.max(alpha) < 0.001print(f"max HJM drift={np.max(alpha):.8f}")Shock one parameter and trace the full response.
Forward-curve dynamics laboratory
Change volatility decay, factors and policy shock; watch the initial curve evolve with its no-arbitrage drift.
One-factor decay: Linked level-like curve move.
- initial forward
- evolved forward
- HJM drift ×10
Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.
Where the model meets the book.
“In HJM you choose volatility; the pricing measure chooses the drift. If both are freely fitted, arbitrage has entered the model.”
initial multi-curve state
forward-volatility factors
correlation matrix
measure/numeraire
time and maturity grids
Fit to a defined liquid option basket, preserve positive-semidefinite correlation and validate prices plus scenario moments across discretisations.
RISKfactor vega
correlation
discretisation
measure/model basis
- freeze curves/options
- choose factors
- enforce drift
- calibrate and validate
- simulate exposures and hedge tests
Production failure modes
- wrong measure drift
- non-PSD correlation
- grid-dependent calibration
- forward/bond reconstruction mismatch
09MACRO CONNECTIONOpen the transmission channel.
Whole-curve scenarios under macro shocks
Macro shocks alter level, slope and volatility across maturities; an HJM factor model evolves those linked forward segments without violating bond-price no-arbitrage.
transmitsmoves curve state and volatility
transmitspropagate across maturities
transmitskeeps bond dynamics consistent
outputrevalues path-dependent cash flows
10COMMON PITFALLSOpen the failure checklist.
Simulating each forward maturity independently.
Choosing both drift and volatility under Q without enforcing HJM.
Ignoring numeraire when comparing model dynamics.
Calibrating one grid and pricing on another without convergence tests.
11SOURCES / FURTHER READINGOpen sources and continue the track.
Curve construction, multi-curve, short-rate and HJM lectures
Research map for term-structure theory and numerical experiments; all platform explanations and code are original.
- Source
- Financial Engineering: Interest Rates & xVA
- Author
- L. A. Grzelak
- Ref
- main
Monte Carlo, stochastic calculus and calibration lectures
Mathematical and numerical cross-reference for model dynamics and diagnostics.
- Source
- Computational Finance Course
- Author
- L. A. Grzelak
- Ref
- main
Current bootstrapping, interpolation, curve, model, cap/floor and swaption tests
Implementation authority for production object boundaries and regression-test patterns.
- Source
- QuantLib upstream
- Author
- QuantLib contributors
- Ref
- v1.42.1