Binomial Model: Generalized n-Period

Turn binomial paths into terminal-node weights, work a three-step call price by summation and backward induction, then check the Python output and a put exercise.

So far we’ve done the one-period and two-period binomial models. This page explains the European option’s weighted terminal-payoff sum, using the same tree idea. It doesn’t derive the full CRR calibration from scratch.

For a numerical checkpoint, work the three-step tree before running the 1,000-step code. You will use option payoffs, combinations, powers and discounting.

Now it’s time to go full n-period.

In other words — generalization time.

Let me just throw the generalized formula at you first.

Then I’ll go back and unpack it piece by piece, so

PLEASE do not panic when you see what I’m about to drop on you!!!!!!

※Warning: Heart attack risk ahead※

Equation from the original notes

The same formula in text is

$$ V_0=e^{-rT}\sum_{j=0}^{n}w_jh(S_{n,j}), $$

where $S_{n,j}=S_0u^jd^{n-j}$ and $w_j=\binom{n}{j}p^j(1-p)^{n-j}$. Here $j$ counts up moves, $h(S)=\max(S-K,0)$ for a call, and $h(S)=\max(K-S,0)$ for a put. The later sketches count down moves in places; $n-j$ converts between those two conventions. A path’s weight lacks the combination factor; a terminal node collects all paths with the same up-move count.

We use a recombining tree with constant step parameters, European exercise and no trading frictions. In this no-dividend setup, the discount rate $r$ is continuously compounded. CFA Institute’s public binomial-model summary explains why the risk-neutral weights price a replicating claim rather than forecast the stock.

AAAA!!!!!!! My heart literally stopped… ;_; Ahhh…..

OK to make sense of this monster, let’s pull up the two-period formula one more time.

Equation from the original notes

Phew… so why did that sigma (Σ) suddenly show up in the generalized version?!?!

Honestly, it’s just there to write the weighted sum in a compact way. That’s it.

Now let’s go through the new characters one by one before moving on.

First up: what is p?!?!?!?!?! Wasn’t there supposed to be a ρ (rho) sitting in that spot?!?!?!

  • Originally, rho was written as

Equation from the original notes

which we plugged in as a risk-neutral pricing probability: ρ weights the up outcome, and (1-ρ) weights the down outcome. These are weights for no-arbitrage valuation, not forecasts of how often the market will actually go up or down.

But now we can’t talk about T anymore. Instead of “over T,” we have to say “over a unit of time.”

We take the whole T, slice it into tiny little pieces, and ask: does the price go up or down during this one little slice? —

That’s the lens we have to look through now.

Equation from the original notes

Ah, OK, p is sorted. They just wrote p instead of the letter rho… heh.

In the no-dividend equations here, $p=(e^{r\Delta t}-d)/(u-d)$. We need $d\lt e^{r\Delta t}\lt u$, so the pricing weight lies between zero and one. Each step uses the same model inputs. That’s the condition behind treating these as probabilities; the little geometric sketch is a way to remember the ratio, not a way to estimate real-world odds.

(But let me drop a quick word on why this thing can be interpreted as a “probability.” I think of it as something like a “geometric probability.”

First, exp(rΔt) is the amount value automatically grows by (call it a multiplier).

u is the multiplier when it goes up, d is the multiplier when it goes down. So u-d is the total “size” of the move, and exp(rΔt)-d is the chunk of that u-d size that’s in the upward direction.

I’ll toss a little diagram down below. heh heh heh)

Equation from the original notes

Second: what on earth is u?????

Equation from the original notes

EXCUSE ME?!?!?!?!

Why is the up-rate u defined in that form, using σ and time —

apparently the answer to that question I cannot give you right now… ;; ;; ;_;

I’m sorry. My math is not strong enough yet. ;; ;;

(And honestly, volatility itself isn’t even a constant — it’s tangled up with other variables in really intricate ways… strictly speaking that’s the deal, but I can’t get into that right now either, so for now we’ll just treat it as a constant and crunch through problems.)

Third: u = 1/d

The reason for this lives inside the Cox-Ross-Rubinstein model… heh. heh.

So here we’ll use those CRR up/down choices as the model assumptions and concentrate on reading the sum. The next post is American options , not a promised CRR derivation.^^heh

Now, about that weighted sum —

it’s a simple object that anyone can read, but I still want to ramble about it for a sec before moving on.

Equation from the original notes

For example, take 31 terminal stock-price nodes at maturity T, with one option payoff at each. Some payoffs can be the same — especially zero — so this need not mean 31 different payoff values.

We need to take the weighted sum of those 31. That’s the whole job of the sigma.

So first off, with what probability does

Equation from the original notes

— the value sitting at a_1 — actually show up?

Since it had to go up 30 times in a row, the probability is p^30.

(One period: 2 cases. Two period: 3 cases. So 31 cases means we’re in 30 periods right now.) And the number of ways this particular outcome can happen is 1.

But instead of just saying “the count is 1,” to really feel the weighted sum, it might be cleaner to write it as

Equation from the original notes

cases.

What about a_2???? a_2 means: out of 30 price-move opportunities, it went down exactly once and up the other 29 times.

One particular path to a_2 has pricing weight (p^29)*(1-p). To get the terminal node’s full weight, multiply by the number of places that one down-move could occur:

And the number of ways this can happen — out of 30 opportunities, we just pick which 1 of them is the down move — so we get

Equation from the original notes

cases.

One more at the end! Let’s just do a_17! Pure arbitrary pick!

a_17 is the option value after 16 down-moves and 14 up-moves out of 30 chances, so

each particular path has pricing weight (p^14)((1-p)^16). Multiply by the number of such paths to get the terminal-node weight. That number is

Equation from the original notes

.

Phew.

OK so now the meaning of that weighted sum is also kinda… clicking, why it adds up the way it does!!! heh heh heh

Equation from the original notes

PS

  • The thing that becomes the weighted sum is

Equation from the original notes

which is the call option’s payoff at maturity. The discount factor outside the sum brings the weighted payoff back to today.

But I didn’t spell that out above, because the call’s terminal payoff —

it could be some number, sure, but it could also just be zero (because it’s nonlinear), so I had loosely called it “call price” above!!!

So among those, some entries could be zero. heh heh

Equation from the original notes

Equation from the original notes

Work a three-step tree by hand

Use $S_0=100$, strike $K=100$, three one-year steps, $u=1.2$ and $d=1/1.2=5/6$. The risk-free account grows by 1.04 per step. Thus $T=3$, $n=3$, $\Delta t=1$ and the continuously compounded rate is $r=\log(1.04)$, not 0.04. These illustrative CRR inputs correspond to $\sigma=\log(1.2)$ because $u=e^{\sigma\sqrt{\Delta t}}$; there are no dividends.

The no-arbitrage condition holds: $5/6<1.04<1.2$. The pricing weight is

$$ p=\frac{1.04-5/6}{1.2-5/6}=\frac{31}{55}\approx0.563636. $$

For two up moves, UUD, UDU and DUU all end at $100(1.2)^2(5/6)=120$. Each path has weight $p^2(1-p)$, so this terminal node has weight $3p^2(1-p)$.

Up moves $j$ (paths) Terminal stock Call payoff Node weight
0 (1) 57.870370 0 0.083089
1 (3) 83.333333 0 0.321971
2 (3) 120.000000 20 0.415880
3 (1) 172.800000 72.80 0.179059

The four exact weights sum to one by $(p+(1-p))^3=1$. There are eight paths but only four terminal stock nodes. The weighted terminal payoff is approximately $0.4158797896(20)+0.1790593539(72.8)=21.353117$. Keep full precision internally; the table is rounded.

That payoff is valued at year 3. Discount it for all three years:

$$ C_0=\frac{21.3531167543}{1.04^3}\approx18.982843. $$

Using a one-step discount factor here would value the payoff at year 2, not today. Also, the stock’s pricing-weighted terminal value is $100(1.04)^3=112.4864$. That is a useful check on the weights; it is not a real-world stock-price forecast.

Check the answer by working backward

At each earlier node use $V=[pV_{\rm up}+(1-p)V_{\rm down}]/1.04$. After two steps, the middle stock node is 100. Its next-step call payoffs are 20 and 0, so its value is $p(20)/1.04=10.839161$.

Applying the same operation to every node gives these call values, listed from the lowest-stock node to the highest at each date:

Date Call values
Year 3: payoffs 0; 0; 20; 72.80
Year 2 0; 10.839161; 47.846154
Year 1 5.874370; 30.478508
Year 0 18.982843

The terminal sum groups all paths first; backward induction prices one step at a time. They agree because they use the same payoffs, weights and three discount periods. Neither calculation allows early exercise.

Try the put on this same tree

Keep every input fixed and replace the call by a European put with strike 100. Write all four terminal payoffs before weighting them. Then check whether call minus put equals $100-100/1.04^3$.

Show the three-step put solution

From the lowest to highest terminal stock price, the put payoffs are 42.129630, 16.666667, 0 and 0. Weight them by the same four node probabilities and divide by $1.04^3$. The result is 7.882479. The difference $18.982843-7.882479=11.100364$ agrees with $100-100/1.04^3$, the no-dividend European put-call parity check. Changing the payoff does not change the tree’s pricing probabilities.

Running the same example

The VBA screenshot above reports 14.228309… for the parameters shown there. The Python version below uses the same inputs and should print about 14.2283. You’ll need Python with NumPy, SciPy and Matplotlib available. The image is saved in the directory where you run the script; my old private Desktop folder isn’t required.

One naming trap: the code’s argument d is the continuous dividend yield (zero in the shown call), while dn is the down multiplier. rho is the one-step risk-neutral pricing weight. The plot repeats the calculation across the displayed stock-price grid, so it takes longer than the single printed price.

import math
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as sc
def Binomial_European_n_period(s=100, k=100, rf=0.05, t=1, n=1000, v=0.3, d=0, op=True, vu=0):
    dt = t / n
    up = math.exp(v * math.sqrt(dt))
    dn = 1 / up
    r = math.exp((rf - d) * dt)
    df = 1 / math.exp(rf * t)
    rho = (r - dn) / (up - dn)
    if op == True:
        callput = 1
        callput_str = 'call'
    else:
        callput = -1
        callput_str = 'put'
    for i in range(n+1):
        st = s * (up ** i) * (dn ** (n - i))
        vu = vu + sc.binom(n, rho).pmf(i) * max(callput * (st - k), 0) * df
    return vu, callput_str
vu, str = Binomial_European_n_period(s=100, k=100, rf=0.05, t=1, n=1000, v=0.3, d=0, op=True, vu=0)
print("European " + str + " option price is", vu)

To reproduce the small tree, run this after the function definition above:

for is_call in (True, False):
    value, kind = Binomial_European_n_period(
        s=100, k=100, rf=math.log(1.04), t=3, n=3,
        v=math.log(1.2), d=0, op=is_call, vu=0
    )
    print(f"{kind}: {value:.6f}")

Expected output is call: 18.982843 and put: 7.882479. Pass vu=0 for a fresh valuation; it is the original function’s running sum. The 1,000-step result of about 14.2283 belongs to the different inputs in the original call above, not to this three-step example. This terminal-payoff sum is for European exercise; the American-options note explains why earlier exercise needs another decision at intermediate nodes.

To regenerate the chart above, the following optional plotting step reuses the function in the same Python session. It repeats the calculation across the stock-price grid.

SS = np.linspace(0, 200, 1000)
YY = np.zeros(len(SS))
for i in range(len(SS)):
    YY[i], str = Binomial_European_n_period(s=SS[i])
plt.figure(figsize=(6, 4))
plt.plot(SS, YY)
plt.xlabel('S')
plt.ylabel('P')
plt.title('Binomial_European n period')
plt.savefig('Binomial_European n period.png', dpi=200)

That’s the sum: payoff at each terminal node × its full binomial pricing weight, then discount to today. Once that makes sense, continue with American options #7 to consider exercise before maturity.

Questions or corrections?

Did a step lose you, or does a number look off? Email me or use the contact page. Include the note title and the step or figure you mean.

Feedback goes to me privately by email; it is not posted as a public comment.