Lattice Methods, Part 1: Binomial Trees#
A binomial tree prices an option by building the stock price as a random walk on a grid. At each step the price goes up or down by a fixed factor, and the option is valued by working backwards from expiry. It is the simplest numerical method in the series, it is easy to audit, and it handles early exercise, which is why it remains in use. This is the first of two pages on lattice methods.
One step#
Suppose that the stock is \(S_0\), and after one step \(\Delta t\) it is \(S_0 u\) or \(S_0 d\). An option pays \(V_u\) or \(V_d\). A portfolio of the stock and the cash account can copy these two payoffs exactly, so the option is worth the cost of that portfolio, and no assumption about the real-world probability of an up move is needed. The price can be written as a discounted expectation under the risk-neutral probability \(p\):
The probability \(p\) is the one under which the stock grows at the risk-free rate on average, \(p u + (1-p) d = e^{r\Delta t}\). It is not a forecast. It must lie between 0 and 1, and that is the no-arbitrage condition \(d < e^{r\Delta t} < u\).
Many steps#
Chain \(n\) steps with \(\Delta t = T/n\). After \(i\) steps there are \(i + 1\) nodes, and the tree recombines: an up move followed by a down move gives the same price as a down move followed by an up move. This keeps the size small, since the number of nodes grows with \(n^2\) and not \(2^n\). The value at each node is the discounted risk-neutral average of the two values after it, from expiry back to today.
The Cox-Ross-Rubinstein choice of the factors is
It makes the volatility of the tree match \(\sigma\). Other choices, such as Jarrow-Rudd, place the nodes differently and converge in the same way.
From a random walk to Black-Scholes#
The log of the stock in the tree is a random walk with steps of \(\pm\sigma\sqrt{\Delta t}\). By the central limit theorem, as the steps become small and numerous, its distribution tends to the normal distribution that geometric Brownian motion gives, and the tree price tends to the Black-Scholes price:
The convergence is of first order: the error falls in proportion to \(1/n\). But the error is not smooth in \(n\). It oscillates, because the strike falls in a different place between two nodes for every \(n\).
Greeks from the tree#
The delta and the gamma come from the nodes at steps 1 and 2, with no extra work. The delta is the change of option value over the change of stock between the two nodes at step 1, and the gamma is the change of the delta between the nodes at step 2. The theta can be had from the centre node at step 2. The vega needs a second tree.
Worked example#
The example prices the benchmark call with 10 to 5,000 steps, shows the oscillation for consecutive step counts and its removal by averaging, reads the delta and gamma from the tree, and prices the put as a European and as an American option.
Python code
"""Cox-Ross-Rubinstein binomial tree: convergence to Black-Scholes, the oscillation, Greeks and American exercise."""
import numpy as np
from common import K, R, S0, SIGMA, T, bs_greeks, bs_price
def crr(n, call=True, american=False, s0=S0, k=K, r=R, sigma=SIGMA, t=T):
"""Tree price. Node j at step i has j up moves and i - j down moves, with stock s0 * u**(2j - i)."""
dt = t / n
u = np.exp(sigma * np.sqrt(dt))
p = (np.exp(r * dt) - 1 / u) / (u - 1 / u)
disc = np.exp(-r * dt)
payoff = (lambda s: np.maximum(s - k, 0)) if call else (lambda s: np.maximum(k - s, 0))
v = payoff(s0 * u ** (2 * np.arange(n + 1) - n))
for i in range(n - 1, -1, -1):
v = disc * (p * v[1:] + (1 - p) * v[:-1])
if american:
v = np.maximum(v, payoff(s0 * u ** (2 * np.arange(i + 1) - i)))
return v[0]
def crr_greeks(n):
"""Delta and gamma from the nodes at steps 1 and 2 of a call tree."""
dt = T / n
u = np.exp(SIGMA * np.sqrt(dt))
p = (np.exp(R * dt) - 1 / u) / (u - 1 / u)
disc = np.exp(-R * dt)
v = np.maximum(S0 * u ** (2 * np.arange(n + 1) - n) - K, 0)
keep = {}
for i in range(n - 1, -1, -1):
v = disc * (p * v[1:] + (1 - p) * v[:-1])
if i in (1, 2):
keep[i] = v.copy()
delta = (keep[1][1] - keep[1][0]) / (S0 * u - S0 / u)
s_uu, s_ud, s_dd = S0 * u**2, S0, S0 / u**2
delta_up = (keep[2][2] - keep[2][1]) / (s_uu - s_ud)
delta_down = (keep[2][1] - keep[2][0]) / (s_ud - s_dd)
return delta, (delta_up - delta_down) / (0.5 * (s_uu - s_dd))
if __name__ == "__main__":
exact = bs_price()
dt = 0.01
u = np.exp(SIGMA * np.sqrt(dt))
p = (np.exp(R * dt) - 1 / u) / (u - 1 / u)
print(f"One step of 0.01 years: up {u:.5f}, down {1 / u:.5f}, risk-neutral probability of up {p:.5f}")
print(f"Black-Scholes call {exact:.6f}\n")
print(f"{'Steps':>6} {'Tree price':>11} {'Error':>11} {'Error x steps':>14}")
for n in (10, 20, 50, 100, 200, 500, 1000, 2000, 5000):
price = crr(n)
print(f"{n:>6} {price:11.6f} {price - exact:+11.6f} {(price - exact) * n:+14.4f}")
print("\nThe error oscillates with the number of steps, because the strike falls between nodes in a different way each time:")
print(f"{'Steps':>6} {'Tree price':>11} {'Error':>11}")
for n in range(100, 106):
print(f"{n:>6} {crr(n):11.6f} {crr(n) - exact:+11.6f}")
avg = 0.5 * (crr(100) + crr(101))
print(f"Average of 100 and 101 steps: {avg:.6f}, error {avg - exact:+.6f}")
delta, gamma, _ = bs_greeks()
d_tree, g_tree = crr_greeks(500)
print(f"\n500 steps: delta {d_tree:.5f} (exact {delta:.5f}), gamma {g_tree:.5f} (exact {gamma:.5f})")
# American put: exercise is compared with continuation at every node.
n = 2000
eur_put, amer_put = crr(n, call=False), crr(n, call=False, american=True)
print(f"\nPut, {n} steps: European {eur_put:.5f} (Black-Scholes {bs_price(call=False):.5f}), American {amer_put:.5f}, "
f"early exercise premium {amer_put - eur_put:.5f}")
print(f"American call on a stock with no dividend: {crr(500, american=True):.5f} against European {crr(500):.5f}")
The output is:
One step of 0.01 years: up 1.02020, down 0.98020, risk-neutral probability of up 0.50250
Black-Scholes call 9.413403
Steps Tree price Error Error x steps
10 9.217851 -0.195552 -1.9555
20 9.314897 -0.098507 -1.9701
50 9.373839 -0.039564 -1.9782
100 9.393596 -0.019808 -1.9808
200 9.403493 -0.009910 -1.9820
500 9.409438 -0.003966 -1.9828
1000 9.411420 -0.001983 -1.9830
2000 9.412412 -0.000992 -1.9832
5000 9.413007 -0.000397 -1.9832
The error oscillates with the number of steps, because the strike falls between nodes in a different way each time:
Steps Tree price Error
100 9.393596 -0.019808
101 9.432072 +0.018669
102 9.393984 -0.019420
103 9.431709 +0.018306
104 9.394357 -0.019047
105 9.431360 +0.017957
Average of 100 and 101 steps: 9.412834, error -0.000569
500 steps: delta 0.59866 (exact 0.59871), gamma 0.01936 (exact 0.01933)
Put, 2000 steps: European 6.45697 (Black-Scholes 6.45796), American 6.74252, early exercise premium 0.28556
American call on a stock with no dividend: 9.40944 against European 9.40944
Reading the output:
The convergence is first order. The error times the number of steps settles at about -1.98, so the error is \(-1.98/n\). Ten times the steps gives one tenth of the error. At 5,000 steps it is 0.0004.
The error alternates. With an even number of steps there is a node exactly at the strike, since the stock at the centre node is \(S_0 = K\), and the price is too low. With an odd number the strike falls between two nodes, and the price is too high. The error is about -0.019 and +0.018 for steps near 100. This is why a single tree price at one step count is not a safe test of convergence.
Averaging two consecutive step counts removes most of it. The average of 100 and 101 steps has an error of -0.0006, a thirty-fold improvement.
The Greeks come free. At 500 steps the delta is 0.59866 against 0.59871, and the gamma is 0.01936 against 0.01933.
An American put is worth more than a European put, by 0.286, since the holder can exercise early. An American call on a stock that pays no dividend is worth the same as the European call, 9.40944, because it is never optimal to exercise it early. Lattice Methods, Part 2: Trinomial Trees & Early Exercise takes this further.
A valuation control view#
Test convergence at several step counts, both odd and even: a price from one step count can sit on either side of the true value by an amount that looks like a model difference. The average of two consecutive counts, or a smoothing method, is a better reference.
Check the probability: \(0 < p < 1\). With a high interest rate, a low volatility or a long step, \(p\) can fall outside the range, and the tree then produces negative probabilities and a price that is wrong without any warning.
Use the tree as an independent check on a more complex engine: its simplicity makes it easy to audit, and it solves the same model as a Black-Scholes closed form, a finite difference scheme and a Monte Carlo on the same inputs.
Check the dividends and the discount curve: a tree with constant rates and no dividends is a simplification. Discrete dividends and a term structure of rates change the tree, and the tests should use the actual conventions of the product.
Look at the Greeks as well as the price: they do not oscillate like the price does. Between 50 and 103 steps the delta is within 0.0007 of the exact value and the gamma within 2%, and both change little between odd and even step counts. But they are still first-order approximations, and the tolerance for risk should be set separately from the tolerance for the price.
Next, Lattice Methods, Part 2: Trinomial Trees & Early Exercise covers the trinomial tree and early exercise.