Professional Documents
Culture Documents
Binomial Tree Method
Binomial Tree Method
1 Binomail
ia
Before giving the algorithm, we first recall for the formula to calculate the coefficients in the discrete
binomial model:
1 2)
p 1 er t d
r t
x = (e + e(r+ t
), d=x x2 1, u= , p= . (1.1)
2 d u d
and the formula to calculate the initial price of the option
m+1
Vjm = e r t
(pVj+1 + (1 p)Vjm ), j = 0, ..., m and m = 0, ..., M. (1.2)
The following algorithm is to compute European put/call option price by using binomial tree:
We will write a Matlab code for the above algorithm with parameters: K = 10, S = 5, r = 0.06,
1
= 0.3 and T = 1:
clear
T = 1;
K
E = 10; S = 5; r = 0.06; sigma = 0.3; M = 64;
dt = T/M;
x = 0.5 ⇤ (exp( r ⇤ dt) + exp((r + sigma ⇤ sigma) ⇤ dt));
u = x + sqrt(x ⇤ x 1); d = 1/u; p = (exp(r ⇤ dt) d)/(u d);
W = zeros(M + 1, 1);
W(1) = S;
for i = 1 : M 12 3 EM
W4743500 Wmata
for n = i :
I 1:1
v43 n'Sco
W(n + 1) = u ⇤ W(n); W 2 ago
end w2 adsia I
W(1) = d ⇤ W(1); 5101 wit ds
wind's
end
Wind's
Vmm
for n = 1 : M + 1 W Mtl
W(n) = max(E W(n), 0); WCM VM
end
for i = M : 1:1
for n = 1 : i W1 Vom
wlmtvm.tl