Rates, Credit, XVA and Risk · Rates, credit & risk
7Short-Rate Models
Every night a bank values tens of thousands of callable bonds, Bermudan swaptions and mortgage pools, each an option to exercise on one of many dates on a whole curve. A model of the swap rate alone cannot do it: exercising at year three depends on every rate from year three on. The oldest workable answer models one number, the instantaneous short rate, and derives the whole curve from it; the version most banks still run in production fits today’s curve exactly, has bond and swaption prices in closed form, and fits on a tree that values a Bermudan in milliseconds. Its limits are as well known as its uses: one factor makes every rate move together, and one volatility cannot fit the swaptions it will be asked to hedge. This chapter builds that model, the Hull–White model, fits it to chapter 2’s euro curve and to chapter 5’s co-terminal swaptions, checks its tree against its formulas, and measures what a second factor adds.
7.1 The short rate and affine bond prices
Definition 7.1 (Short-rate model)
A short-rate model specifies the dynamics of the instantaneous rate under the risk-neutral measure (One Quant Book 4, chapter 5), and prices every zero-coupon bond as .
Definition 7.2 (Affine term-structure model)
A short-rate model is an affine term-structure model if its bond prices are exponential-affine in the state: for a state (the short rate or a vector of factors) and deterministic functions . By the Feynman–Kac formula (One Quant Book 4, chapter 4) this holds whenever the drift and the variance of the state are affine in it.
Definition 7.3 (Vasicek model)
The Vasicek model (1977) makes the short rate an Ornstein–Uhlenbeck process, : mean reversion at speed to a level , normal increments, negative rates possible.
Proposition 7.4 (Vasicek bond prices)
With ,
and the long zero rate tends to : convexity pulls long yields below the mean level.
Proof. is normal given , with mean and variance ; take . ∎
A one-factor Gaussian model gives every zero rate the normal volatility . Mean reversion is thus the model’s knob for the shape of the volatility curve, not a statement about where rates are going: with every zero rate has the same volatility, and with long rates are less volatile than short ones (Figure 7.1).
7.2 Vasicek and Hull–White
Vasicek’s model has three parameters and cannot fit today’s curve. Hull and White made the level time-dependent and chose it to fit.
Definition 7.5 (Hull–White model)
The Hull–White model (1990) is with chosen so that the model’s bond prices equal today’s discount factors for every maturity. Equivalently, with
Proposition 7.6 (Hull–White bonds and bond options)
With ,
so is normal with standard deviation , and a call at on the bond maturing at , strike , is worth with .
Proof. Admitted here. ∎
(a Gaussian computation under the -forward measure; Brigo and Mercurio, 2006, chapter 3.)
Definition 7.7 (Black–Karasinski model)
The Black–Karasinski model (1991) makes the logarithm of the short rate mean-reverting and normal, : rates stay positive, bond prices have no closed form, and the model is used on trees. It lost ground when rates went negative.
7.3 Calibration to the curve and to swaptions
The curve is fitted by construction. The volatility must be fitted to options, and the options that matter are those the product can be exercised into: for a ten-year Bermudan callable every year, the co-terminal swaptions, one year into nine, two into eight, up to nine into one.
Definition 7.8 (Jamshidian decomposition)
The Jamshidian decomposition (1989) writes an option on a coupon bond, in a one-factor model where every bond price at expiry is a decreasing function of the single state , as a portfolio of options on its zero-coupon bonds: with the state at which the coupon bond is worth the strike, each zero-coupon option is struck at that bond’s price at .
A receiver swaption with strike is a call at par on a bond paying each year and one at maturity, so it is a sum of zero-coupon bond calls priced by Proposition 7.6.
def swaption(self, T: float, tenor: int, K: float, payer: bool = True) -> float:
"""European swaption (annual unit accruals) by Jamshidian's decomposition: the receiver is a
call on a coupon bond, i.e. a portfolio of calls on zero-coupon bonds struck at P(T, t_i; x*)."""
pay = [T + i for i in range(1, tenor + 1)]
cf = [K] * tenor
cf[-1] += 1.0
yt = self.y(T)
def bond_value(x):
return sum(c * self.bond(T, t, x, yt) for c, t in zip(cf, pay, strict=True))
lo, hi = -1.0, 1.0
for _ in range(100):
mid = 0.5 * (lo + hi)
lo, hi = (mid, hi) if bond_value(mid) > 1.0 else (lo, mid)
xs = 0.5 * (lo + hi)
return sum(c * self.zbo(T, t, self.bond(T, t, xs, yt), call=not payer) for c, t in zip(cf, pay, strict=True))
Method 7.9 (Co-terminal calibration)
Fix (it shapes the volatility term structure; it is often set from the ratio of volatilities of different tenors, or by desk convention). For the co-terminal expiries into a common final date, take piecewise constant on and solve for each level in turn so that the at-the-money swaption expiring at reprices at its market volatility, the earlier levels held. Check the resulting for smoothness and sign.
Example 7.10 (One sigma is not enough)
On chapter 2’s euro OIS curve with , the co-terminal swaptions into ten years from chapter 5’s cube have at-the-money normal volatilities from 60.8 basis points (one into nine) to 91.0 (nine into one). The best constant , 86.0 basis points, gives model volatilities between 76.0 and 76.7: it misses the one-year expiry by 15.3 basis points and the nine-year by 14.2 (Figure 7.2). A piecewise-constant fits all nine exactly, rising from 68.7 to 116.3 basis points before falling to 104.2 in the last interval (Figure 7.3).
7.4 Trees
A Bermudan swaption needs the value of continuing at each exercise date, in every state: backward induction on a lattice. The trinomial tree of One Quant Book 5, chapter 22, is built here for the Hull–White state.
Method 7.11 (The Hull–White tree)
(1) Build a tree for with : steps , spacing , nodes for , three branches from each node with probabilities that match the mean and the variance , the branching shifted inwards at . (2) Shift the tree by at each step so that it reprices the curve: carry the Arrow–Debreu prices forward and set . The short rate at node is .
q = np.zeros(2 * jmax + 1)
q[jmax] = 1.0
width = [min(i, jmax) for i in range(n + 1)]
for i in range(n + 1):
p_next = curve.df_t((i + 1) * dt)
ws = width[i]
idx = np.arange(jmax - ws, jmax + ws + 1)
s = np.sum(q[idx] * np.exp(-js[idx] * dx * dt))
self.alpha[i] = math.log(s / p_next) / dt
if i == n:
break
disc = np.exp(-(self.alpha[i] + js * dx) * dt)
qn = np.zeros_like(q)
for jj in idx:
c = jj + k[jj]
w = q[jj] * disc[jj]
qn[c + 1] += w * self.pu[jj]
qn[c] += w * self.pm[jj]
qn[c - 1] += w * self.pd[jj]
q = qn
self.js, self.width = js, width
Example 7.12 (Tree against formula)
With basis points and , the at-the-money five-into-five payer (forward 2.933%, annuity 4.102) is worth 0.026018 per unit notional by Jamshidian’s formula. The tree with monthly steps gives 0.026119, with fortnightly steps 0.026079, with steps of a week 0.026044 and of half a week 0.026016: the error falls roughly in proportion to the step. The ten-year discount factor is repriced exactly at every step size, by construction.
7.5 Two factors, and what one factor cannot do
In any one-factor model every rate is a function of the same state, so changes of all rates are perfectly correlated. Daily changes of the two- and ten-year Treasury yields had a correlation of 0.769 over 2016–2026 (chapter 6); a product paying on the difference of two rates (a CMS spread, chapter 6) is worthless to a one-factor model.
Definition 7.13 (Two-factor Gaussian model)
The two-factor Gaussian model (G2++) sets with , , , and fitted to the curve. The correlation of changes of the zero rates of maturities and is
with , , .
Example 7.14 (Decorrelating the curve)
With a slow factor (, basis points), a fast one (, basis points) and , the model’s correlation between the two- and ten-year zero rates is 0.774, close to the Treasury estimate, and between the two- and thirty-year 0.687 (Figure 7.5). The strongly negative is typical: the fast factor moves the front against the slow factor to produce slope moves.
7.6 Tutorial: Hull–White from curve to tree
Goal. Fit Hull–White to a curve and to co-terminal swaptions, and check its tree against its closed form. End state: Figures 7.2 and 7.3 and the numbers of Example 7.12.
- The model:
HullWhite(curve, kappa, sigmas, knots)reprices every discount factor of chapter 2’s €STR curve. - Calibrate:
calibrations()fits one and a piecewise-constant to the nine co-terminals;fit_table()converts model prices back to normal volatilities. - Tree:
tree_check(dt=…)for monthly to half-weekly steps. - Two factors:
g2_table();fig_rc_shortrate.pywrites the charts.
What to change next. Calibrate with and and compare the shapes of ; add a time-dependent to the tree by varying the step size.
7.7 Build: the short-rate engine
Purpose. The model behind the book’s callable products: Bermudans (chapter 9), mortgages (chapter 12), exposure simulation (chapter 17).
Interface. HullWhite(curve, kappa, sigmas, knots) with bond, bond_vol, zbo, swaption, annuity_forward; calibrate_coterminal; HWTree(curve, kappa, sigma, horizon, dt) with step_back, zero_bonds_at, european_swaption; vasicek_bond, zero_rate_vol, g2_correlation.
Rules. The curve is any object with df_t; swaps with annual unit accruals in model time; numpy only.
Acceptance tests. code/firm/shortrate/tests/: bonds reprice the curve and bond options satisfy parity; payer minus receiver is the forward swap; the tree reprices discount factors and converges to Jamshidian’s price as the step shrinks; the piecewise calibration reprices its targets; Vasicek’s long rate is ; G2++ with one factor switched off has correlation one.
Stretch. A time-dependent on the tree; a G2++ swaption formula; calibration of to the ratio of co-terminal and column volatilities.
Sources and further reading
- O. Vasicek, “An equilibrium characterization of the term structure”, Journal of Financial Economics 5(2), 1977.
- J. Hull and A. White, “Pricing interest-rate-derivative securities”, Review of Financial Studies 3(4), 1990.
- F. Jamshidian, “An exact bond option formula”, Journal of Finance 44, 1989.
- F. Black and P. Karasinski, “Bond and option pricing when short rates are lognormal”, Financial Analysts Journal 47(4), 1991.
- D. Brigo and F. Mercurio, Interest Rate Models: Theory and Practice, 2nd ed., Springer, 2006, chapters 3–4.
7.8 Exercises
Exercise 7.1 ★
In a one-factor Gaussian model with basis points and , what is the normal volatility of the ten-year and of the thirty-year zero rate?
Solution
Solution of Exercise 7.1.
: at ten years basis points; at thirty years .
Exercise 7.2 ★
Why can Vasicek’s model not reprice today’s curve, and what does Hull–White change to fix it?
Solution
Solution of Exercise 7.2.
Its bond prices depend on three constants (, , ) and today’s short rate, a three-parameter family of curves that cannot match an arbitrary curve. Hull–White makes the drift’s level a function of time, , chosen so that every discount factor is repriced; in the Gaussian form it is .
Exercise 7.3 ★
In a Vasicek model with , and , what is the long-maturity zero rate?
Solution
Solution of Exercise 7.3.
.
Exercise 7.4 ★★
For the tree with monthly steps and , compute and the number of nodes at the widest step. How does it change with weekly steps?
Solution
Solution of Exercise 7.4.
: 149 nodes. With weekly steps : 639 nodes. Small makes wide trees; the width is reached only after steps, so short trees stay narrower.
Exercise 7.5 ★★
Explain why Jamshidian’s decomposition fails in a two-factor model.
Solution
Solution of Exercise 7.5.
It needs every bond price at expiry to be a monotone function of one state variable, so that one critical value splits the exercise region. With two factors the exercise boundary is a curve in the plane, and the coupon bond’s exercise region does not decompose into zero-coupon regions with a common boundary.
Exercise 7.6 ★★
Read Figure 7.3. What would the calibrated look like with , and why?
Solution
Solution of Exercise 7.6.
Steeper: stronger mean reversion damps the volatility of long rates more, so to reproduce later expiries into shorter swaps (whose volatility the market keeps high) must rise faster; with a larger the fit can even require large late volatilities. and trade off: the term structure of volatility is shared between them.
Exercise 7.7 ★★★
Coding. With tree_check, tabulate the tree’s error against Jamshidian’s price for monthly, fortnightly, weekly and half-weekly steps, and estimate the order of convergence.
Solution
Solution of Exercise 7.7.
Errors against 0.026018: (monthly), (fortnightly), (weekly), (half-weekly). Halving the step roughly halves the error until it changes sign: first order, as expected for a tree whose payoff has a kink at the strike.
Exercise 7.8 ★★★
Find the flaw. “Our one-factor Hull–White model reprices every co-terminal swaption, so it prices our CMS spread options correctly.” Correct it.
Solution
Solution of Exercise 7.8.
Repricing co-terminals fixes the volatility of each swap rate; a CMS spread option also needs the correlation between the ten-year and the two-year rate, which is one in any one-factor model: the spread’s volatility collapses and the option is badly underpriced. Use a two-factor model, or a copula of the two rates’ smiles, calibrated to a correlation.
7.9 Problem: One Sigma Is Not Enough
Problem 7.1
Weekend problem — calibrating a production Hull–White model
A bank’s overnight batch prices ten-year euro Bermudans callable every year with Hull–White, , on chapter 2’s €STR curve. The model validator asks why the front office uses a piecewise-constant when the documentation says “Hull–White with one volatility”.
Part I — The market.
- Which swaptions should the model fit, and why those?
- Give their volatility range and its shape.
- What does a rising co-terminal volatility say about forward volatility?
- Why is the curve not a calibration target?
- Why is fixed rather than fitted?
Part II — One sigma.
- Give the best constant .
- Give the model’s volatility range.
- Give the errors at one and nine years.
- Which exercises of the Bermudan are overpriced, which underpriced?
- Why can no single fix it with ?
Part III — Piecewise sigma.
- Give the first and highest levels of .
- Why does it fall in the last interval?
- Does the fitted model price the co-terminals exactly? Other swaptions?
- What does it assume about volatility beyond year nine?
- What is the risk of fitting nine numbers every day?
Part IV — Judgement.
- What would you write in the model documentation?
- Which test would convince the validator?
- What would a two-factor model add for this product, and what would it cost?
- State the named result: the errors with one and the range of the calibrated .
- In one sentence: what does a production short-rate model need to fit?
Solution
Solution of Problem 7.1.
1. The co-terminals into year ten: they are the Europeans the Bermudan can be exercised into, and its value lies between the largest of them and a price that depends on their joint dynamics. 2. 60.8 to 91.0 basis points, rising with expiry. 3. That the rate volatility expected later (for shorter remaining swaps) is higher than mean reversion with a flat would give. 4. The model reprices it by construction through . 5. It is poorly identified from one column of co-terminals; it trades off with . Desks fix it by convention or from the relation between co-terminal and other swaption volatilities, and keep it stable. 6. 86.0 basis points. 7. 76.0 to 76.7 basis points. 8. basis points at one year, at nine years. 9. Early exercises are overpriced (the model’s short expiries are too volatile), late ones underpriced. 10. With and constant , co-terminal volatilities are nearly flat in expiry, while the market’s rise by 30 basis points. 11. 68.7 basis points in the first year, 116.3 at the highest (years seven to eight). 12. The last co-terminal (nine into one) has a volatility of 91.0 only slightly above the eight-year’s; to reprice it with the earlier levels held, the last interval needs less. 13. Exactly the co-terminals; other swaptions only as far as and the fitted happen to reproduce them. 14. That it stays at the last level, 104.2 basis points. 15. Noisy parameters and P&L jumps from day to day; hedge ratios that change with the calibration rather than the market. Smooth or regularise, and monitor the parameters. 16. Hull–White with fixed at 3% and a piecewise-constant on the co-terminal expiries, fitted daily to the co-terminal at-the-money swaptions; its limits: one factor, flat smile, no fit to other swaptions. 17. Show the co-terminal fit errors with one and with nine volatilities, the stability of over past months, and the Bermudan’s price under both, against a benchmark model (a market model, chapter 8). 18. Imperfect correlation between the rates exercised into, which lowers the switch value between exercise dates; the cost is slower pricing, more parameters and a correlation to mark. 19. Named result: one sigma is not enough: the best constant volatility misses the co-terminals by basis points at one year and at nine; the fitted runs from 68.7 to 116.3 basis points. 20. The curve exactly and the volatilities of the options the product can become.
7.10 Interview questions
Interview question 7.1 ★ researcher, bank
What does mean reversion do in the Hull–White model, in terms a trader would use?
Solution
Solution of Interview question 7.1.
It pulls the short rate back towards its path, so shocks to it die out and long rates move less than short ones: it sets how volatility decreases with maturity (), and how correlated the exercises of a Bermudan are. A trader reads it as the model’s slope of volatility across tenors.
What the interviewer is looking for: mean reversion as a volatility-shape parameter.
Interview question 7.2 ★★ researcher
Derive the zero-coupon bond price in the Vasicek model.
Solution
Solution of Interview question 7.2.
is Ornstein–Uhlenbeck; given is normal with mean and variance ; so , an exponential-affine function of .
What the interviewer is looking for: Gaussian integral and the affine form.
Interview question 7.3 ★★ researcher, developer
How do you fit a trinomial tree to today’s discount curve?
Solution
Solution of Interview question 7.3.
Build the tree for the zero-mean state first; then step forward, carrying the Arrow–Debreu prices of each node; at each step choose the shift so that the sum of Arrow–Debreu prices times one-step discount factors equals the curve’s discount factor to the next date; update the Arrow–Debreu prices with the branching probabilities and the shifted rates.
What the interviewer is looking for: forward induction with Arrow–Debreu prices.
Interview question 7.4 ★★ trader, researcher
Which swaptions do you calibrate a one-factor model to for a ten-year Bermudan, and why not the whole matrix?
Solution
Solution of Interview question 7.4.
The co-terminal swaptions (each exercise date into the swap to the final date), because the Bermudan is exactly one of them once exercised; a one-factor model cannot fit the whole matrix, and fitting instruments the product never becomes spends parameters on irrelevant risks.
What the interviewer is looking for: the replication logic of the calibration set.
Interview question 7.5 ★★★ researcher, risk
What can a one-factor model not price, and how do you know when it matters?
Solution
Solution of Interview question 7.5.
Products depending on imperfect correlation between rates: spread options, curve-steepener exotics, and to a lesser degree Bermudans (switch value). Test by pricing with a two-factor model calibrated to the same instruments and measuring the difference; if it matters, use the richer model or reserve.
What the interviewer is looking for: correlation, and a benchmark to measure it.
Interview question 7.6 ★★★ developer
Your tree price of a European swaption differs from the closed form by 0.5%. How do you find out why?
Solution
Solution of Interview question 7.6.
Check the tree reprices discount factors (the fit); halve the step and see if the error halves (discretisation) or stays (a bug); compare zero-coupon bond options with the closed form; check the exercise date and schedule alignment with the tree’s grid, the branching at the edges and the probabilities (all in , summing to one).
What the interviewer is looking for: convergence study and component tests.