Interest Rate Mean Reversion, Part 3: Pricing by Backward Induction#
With a calibrated model, the Bermudan is priced by working backwards from the last exercise date. This page sets out the recursion for the Hull-White model of Interest Rate Mean Reversion, Part 2: The Hull-White Model & Calibration, solves it on a grid of the state variable, and finds the exercise boundary. It then checks the answer against the European swaptions and shows how much each exercise date adds. It is the third of four pages on pricing Bermudan swaptions.
The recursion#
Interest Rate Mean Reversion, Part 1: The Bermudan Swaption & Its Bounds set out the recursion in terms of discounting. In the model, every quantity is a function of the state \(x\), so the recursion is a recursion on functions of \(x\):
where \(S_i(x)\) is the value of the swap that starts at \(t_i\), from Interest Rate Mean Reversion, Part 2: The Hull-White Model & Calibration, and the continuation value is
The expectation is taken in the forward measure of the next exercise date, where the zero-coupon bond to that date is the numeraire. This avoids the joint distribution of \(x\) and of the discounting between the two dates. The bond \(P(t_i, t_{i+1}; x)\) does the discounting, and the next state \(x'\) is normal:
with \(\Delta = t_{i+1} - t_i\). The shift \(m_i\) is the effect of changing the measure. It is only 0.4 to 0.75 basis points of \(x\) at each step here, but leaving it out raises the price by about 55,000, or 1%, so it is easy to miss and it matters. The price today is the same step from \(t = 0\), with \(x = 0\), to the first exercise date.
The grid#
The state \(x\) is put on a grid at each exercise date, from 6 standard deviations below zero to 6 above, where the standard deviation is that of \(x(t_i)\). The steps are:
At the last date, set \(V_M(x) = \max(S_M(x), 0)\) on its grid.
Go back one date. For each grid point \(x\), take the normal density of the next state at each point of the next grid, with the mean and variance above, and divide by the sum so that the weights add to one.
The continuation value is the bond \(P(t_i, t_{i+1}; x)\) times the weights applied to \(V_{i+1}\). It is a matrix times a vector.
Set \(V_i = \max(S_i, C_i)\).
Repeat to the first date, and take the last step from \(x = 0\) at time 0.
The recursion is the same one that a trinomial tree or a finite-difference solution of the model uses, on a different discretisation. A grid with exact normal weights suits a model in which the next state is normal.
The exercise boundary#
At each date, the points where \(S_i > C_i\) are the points where the holder exercises. Since the swap value rises with \(x\), the exercise region is \(x > x_i^*\). The boundary is easier to read as a swap rate. At the state \(x_i^*\), the par rate of the swap that the holder would enter is the exercise boundary, \(R_i^*\). The holder exercises when the swap rate is above \(R_i^*\), and holds when it is below. The gap \(R_i^* - K\) is the hurdle that the rate must clear beyond the strike.
The boundary is high in the early years and falls to the strike at the last date. Early on, the option that the holder gives up by exercising is worth a lot, because there are many dates left, so the swap has to be well in the money before it is better to enter it than to keep waiting. At the last date nothing is given up, so the hurdle is zero.
Worked example#
The example prices the 10NC1 payer swaption of Interest Rate Mean Reversion, Part 1: The Bermudan Swaption & Its Bounds, on the model that Interest Rate Mean Reversion, Part 2: The Hull-White Model & Calibration calibrated at \(a = 0.03\), on a grid of 401 points at each date. It then runs three checks:
the grid with a single exercise date must give the closed-form European price at each date
the price must settle as the number of grid points rises
the price must fall when an exercise date is removed
Python code
"""Price a Bermudan payer swaption on the Hull-White model by backward induction on a grid of the state variable."""
import numpy as np
from bermudan_hw_example import END, NOTIONAL, STRIKE, calibrate, market_instruments
from curve_example import bootstrap, forward_swap
def swap_rate(model, t, end, x):
"""Par rate of the swap that starts at t and ends at `end`, for the state x."""
annuity = sum(model.bond(t, d, x) for d in range(int(t) + 1, int(end) + 1))
return (1.0 - model.bond(t, end, x)) / annuity
def transition(model, s, t, x_from, x_to):
"""Weights from each x_from to the grid x_to, for the T = t forward measure. Each row sums to 1."""
decay, shift, var = model.step(s, t, t)
mean = decay * np.atleast_1d(x_from) - shift
w = np.exp(-((x_to[None, :] - mean[:, None]) ** 2) / (2.0 * var))
return w / w.sum(axis=1, keepdims=True)
def bermudan_payer(model, exercise, end, strike, n=401, width=6.0):
"""Value per unit notional, and the exercise boundary as (time, state, swap rate) at each date."""
grids = [np.linspace(-width, width, n) * np.sqrt(model.variance(0.0, t)) for t in exercise]
value, boundary = None, []
for i in reversed(range(len(exercise))):
t, x = exercise[i], grids[i]
swap = model.swap_value(t, list(range(int(t) + 1, int(end) + 1)), strike, x)
if value is None:
cont = np.zeros(n)
else:
nxt = exercise[i + 1]
cont = model.bond(t, nxt, x) * (transition(model, t, nxt, x, grids[i + 1]) @ value)
gap = swap - cont
k = int(np.argmax(gap > 0)) if np.any(gap > 0) else None
if k:
x_star = x[k - 1] + (x[k] - x[k - 1]) * (-gap[k - 1]) / (gap[k] - gap[k - 1])
boundary.append((t, x_star, float(swap_rate(model, t, end, x_star))))
value = np.maximum(swap, cont)
first = exercise[0]
price = model.bond(0.0, first, 0.0) * float((transition(model, 0.0, first, 0.0, grids[0]) @ value)[0])
return price, boundary[::-1]
if __name__ == "__main__":
curve = bootstrap()
a = 0.03
instruments = market_instruments(curve)
model = calibrate(curve, a, instruments)
dates = [float(e) for e in range(1, END)]
europeans = {row[0]: model.payer_swaption(row[0], END, STRIKE) for row in instruments}
price, boundary = bermudan_payer(model, dates, END, STRIKE)
print(f"Strike {STRIKE:.2%}, a = {a}, 10-year swap, exercise at years 1 to 9, notional {NOTIONAL / 1e6:.0f}m\n")
print(f"Bermudan payer swaption: {NOTIONAL * price:,.0f}")
print(f"Largest European ({max(europeans, key=europeans.get)}Y expiry): {NOTIONAL * max(europeans.values()):,.0f}")
print(f"Sum of the Europeans: {NOTIONAL * sum(europeans.values()):,.0f}")
# With one exercise date the grid must reproduce the closed-form European price.
print(f"\n{'Date':>5} {'Closed form':>12} {'Grid':>12} {'Difference':>11}")
for expiry, closed in europeans.items():
single, _ = bermudan_payer(model, [float(expiry)], END, STRIKE)
print(f"{expiry:>4}Y {NOTIONAL * closed:12,.2f} {NOTIONAL * single:12,.2f} {NOTIONAL * (single - closed):+11.2f}")
print(f"\n{'Grid points':>11} {'Bermudan':>12} {'Change':>10}")
previous = None
for n in (51, 101, 201, 401, 801):
value, _ = bermudan_payer(model, dates, END, STRIKE, n=n)
change = "" if previous is None else f"{NOTIONAL * (value - previous):+10.2f}"
print(f"{n:>11} {NOTIONAL * value:12,.2f} {change:>10}")
previous = value
# Each exercise date adds value, so fewer dates give a lower price.
print(f"\n{'Exercise dates':<22} {'Bermudan':>12}")
for label, schedule in (("Annual, 1 to 9", dates), ("Every 2 years", dates[1::2]),
("Every 3 years", dates[2::3]), ("Year 5 only", [5.0]), ("Year 2 dropped", dates[:1] + dates[2:])):
print(f"{label:<22} {NOTIONAL * bermudan_payer(model, schedule, END, STRIKE)[0]:12,.0f}")
print(f"\n{'Date':>5} {'Forward rate':>13} {'Exercise above':>15} {'Hurdle':>8}")
for (t, _, level), row in zip(boundary, instruments):
print(f"{t:>4.0f}Y {row[1]:13.3%} {level:15.3%} {(level - STRIKE) * 1e4:6.1f}bp")
The output is:
Strike 3.70%, a = 0.03, 10-year swap, exercise at years 1 to 9, notional 100m
Bermudan payer swaption: 5,779,640
Largest European (3Y expiry): 4,270,070
Sum of the Europeans: 27,961,133
Date Closed form Grid Difference
1Y 3,308,809.27 3,308,829.57 +20.30
2Y 4,046,077.44 4,046,090.07 +12.64
3Y 4,270,069.65 4,270,199.83 +130.17
4Y 4,138,510.69 4,138,605.56 +94.88
5Y 3,796,641.35 3,796,748.79 +107.43
6Y 3,225,252.20 3,225,073.92 -178.28
7Y 2,553,321.51 2,553,336.92 +15.41
8Y 1,739,712.80 1,739,647.86 -64.94
9Y 882,738.20 882,705.25 -32.94
Grid points Bermudan Change
51 5,775,909.96
101 5,779,137.96 +3228.00
201 5,779,256.44 +118.49
401 5,779,639.66 +383.22
801 5,779,713.12 +73.47
Exercise dates Bermudan
Annual, 1 to 9 5,779,640
Every 2 years 5,408,533
Every 3 years 4,969,624
Year 5 only 3,796,749
Year 2 dropped 5,630,234
Date Forward rate Exercise above Hurdle
1Y 3.717% 5.040% 134.0bp
2Y 3.735% 4.972% 127.2bp
3Y 3.776% 4.850% 115.0bp
4Y 3.815% 4.730% 103.0bp
5Y 3.870% 4.545% 84.5bp
6Y 3.899% 4.393% 69.3bp
7Y 3.947% 4.169% 46.9bp
8Y 3.947% 3.963% 26.3bp
9Y 3.947% 3.700% 0.0bp
Reading the output:
The Bermudan is worth 5.78 million. That is 1.51 million, or 35%, more than the largest European, which is the switch value. It sits between the bounds of Interest Rate Mean Reversion, Part 1: The Bermudan Swaption & Its Bounds, which are 4.27 million and 27.96 million.
The grid reproduces the Europeans. With one exercise date the grid is within 180 of the closed form on prices of 0.9 to 4.3 million, or 0.006% at worst. The remaining error comes from the kink in the payoff at the boundary, which the grid resolves only to its spacing.
The price settles. From 201 points the changes are a few hundred on 5.78 million, which is under 0.01%, and they do not shrink steadily. That is grid noise, and it sets the smallest bump that can be used for a sensitivity. With 51 points the error is about 3,700.
Each date adds value. With annual dates the price is 5.78 million. With every second year it is 5.41 million, with every third year 4.97 million, and with year 5 alone it is 3.80 million, the European. Removing only year 2 costs 149,000. Early dates are worth the most, because the option on a long swap has the most time value.
The hurdle falls from 134bp to zero. At year 8 the boundary is 3.963% and the forward swap rate is 3.947%, so in the central scenario the holder is close to indifferent between exercising and waiting.
A valuation control view#
Test the engine against the closed form: with one exercise date the engine must reproduce the European swaption of Interest Rate Mean Reversion, Part 2: The Hull-White Model & Calibration at every date. A failure is a bug in the swap value, the bond formula or the transition step, and it is found much more easily here than in the Bermudan.
Test the bounds and the dates: the price must lie between the largest European and the sum, and it must not rise when an exercise date is removed. A price that rises when a date is removed means that the engine is wrong, or that the dates are not on the grid.
Run a convergence test with each valuation, or on a schedule: the numerical error should be well below the bid-offer and the reserve. With 401 points it is a few hundred on 5.78 million.
Look at the boundary: it should fall steadily to the strike at the last date. A boundary that is not monotone, or that lies below the strike, is a sign of an error.
Match the contract’s dates: the grid dates must be the contract’s exercise dates, and not rounded. A notice period of a few days between the exercise decision and the start of the swap is a small effect, but it should be in the documented scope.
Compare noise with the bump: risk by bumping needs a bump whose effect is larger than the grid noise. The vega of Interest Rate Mean Reversion, Part 4: Risk & Reserves is 3,000 to 8,000 per basis point, which is well above the noise, and a bump of a tenth of a basis point would not be.
Next, Interest Rate Mean Reversion, Part 4: Risk & Reserves looks at the model risk, the sensitivities and the reserve.