Sub topic 11
Building a binomial interest rate tree
This chapter assumes you can discount cash flows at spot rates, read an implied forward rate off a spot curve, and compute a bond's expected value from probabilities. You will build a tree of one-period interest rates and calibrate it so that it reprices the spot curve exactly. The next chapter uses that tree to value bonds.
What the tree is for
Discounting at spot rates works for a bond whose cash flows are fixed. A callable or putable bond has cash flows that depend on future interest rates. To value it you need a model of how rates might evolve. The binomial interest rate tree is a simple version of that model.
At each date, the one-period rate can move to one of two values: a lower or a higher one. The tree has three defining properties.
- Risk-neutral probabilities. Each branch has probability 0.5. The probabilities are a convenience of the calibration and not a forecast.
- Lognormal spacing. The rates at one date are equal to the lowest rate multiplied by powers of e^(2σ). Here σ is the assumed annual volatility of the one-period rate.
- Calibration to the curve. The rates are chosen so the tree reproduces the price of each zero-coupon bond on the current spot curve.
The third property makes the tree arbitrage-free. A tree that misprices a Treasury zero would give a different value from the market for the same cash flow.
Structure of the tree
The tree is recombining. An up move followed by a down move reaches the same node as a down move followed by an up move. So date t has t + 1 nodes, not 2^t, and a three-year tree needs only six rates. Each rate at a node is the one-period rate that applies from that date to the next.
The root is the current one-year spot rate. For later dates, write r_L for the lowest rate at that date. The other rates follow from the volatility rule.
| Date | Rates at that date |
|---|---|
| 0 | r0 (the observed 1-year spot rate) |
| 1 | r1L, r1L·e^(2σ) |
| 2 | r2L, r2L·e^(2σ), r2L·e^(4σ) |
Only the lowest rate at each date is unknown. That gives one unknown per date and one spot rate per date to match, so the system can be solved date by date.
Calibration, step by step
Use the spot curve from earlier chapters: 2%, 3% and 4% for 1, 2 and 3 years. Set σ = 10%, so e^(2σ) = e^0.2 ≈ 1.2214.
Date 0. The root equals the 1-year spot rate, 2%.
Date 1. The 2-year zero must be worth 1 / 1.03² ≈ 0.942596. On the tree its value is
0.942596 = 0.5 × (1 / (1 + r1L) + 1 / (1 + r1H)) / 1.02, with r1H = r1L × 1.2214.
No closed form exists, so you search for r1L by trial and error or with a solver. Trying 3% gives a left side that is too high, because the rates are too low. Trying 4% gives one that is too low. The solution is about r1L = 3.61%, so r1H ≈ 4.41%.
Date 2. Repeat with the 3-year zero, worth 1 / 1.04³. The two rates already found are fixed. You now solve for r2L, and r2M and r2H follow from the spacing rule.
Compare the date 1 result with the 1-year-forward-1-year rate from the spot curve: 1.03² / 1.02 − 1 ≈ 4.01%. The average of 3.61% and 4.41% is also about 4.01%, but slightly higher. A discount factor is convex in the rate, so the tree rates must average a little above the forward rate to produce the same price.
Code: calibrate and verify
The program below calibrates the lowest rate at each date by bisection. It then checks the result by pricing a 3-year 5% annual coupon bond on the tree. The check value should equal the spot-curve price, which is about 102.96.
import math
def zero_price(rates):
# rates[t][i] is the rate at date t in state i, lowest rate first.
# Returns the price of a zero-coupon bond maturing at date len(rates).
values = [1.0] * (len(rates) + 1)
for t in range(len(rates) - 1, -1, -1):
values = [0.5 * (values[i] + values[i + 1]) / (1 + r)
for i, r in enumerate(rates[t])]
return values[0]
def build_tree(spots, sigma):
rates = [[spots[0]]]
for t in range(1, len(spots)):
target = 1 / (1 + spots[t]) ** (t + 1)
lo, hi = 0.0, 1.0
for _ in range(100):
mid = (lo + hi) / 2
row = [mid * math.exp(2 * sigma * i) for i in range(t + 1)]
if zero_price(rates + [row]) > target:
lo = mid # model price too high, so the rates are too low
else:
hi = mid
base = (lo + hi) / 2
rates.append([base * math.exp(2 * sigma * i) for i in range(t + 1)])
return rates
def bond_value(coupon, face, rates):
values = [face] * (len(rates) + 1) # ex-coupon values at maturity
for t in range(len(rates) - 1, -1, -1):
values = [0.5 * ((values[i] + coupon) + (values[i + 1] + coupon)) / (1 + r)
for i, r in enumerate(rates[t])]
return values[0]
spots = [0.02, 0.03, 0.04]
tree = build_tree(spots, sigma=0.10)
for t, row in enumerate(tree):
print(t, [round(r, 4) for r in row])
print(bond_value(5, 100, tree))The second row prints close to 0.0361 and 0.0441. The final line prints about 102.96. Because the bond is a package of zero-coupon bonds and the tree prices each of those correctly, the tree and spot-curve prices agree. If they do not, the calibration is wrong.
Common errors
- Treating the tree rate as the forward rate. Node rates differ from forward rates, and their average sits slightly above the forward rate because of convexity.
- Calibrating to par rates or yields to maturity. The target prices come from spot rates, or equivalently from discount factors. If you only have par rates, bootstrap first.
- Forgetting that the lowest rate at each date moves everything else. Changing r1L changes r1H through the volatility rule.
- Mixing up date and node indexing. The rate at date t is used for discounting from date t to t + 1. A bond maturing at date 3 needs rates only through date 2.
- Adding the coupon in the wrong place. In the next chapter, the coupon paid at a node is added to the next-date values before discounting. The maturity value is face plus the final coupon.
- Reading σ as an output. Volatility is an input. A higher σ spreads the rates apart, and the calibration then lowers the whole tree so that the price still matches.
Exercise
In the tree above, the lowest date 1 rate is 3.61% and σ = 10%. What is the higher date 1 rate, and how many one-period rates does a four-year tree contain?
Show answer
The higher rate is 3.61% × e^(0.2) ≈ 3.61% × 1.2214 ≈ 4.41%. A four-year tree has rates at dates 0, 1, 2 and 3, with 1, 2, 3 and 4 nodes respectively, so 1 + 2 + 3 + 4 = 10 one-period rates.
Exercise
You build a tree from a 2%, 3%, 4% spot curve, then price a 3-year zero-coupon bond with face value 100 on it. What price should you get, and what does a different result tell you?
Show answer
The price should be 100 / 1.04³ ≈ 88.90, the same as discounting at the 3-year spot rate. A different result means the tree is not calibrated to the spot curve, for example because a rate was solved incorrectly or the target prices came from the wrong curve.