Interest Rate Mean Reversion, Part 2: The Hull-White Model & Calibration#
Interest Rate Mean Reversion, Part 1: The Bermudan Swaption & Its Bounds showed that a Bermudan needs a model of how the whole curve moves through time. This page sets out the one-factor Hull-White model, which is the usual first choice for the product. It reprices today’s curve exactly, it gives a European swaption in closed form, and it needs only one state variable, which keeps the numerical work of Interest Rate Mean Reversion, Part 3: Pricing by Backward Induction small. The page also calibrates the model to the nine co-terminal European swaptions. It is the second of four pages on pricing Bermudan swaptions.
The model#
The model describes the short rate, which is the rate for an instant. Writing it as the sum of a function of time and a random part \(x(t)\):
Parameter |
Role |
|---|---|
\(a\) |
Mean reversion speed. A positive \(x\) is pulled back to zero at the rate \(a\), so a shock fades. It controls how the rates on different dates move together. |
\(\sigma(t)\) |
Volatility of the short rate. It is a function of time, so that the model can match the European swaptions at several expiries. It is constant between the expiries. |
\(\varphi(t)\) |
A function of time, chosen so that the model prices today’s discount curve exactly. It is not a free parameter. It comes from Interest Rate Curves, Part 1: Instruments & Bootstrapping. |
The random part \(x\) is normal, so the rate can be negative, which fits the normal volatilities that the market quotes for swaptions (Interest Rate Volatility, Part 2: The Bachelier (Normal) Model). Under the risk-neutral measure, \(x(t)\) has mean zero and a variance that depends on \(a\) and \(\sigma\):
Bond prices#
A zero-coupon bond that matures at \(T\) is worth, at time \(t\) when the state is \(x\):
\(P(0,t)\) and \(P(0,T)\) are today’s discount factors from the curve, and the rest depends on \(a\), \(\sigma\) and the state \(x\). The formula has three consequences:
The whole curve at any date is a function of one number, \(x\). This is what “one-factor” means. A grid in \(x\) is enough for the numerical work.
A bond price falls when \(x\) rises, since \(B\) is positive. A payer swap gains when rates rise, so its value rises with \(x\). The holder of a payer exercises when \(x\) is above a level, which is the exercise boundary of Interest Rate Mean Reversion, Part 3: Pricing by Backward Induction.
The model prices the curve exactly. At \(t = 0\) and \(x = 0\) the formula gives \(P(0,T)\).
With annual fixed payments at the strike \(K\) on \(T_1, \dots, T_n\), the value of the payer swap at time \(t\) is one less the present value of the fixed payments and the principal:
One curve is used for the discount factors and for the forward rates, as in Interest Rate Volatility, Part 1: Swaptions & Black-76. With separate projection and discount curves, as in Interest Rate Curves, Part 2: Multi-Curve & Basis, a common approach is to add the basis between the two as a deterministic spread.
European swaptions in closed form#
A European payer swaption that expires at \(T_0\) pays \(\max(S(T_0, x), 0)\). Because \(S\) rises with \(x\), there is one level \(x^*\) at which the swap is worth zero. Above \(x^*\) every bond in the swap is worth less than it is at \(x^*\). Jamshidian’s decomposition uses this: the swaption is the same as a sum of options on the individual bonds,
Each put on a bond is a closed form, because the log of the bond price is normal. For a put on a bond that matures at \(S\), with expiry \(T_0\), strike \(K_j\), and \(s = B(T_0, S)\sqrt{y(T_0)}\):
The price therefore takes one root-find for \(x^*\) and a sum of \(n\) terms. It is fast enough to sit inside a calibration. It is also a check on the numerical engine of Interest Rate Mean Reversion, Part 3: Pricing by Backward Induction, which must give the same price when it has one exercise date.
Calibration#
The mean reversion \(a\) is chosen first, and then \(\sigma(t)\) is fitted. The volatility is constant between the expiries of the co-terminal swaptions:
Set \(\sigma_1\) on the first year, so that the 1Y x 9Y swaption reprices to its Bachelier price.
Set \(\sigma_2\) on the second year, with \(\sigma_1\) fixed, so that the 2Y x 8Y swaption reprices.
Continue to the 9Y x 1Y.
The European swaption that expires at \(t_k\) depends only on \(\sigma\) up to \(t_k\), so each step has one unknown and one equation. It is a bootstrap, as for the curve in Interest Rate Curves, Part 1: Instruments & Bootstrapping.
Why \(a\) is chosen and not fitted. The nine European prices do not say what \(a\) is. A larger \(a\) makes a shock fade faster, so it needs a larger \(\sigma\) to give the same swaption price. Any \(a\) can be matched to all nine prices by a different \(\sigma(t)\). The Bermudan price is different for each \(a\), as Interest Rate Mean Reversion, Part 4: Risk & Reserves shows. Where the value of \(a\) comes from is a modelling choice:
a second set of swaptions whose prices depend on the correlation between rates, such as swaptions with different tenors at one expiry
broker or consensus prices of Bermudans, from which an implied \(a\) can be found
a historical estimate from the curve
a policy value that the model owner sets and reviews
The limits of a one-factor model#
One number drives the curve, so at one date the rates of all tenors move together in one pattern. The rates at different dates decorrelate only through \(a\).
There is no smile. The model has a normal volatility that does not depend on the strike. It is calibrated at the strike of the Bermudan. A Bermudan whose strike is far from the money, or one with a stepped strike, needs a model with a smile (Interest Rate Mean Reversion, Part 4: Risk & Reserves).
The European volatilities at other tenors are not matched. The nine co-terminal swaptions are fitted. A swaption on a different swap, such as a 5Y x 2Y, is priced by the model and is not fitted to its quote.
Worked example#
The example calibrates the model at \(a = 0.03\) to the nine swaptions of Interest Rate Mean Reversion, Part 1: The Bermudan Swaption & Its Bounds, and checks the result. It reprices each swaption from the fitted \(\sigma\), converts the model price back to a normal volatility to compare with the quote, and compares the closed form of the 5Y x 5Y with a direct numerical integration of its payoff. It then repeats the calibration for two other values of \(a\).
Python code
"""Hull-White one-factor model: bond prices, closed-form European swaptions, and calibration to co-terminal swaptions."""
import numpy as np
from scipy.optimize import brentq
from scipy.stats import norm
from curve_example import bootstrap, forward_swap
from swaption_example import bachelier_price
NOTIONAL = 100e6
STRIKE = 0.0370
VOLS_BP = {1: 112, 2: 110, 3: 108, 4: 106, 5: 104, 6: 102, 7: 100, 8: 98, 9: 96} # normal vols of the Ey x (10-E)y swaptions
END = 10 # all the swaptions are into a swap that ends at year 10
_GL_X, _GL_W = np.polynomial.legendre.leggauss(8)
class HullWhite:
"""dx = -a x dt + sigma(t) dW under the risk-neutral measure, with x(0) = 0 and the short rate r = x + phi(t).
phi(t) is chosen so that the model reprices the curve exactly, so the curve is the only market input besides
a and sigma. sigma is constant between the breakpoints in `edges`, and the last value is used after the last one.
"""
def __init__(self, curve, a, edges, sigmas):
self.curve, self.a = curve, a
self.edges, self.sigmas = list(edges), list(sigmas)
def sigma(self, t):
k = np.searchsorted(self.edges, t, side="left") - 1
return self.sigmas[int(np.clip(k, 0, len(self.sigmas) - 1))]
def _integral(self, g, s, t):
"""Integral of sigma(u)^2 g(u) from s to t, by Gauss-Legendre on each interval where sigma is constant."""
cuts = [s] + [e for e in self.edges[1:-1] if s < e < t] + [t]
total = 0.0
for lo, hi in zip(cuts[:-1], cuts[1:]):
u = 0.5 * (hi - lo) * _GL_X + 0.5 * (hi + lo)
total += self.sigma(0.5 * (lo + hi)) ** 2 * 0.5 * (hi - lo) * np.sum(_GL_W * g(u))
return total
def B(self, t, T):
return (1.0 - np.exp(-self.a * (T - t))) / self.a
def variance(self, s, t):
"""Variance of x(t) given x(s): the integral of sigma^2 exp(-2a(t-u)) from s to t."""
return self._integral(lambda u: np.exp(-2.0 * self.a * (t - u)), s, t)
def bond(self, t, T, x):
"""P(t,T) when x(t) = x. It needs only the curve, a and sigma, through the variance of the integral of x."""
convexity = 0.5 * (self._w(t, T) - self._w(0.0, T) + self._w(0.0, t))
return self.curve.df(T) / self.curve.df(t) * np.exp(-self.B(t, T) * x + convexity)
def _w(self, t, T):
"""Variance of the integral of x from t to T: the integral of sigma(u)^2 B(u,T)^2 from t to T."""
return self._integral(lambda u: self.B(u, T) ** 2, t, T)
def step(self, s, t, T):
"""Moments of x(t) given x(s) = x under the T-forward measure: mean = decay * x - shift, and the variance."""
shift = self._integral(lambda u: np.exp(-self.a * (t - u)) * self.B(u, T), s, t)
return np.exp(-self.a * (t - s)), shift, self.variance(s, t)
def swap_value(self, t, fixed_dates, strike, x):
"""Payer swap value at t, with annual fixed payments: 1 - sum of c_j P(t, T_j), where c_j is the strike
(and 1 more at the end)."""
pv = sum(strike * self.bond(t, d, x) for d in fixed_dates) + self.bond(t, fixed_dates[-1], x)
return 1.0 - pv
def payer_swaption(self, expiry, end, strike):
"""European payer swaption per unit notional, by Jamshidian's decomposition into puts on zero-coupon bonds."""
dates = list(range(int(expiry) + 1, int(end) + 1))
x_star = brentq(lambda x: self.swap_value(expiry, dates, strike, x), -1.0, 1.0)
sd_x = np.sqrt(self.variance(0.0, expiry))
total = 0.0
for j, d in enumerate(dates):
coupon = strike + (1.0 if j == len(dates) - 1 else 0.0)
k = self.bond(expiry, d, x_star)
sd = self.B(expiry, d) * sd_x
p_e, p_d = self.curve.df(expiry), self.curve.df(d)
h = np.log(p_d / (p_e * k)) / sd + 0.5 * sd
total += coupon * (k * p_e * norm.cdf(-h + sd) - p_d * norm.cdf(-h))
return total
def implied_normal_vol(forward, strike, price, expiry, annuity):
"""The normal vol that gives a payer swaption price."""
return brentq(lambda v: bachelier_price(forward, strike, v, expiry, annuity) - price, 1e-6, 0.05)
def market_instruments(curve, strike=STRIKE, vols_bp=VOLS_BP, end=END):
"""The co-terminal swaptions: expiry, forward, annuity, normal vol and Bachelier price per unit notional."""
rows = []
for expiry, vol in vols_bp.items():
forward, annuity = forward_swap(curve, expiry, end - expiry)
price = bachelier_price(forward, strike, vol / 1e4, expiry, annuity)
rows.append((expiry, forward, annuity, vol / 1e4, price))
return rows
def calibrate(curve, a, instruments, strike=STRIKE, end=END):
"""Solve for one sigma per expiry, in order, so that each co-terminal swaption reprices."""
edges = [0.0] + [row[0] for row in instruments]
sigmas = []
for k, row in enumerate(instruments):
def error(s):
model = HullWhite(curve, a, edges[: k + 2], sigmas + [s])
return model.payer_swaption(row[0], end, strike) - row[4]
sigmas.append(brentq(error, 1e-5, 0.1))
return HullWhite(curve, a, edges, sigmas)
if __name__ == "__main__":
curve = bootstrap()
a = 0.03
instruments = market_instruments(curve)
model = calibrate(curve, a, instruments)
print(f"Hull-White, mean reversion a = {a}, strike {STRIKE:.2%}\n")
print(f"{'Swaption':>8} {'Fwd rate':>9} {'Normal vol':>11} {'Market':>11} {'Model':>11} {'Sigma':>8}")
worst = 0.0
for (expiry, forward, annuity, vol, price), sigma in zip(instruments, model.sigmas):
model_price = model.payer_swaption(expiry, END, STRIKE)
implied = implied_normal_vol(forward, STRIKE, model_price, expiry, annuity)
worst = max(worst, abs(implied - vol))
label = f"{expiry}Yx{END - expiry}Y"
print(f"{label:>8} {forward:9.3%} {vol * 1e4:9.1f}bp {NOTIONAL * price:11,.0f} "
f"{NOTIONAL * model_price:11,.0f} {sigma * 1e4:6.1f}bp")
print(f"\nLargest difference in implied normal vol: {worst * 1e4:.1e}bp")
# Check the closed form against a direct integral of the payoff over x(T) under the T-forward measure.
expiry = 5
decay, shift, var = model.step(0.0, expiry, expiry)
grid = np.linspace(-8, 8, 40001) * np.sqrt(var) - shift
payoff = np.maximum(model.swap_value(expiry, list(range(expiry + 1, END + 1)), STRIKE, grid), 0.0)
density = norm.pdf(grid, loc=-shift, scale=np.sqrt(var))
direct = curve.df(expiry) * np.trapezoid(payoff * density, grid)
print(f"5Yx5Y check: closed form {model.payer_swaption(expiry, END, STRIKE) * NOTIONAL:,.2f}, "
f"direct integral {direct * NOTIONAL:,.2f}")
# The same swaptions with a different mean reversion: the prices are matched, and sigma is not the same.
print(f"\n{'a':>6}" + "".join(f"{str(e) + 'Y':>8}" for e in VOLS_BP))
for a_alt in (0.001, 0.03, 0.10):
alt = calibrate(curve, a_alt, instruments)
print(f"{a_alt:6.3f}" + "".join(f"{s * 1e4:6.1f}bp" for s in alt.sigmas))
The output is:
Hull-White, mean reversion a = 0.03, strike 3.70%
Swaption Fwd rate Normal vol Market Model Sigma
1Yx9Y 3.717% 112.0bp 3,308,809 3,308,809 124.7bp
2Yx8Y 3.735% 110.0bp 4,046,077 4,046,077 120.8bp
3Yx7Y 3.776% 108.0bp 4,270,070 4,270,070 116.5bp
4Yx6Y 3.815% 106.0bp 4,138,511 4,138,511 112.2bp
5Yx5Y 3.870% 104.0bp 3,796,641 3,796,641 107.7bp
6Yx4Y 3.899% 102.0bp 3,225,252 3,225,252 103.7bp
7Yx3Y 3.947% 100.0bp 2,553,322 2,553,322 99.1bp
8Yx2Y 3.947% 98.0bp 1,739,713 1,739,713 95.4bp
9Yx1Y 3.947% 96.0bp 882,738 882,738 91.1bp
Largest difference in implied normal vol: 4.3e-09bp
5Yx5Y check: closed form 3,796,641.35, direct integral 3,796,641.38
a 1Y 2Y 3Y 4Y 5Y 6Y 7Y 8Y 9Y
0.001 109.0bp 105.1bp 100.8bp 96.6bp 92.1bp 88.2bp 83.7bp 80.1bp 75.8bp
0.030 124.7bp 120.8bp 116.5bp 112.2bp 107.7bp 103.7bp 99.1bp 95.4bp 91.1bp
0.100 168.7bp 166.1bp 161.9bp 156.9bp 150.9bp 145.0bp 138.1bp 131.6bp 124.5bp
Reading the output:
All nine swaptions reprice, to within a billionth of a basis point of normal volatility. A bootstrap of this kind always fits, as long as a solution exists, so a good fit is not evidence that the model is right.
The closed form is checked. The Jamshidian price of the 5Y x 5Y agrees with a direct integral of the payoff over the state variable to 0.03 on 3.8 million.
The volatility of the short rate is above the swaption volatility. At \(a = 0.03\) it is 124.7bp for a 1Y x 9Y quoted at 112bp. A swap rate depends on the whole curve, and mean reversion makes the long rates move less than the short rate. The gap widens as \(a\) rises: at \(a = 0.10\) the 1Y volatility is 168.7bp.
The volatility falls smoothly with the expiry, because the quotes do. Noisy quotes give a \(\sigma(t)\) that oscillates, which is a warning about the quotes.
The three rows price the same nine swaptions. They differ in \(\sigma\), and so they will differ in the price of the Bermudan.
A valuation control view#
Reproduce the calibration independently: an independent implementation of the model should reprice each European to a tolerance that is a small fraction of the quote, for example 0.01bp of normal volatility. A European that does not reprice means that the calibration has failed, or has stopped early.
Look at the shape of \(\sigma(t)\): it should be smooth and positive. A jump or an oscillation points to a bad quote or to a convergence problem in the fit.
Treat \(a\) as a controlled input: record its value, its source and the date of its last review. A change in \(a\) is a change in the model, and its effect on the Bermudan book should be reported before the change is made.
Check the curve and the quotes: the model is fitted to the curve that the firm uses for discounting and for the forward rates. The normal volatilities must be quoted on the same basis as the swaptions in the calibration set. See Interest Rate Curves, Part 2: Multi-Curve & Basis.
Know what the model cannot do: a one-factor model with no smile is not suitable for a Bermudan whose strike is far from the money, and the limit should be in the model’s documented scope.
Next, Interest Rate Mean Reversion, Part 3: Pricing by Backward Induction uses the calibrated model to price the Bermudan by backward induction.