TQBTHEQUANTBATEMAN
TQB/ learn/ rates/ hjm and market modelsEN · DARK
Rates & curves · front-office

HJM and market-model dynamics

Modelling the whole forward curve under a no-arbitrage drift restriction

BY THE END, YOU CAN

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.

01
INTUITION

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.

01

The state is an infinite-dimensional curve, approximated by factors and a maturity grid.

02

Volatility is the model input; drift is a no-arbitrage consequence under the chosen measure.

03

Market models discretise tradable forwards and often change numeraires to simplify their dynamics.

02
WHY MARKETS CARE

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.

INSTRUMENTS

caps and floors

European and Bermudan swaptions

CMS products

callable and path-dependent rates structures

QUOTE CONVENTION

State forward definition, curve set, volatility coordinate, correlation/factor structure, probability measure, numeraire and rate-option quote convention.

03
MATHEMATICS

Write the dynamics before interpreting parameters.

Formula · Full derivation

HJM forward dynamics

df(t,T)=α(t,T)dt+σ(t,T)⋅dWtdf(t,T)=\alpha(t,T)dt+\sigma(t,T)\cdot dW_t

Every maturity evolves with linked Brownian factors and a measure-dependent drift.

Open in Analytics
Formula · Full derivation

Risk-neutral HJM drift

α(t,T)=σ(t,T)⋅∫tTσ(t,u)du\alpha(t,T)=\sigma(t,T)\cdot\int_t^T\sigma(t,u)du

No-arbitrage fixes the drift once volatility is specified under the money-market numeraire.

Open in Analytics
Full derivation
Full 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.

  1. 01

    Represent the bond

    Write the log bond price as minus the integral of forwards from current time to maturity.

    ln⁡P(t,T)=−∫tTf(t,u)du\ln P(t,T)=-\int_t^T f(t,u)du
  2. 02

    Differentiate the moving-boundary integral

    The time derivative contributes the short rate f(t,t), while forward drifts and volatilities integrate over maturity.

  3. 03

    Apply Itô to the exponential

    Quadratic variation contributes half the squared integrated volatility to bond drift.

  4. 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.

  5. 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 drift
  • P(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.
Formula · Short derivation

Bond reconstruction

P(t,T)=exp⁡[−∫tTf(t,u)du]P(t,T)=\exp\left[-\int_t^T f(t,u)du\right]

The simulated forward curve must integrate to positive bond prices.

Open in Analytics
05
MODEL / PRICING

Calibrate, compute, and challenge the dynamics.

METHOD

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.

CALIBRATION

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.
ARCHITECTURE
  • 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.
PYTHON 3 · NUMPY / SCIPY

Discrete one-factor HJM drift

Compute the no-arbitrage drift from a maturity-dependent volatility field.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def hjm_drift(maturity: np.ndarray, sigma: np.ndarray) -> np.ndarray:
06 if maturity.ndim != 1 or maturity.shape != sigma.shape or np.any(np.diff(maturity) <= 0):
07 raise ValueError("aligned increasing maturity grid required")
08 integral = np.zeros_like(sigma)
09 integral[1:] = np.cumsum(0.5 * (sigma[1:] + sigma[:-1]) * np.diff(maturity))
10 return sigma * integral
11
12T = np.linspace(0.0, 10.0, 101)
13sigma = 0.012 * np.exp(-0.15 * T)
14alpha = hjm_drift(T, sigma)
15assert alpha[0] == 0.0
16assert np.all(alpha >= 0.0)
17assert np.max(alpha) < 0.001
18print(f"max HJM drift={np.max(alpha):.8f}")
EXPECTED OUTPUTA non-negative one-factor HJM drift generated from the specified volatility field.
SANITY CHECKS

✓ Maturity grid is strictly increasing.

✓ Integral starts at current time with zero area.

✓ Zero volatility would imply zero drift.

07
INTERACTIVE LAB

Shock one parameter and trace the full response.

FORWARD VOLATILITY DETERMINES RISK-NEUTRAL DRIFT

Forward-curve dynamics laboratory

Change volatility decay, factors and policy shock; watch the initial curve evolve with its no-arbitrage drift.

SYNTHETIC · CONTROLLED SCENARIOS
Front volatility1.20%
Max HJM drift2.7 bp
30Y forward move0.3 bp
Instantaneous forward by Forward maturity (years)

One-factor decay: Linked level-like curve move.

  • initial forward
  • evolved forward
  • HJM drift ×10
Forward maturity (years): 0.0Y. initial forward: 2.703%. evolved forward: 2.918%. HJM drift ×10: 0.072%.

Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.

ACTIVE STATE

One-factor decay — Linked level-like curve move. Move the control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
“In HJM you choose volatility; the pricing measure chooses the drift. If both are freely fitted, arbitrage has entered the model.”
VISIBLE INPUTS

initial multi-curve state

forward-volatility factors

correlation matrix

measure/numeraire

time and maturity grids

CALIBRATION

Fit to a defined liquid option basket, preserve positive-semidefinite correlation and validate prices plus scenario moments across discretisations.

RISK

factor vega

correlation

discretisation

measure/model basis

DAILY WORKFLOW
  1. freeze curves/options
  2. choose factors
  3. enforce drift
  4. calibrate and validate
  5. 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.
MACRO CONNECTION

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.

01Macro factor shocktransmits

moves curve state and volatility

02HJM factorstransmits

propagate across maturities

03No-arbitrage drifttransmits

keeps bond dynamics consistent

04Optionality / exposureoutput

revalues path-dependent cash flows

10COMMON PITFALLSOpen the failure checklist.
01

Simulating each forward maturity independently.

02

Choosing both drift and volatility under Q without enforcing HJM.

03

Ignoring numeraire when comparing model dynamics.

04

Calibrating one grid and pricing on another without convergence tests.

11SOURCES / FURTHER READINGOpen sources and continue the track.
research

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
OPEN ORIGINAL SOURCE ↗
research

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
OPEN ORIGINAL SOURCE ↗
implementation reference

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
OPEN ORIGINAL SOURCE ↗