Skip to content
All projects

Project · 2026

The Heath-Jarrow-Morton Model

A one-factor Heath-Jarrow-Morton term-structure model calibrated to historical Federal Reserve yield-curve data, together with the talk that builds up the measure theory behind it.

Stochastic CalculusFinanceNumerical
Built with
Python · NumPy · pandas · SciPy

What it does

Two things that belong together: a beamer talk developing the probability theory behind the Heath-Jarrow-Morton model, and a complete one-factor implementation of that model calibrated to sixty years of Treasury data. HJM describes how an entire forward-rate curve evolves, via the stochastic differential equation

df(t,T) = α(t,T) dt + σ(t,T) dW(t),

where f(t,T) is the instantaneous forward rate for maturity T > t that can be locked in at time t.

Why I built it

This accompanies my presentation for the Summer 2026 UT Austin Directed Reading Program, where I read Steven Shreve’s Stochastic Calculus for Finance II. The talk assumes only basic calculus and probability and introduces the rest as it goes: measures on the coin-toss space, sigma-algebras and filtrations as a model of what we know so far, and the passage from a symmetric random walk to Brownian motion in the limit. The notebook exists because I wanted the theory to end somewhere concrete rather than at the last slide.

Contents

  • main.tex / main.pdf — the talk, from the coin-toss space up to Brownian motion and the model itself
  • main.ipynb — the main deliverable, a one-factor HJM simulation calibrated to real Federal Reserve data
  • basic_ex.ipynb — a toy version on the synthetic initial curve f(0,T) = 0.05 e^(-0.3T), the coded example shown in the talk
  • feds200628.csv — the historical dataset

Method

The simulation is calibrated to the Gürkaynak-Sack-Wright U.S. Treasury yield-curve dataset, a Federal Reserve staff product covering the curve from 1961 to the present. It gives six Svensson parameters per date, from which the instantaneous forward rate at any maturity can be reconstructed. From there the notebook proceeds in four stages:

  • Build forward-rate panels. Daily curves are reconstructed on a maturity grid of 1.0, 1.5, …, 30.0 years from 1990 onward, with a one-day-ahead panel offset by δ = 1/252.
  • Estimate volatility. Normalized daily increments give an empirical covariance matrix. Because a change of measure only alters the drift, a covariance estimated under the real-world measure is enough to recover σ(t,T) under the risk-neutral one. A single principal component captures the dominant mode of curve movement.
  • Enforce no arbitrage. Under the risk-neutral measure the drift is fully determined by the volatility — α(t,T) = σ(t,T) σ*(t,T) with σ*(t,T) the integral of σ(t,u) from t to T — so once σ is estimated, nothing further needs calibrating.
  • Simulate. Starting from the most recent observed curve, an Euler-Maruyama scheme evolves it forward, drawing one Brownian increment per step and rolling the maturity grid as observation time advances.

The notebook introduces financial quantities and numerical methods as it uses them; the measure-theoretic construction of Brownian motion and the derivation of the risk-neutral measure are left to the talk and to Shreve.