Binomial price tree (source code)

= Binomial price tree

A <binomial price tree> lists the possible stock prices in the <Cox--Ross--Rubinstein model>. Starting at $S_0$, each step multiplies the price by $U$ or $D$, with $0<D<U$. After $n$ steps and $k$ up moves,
$$
S_{n,k}=S_0U^kD^{n-k}.
$$
Constant multiplicative steps make the tree recombine: an up move followed by a down move reaches the same price as a down move followed by an up move. Thus level $n$ has $n+1$ prices despite $2^n$ possible paths.

For $S_0=100$, $U=1.1$, $D=0.9$, the second-level prices are $121,99,81$. With risk-free multiplier $R=1$, the no-arbitrage up probability is $q=(R-D)/(U-D)=1/2$. A European call with strike 100 pays $21,0,0$ at that level, so its model value is $R^{-2}q^2\cdot21=5.25$. This probability is determined by replication and discounting, not a forecast of the physical chance of an up move.<Option Pricing: A Simplified Approach by John C. Cox and others>[Section 3, binomial replication and multiperiod valuation]{ref}