computational finance - logowanieapalczew/cfp_lecture1.pdf · 2011-10-10 · literature rüdiger...

36
Computational Finance Computational Finance – p. 1

Upload: others

Post on 15-Jul-2020

11 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Computational Finance

Computational Finance – p. 1

Page 2: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Outline

Binomial model: option pricing and optimal investment

Monte Carlo techniques for pricing of options

pricing of non-standard options

improving accuracy of Monte Carlo method

solving Stochastic Differential Equations (SDE)

pricing of exotic options

pricing of options in stochastic volatility models

Partial Differential Equations (PDE)

numerical methods

the Black-Scholes equation for non-standard options

Computational Finance – p. 2

Page 3: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Literature

Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer,2006

John C. Hull, Options, Futures, and Other Derivatives, Sixth Edition,Prentice Hall, 2006

John C. Hull, Options, Futures, and Other Derivatives, Fifth Edition,Prentice Hall, 2003

Justin London, Modeling Derivatives in C++, Wiley Finance, 2005

Paul Glasserman, Monte Carlo Methods in Financial Engineering,Springer, 2004

Computational Finance – p. 3

Page 4: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Lecture 1

Discrete Time Finance

Lecture Notes

by Jan Palczewski

with additionsby Andrzej Palczewski

Computational Finance – p. 4

Page 5: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Discrete Time Finance

1. Time t = 0, 1, 2, . . . , T .

2. A probability space (Ω, P) with the filtration (Ft)t=0,...,T .

3. A money market account (Bt), which evolves according to Bt = (1 + r)t

or Bt = ert.

4. A risky financial asset whose price is given by a stochastic process

(

St

)

t=0,...,T

which is assumed to be (Ft)-adapted.

5. A family T of adapted self-financing trading strategies.

6. Risk neutral probability measure.

Computational Finance – p. 5

Page 6: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Binomial model

S2 = S0u2 ω1

S1 = S0u

pu 33ffffffff

1−pu

++XXXXXXXX

S2 = S0ud ω2

S0

pu

88ppppppppppp

1−pu

&&NNNNNNNNNNN

S2 = S0du ω3

S1 = S0d

pu 33ffffffff

1−pu

++XXXXXXXX

S2 = S0d2 ω4

B0 = 1 // B1 = 1 + r // B2 = (1 + r)2

Parameters: u, d, r, S0, p.

Computational Finance – p. 6

Page 7: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

We change the Binomial Model slightly. We do not assume that the timeelapsing between two consecutive stock price movements is 1, but wechoose a time step, which we denote by ∆t. The terminal time T is constant.Thus, the smaller ∆t the more accurate the model (it has more time periodssqueezed into the interval [0, T ]). These are our time points:

i ∆t, i = 0, 1, 2, . . . ,T

∆t.

We will use the notation Si = Si ∆t, Bi = Bi ∆t.

For the sake of consistency we shall assume that

Bi = er i∆t,

soBi+1

Bi= er∆t.

Computational Finance – p. 7

Page 8: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

A new binomial model

S2 = S0u2 ω1

S1 = S0u

pu 33gggggg

1−pu

++WWWWWW

S2 = S0ud ω2

S0

pu

88qqqqqqqqqqq

1−pu

&&MMMMMMMMMMM

S2 = S0du ω3

S1 = S0d

pu 33gggggg

1−pu

++WWWWWW

S2 = S0d2 ω4

B0 = 1 // B1 = er∆t // B2 = e2r∆t

Parameters: u, d, r, S0, p.

Computational Finance – p. 8

Page 9: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Properties

In the Binomial Market Model

Si(ω)

Si−1(ω)∈ u, d, ω ∈ Ω.

We assume that u > d.

Theorem. The model is arbitrage free if and only if

u > er∆t > d.

Theorem. If the model is arbitrage free, then it is complete.

Computational Finance – p. 9

Page 10: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Explanation

If there is only one risky asset in the multi period market model then:

There are no arbitrage if and only if all the constituent single periodmodels are arbitrage-free.

All risk neural measures can be computed by considering constituentsingle period market models.

Single period market models give conditional probabilities for risk neutralmeasures.

Single period market models can be used to compute prices ofcontingent claims.

Computational Finance – p. 10

Page 11: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Contingent claims

European path-independent options

payoff given by h(ST )

European call and put options

European binary call and put options

European path-dependent options

Asian options (calls and puts on the average of the stock price)

Barrier options

Lookback options

American options

they can be exercised anytime before or at maturity

the payoff at the exercise moment t is h(St)

Computational Finance – p. 11

Page 12: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Pricing of European options - first draft

'

&

$

%

Input: u, d, r, S0, T , M (number of periods).

Compute one-period risk neutral probability p∗.Construct a tree.Compute values in the leaves of the tree (payoffs).

For i from M − 1 to 0 docompute values in each node in the period i using one-periodbinomial formula (using p∗) and using values computedin the previous step

Output: the value in the root of the tree is the price of the option

In above sketch of the algorithm the period length ∆t is equal to TM .

Computational Finance – p. 12

Page 13: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Computational complexity

Computational complexity plays a major role in the construction of numericalalgorithms. It says how the amount of resources required by the algorithmgrows with the size of the problem (eg. number of periods in the BinomialModel). There are two main types of resources:

memory (RAM)

time

For the algorithm from the previous slide

memory requirement is proportional to 2M+1

time is proportional to 2M+1

Computational Finance – p. 13

Page 14: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Computational complexity made practical

Why is the computational complexity so important?

Assume that one byte is enough for each node. To simulate M = 100 periodswe need

2101 Bytes = 291 kBytes = 281 MBytes = 261 TBytes (!)

Path-independent options: the values in many of nodes of the tree areidentical (for a simple example draw a tree for n = 3). We can glue identicalnodes into one node -> recombining binomial tree.

Computational Finance – p. 14

Page 15: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Recombination of the binomial tree

S0u4

55kkkkkk

((QQQQQQQ

S0u3

55kkkkkkk

))TTTTTT

S0u2

55kkkkkk

))SSSSSS S0u3d

66mmmmmm

((QQQQQQ

S0u

66mmmmmm

((RRRRRR S0u2d

55kkkkkk

))TTTTTT

S0

66nnnnnn

((PPPPPP S0ud

55kkkkkk

))SSSSSS S0u2d2

66mmmmmm

((QQQQQQ

S0d

66mmmmmm

((RRRRRR S0ud2

55kkkkkk

))TTTTTT

S0d2

55kkkkkk

))SSSSSS S0ud3

66mmmmmm

((QQQQQQ

S0d3

55kkkkkkk

))TTTTTTT

S0d4

66mmmmmmm

))SSSSSSS

Recombining tree can only be used to price path independent options andAmerican options!!!!!

Computational Finance – p. 15

Page 16: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Recombination of the binomial tree

S44

66llllll

''OOOOOO

S33

66llllll

((RRRRRR

S22

66llllll

((RRRRRR S34

77oooooo

''OOOOOO

S11

66llllll

((RRRRRR S23

66llllll

((RRRRRR

S00

66llllll

((RRRRRR S12

66llllll

((RRRRRR S24

77oooooo

''OOOOOO

S01

66llllll

((RRRRRR S13

66llllll

((RRRRRR

S02

66llllll

((RRRRRR S14

77oooooo

''OOOOOO

S03

66llllll

((RRRRRR

S04

77oooooo

((RRRRRR

Recombining tree can only be used to price path independent options andAmerican options!!!!!

Computational Finance – p. 16

Page 17: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Properties

Denote by Sji the price after i periods with j being the number of up moves:

Sji = S0ujdi−j .

Theorem. There exists a risk neutral measure (probability) given by theformula

p∗ =er∆t − d

u − d

Under this measure disconted stock prices e−ri∆tS(i∆t) form a martingale,i.e.

Sji = e−r∆t(

p∗Sj+1,i+1 + (1 − p∗)Sj,i+1

)

Computational Finance – p. 17

Page 18: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Pricing contingent claims

Let h be the payoff function and Vji denote the value process of thereplicating strategy as known in the node Sji. Then

VjM = h(SjM ), j = 0, 1, . . . , M.

European options: computation:

Vji = e−r∆t(

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

)

American options: computation:

Vji = max(

h(Sji), e−r∆t

(

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

))

.

Computational Finance – p. 18

Page 19: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

European options'

&

$

%

Input: u, d, r, S0, T , M (number of periods).

∆t = T/M, p∗ =er∆t

− d

u − d

S00 = S0

SjM = S00ujdM−j , j = 0, 1, . . . , M

For j from 0 to M do VjM = h(SjM )

For i from M − 1 to 0 doVji = e−r∆t

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

Output: V00

Computational Finance – p. 19

Page 20: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

American options'

&

$

%

Input: u, d, r, S0, T , M (number of periods).

∆t = T/M, p∗ =er∆t

− d

u − d

S00 = S0

For i from 0 to M

For j from 0 to i do Sji = S00ujdi−j

For j from 0 to M do VjM = h(SjM )

For i from M − 1 to 0 doVji = max

h(Sji), e−r∆t

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

””

Output: V00

Computational Finance – p. 20

Page 21: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Computational complexity

For the algorithm from the previous slide

memory size is proportional to (M+1)(M+2)2 , which means it grows like M2

time is proportional to (M+1)(M+2)2 , which means it grows like M2

To simulate M = 100 periods we need

101 ∗ 102/2 = 5151 nodes.

Is there any hope for path-dependent options? Yes, Monte Carlo methods.

Computational Finance – p. 21

Page 22: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Binomial model in practice

S2 = S0u2 ω1

S1 = S0u

pu 33gggggg

1−pu

++WWWWWW

S2 = S0ud ω2

S0

pu

88qqqqqqqqqqq

1−pu

&&MMMMMMMMMMM

S2 = S0du ω3

S1 = S0d

pu 33gggggg

1−pu

++WWWWWW

S2 = S0d2 ω4

B0 = 1 // B1 = er∆t // B2 = e2r∆t

Parameters:

unknown: u, d, pu known: r, S0

Computational Finance – p. 22

Page 23: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Calibration of the model

The parameters r and S0 can be observed on financial markets, but theparameters u and d are only model idealizations and cannot be directlydetermined by observation of the real world data. We need to construct analgorithm to find u and d. It is called “calibration of the model”.

People trading in stock markets study a different parameter, which they callvolatility, and which reflects a property of the continuous time model, knownas the Black-Scholes model. In the Black-Scholes model asset prices followthe dynamics

St = S0e(µ− 1

2σ2)t+σWt , S0 > 0,

where Wt is a Brownian Motion, σ is a volatility and µ is a growth rate.

Computational Finance – p. 23

Page 24: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Distribution of returns

For τ > 0

log

(

St+τ

St

)

∼ N(

(µ − 1

2σ2)τ, σ2τ

)

,

where N(

(µ − 12σ2)τ, σ2τ

)

stands for a normal distribution with the mean

(µ − 1

2σ2)τ

and the variance

σ2τ.

We wish to compute the volatility σ (in the risk neutral world the knowledge ofµ is not needed).

Computational Finance – p. 24

Page 25: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Estimation of the volatility of a stock price: The stock price is usuallyobserved at fixed intervals of time (e.g. every day, week, or month). Define

n + 1 – the number of observations (numbered 0, 1, . . . , n);

Si – observed stock price at the end of i-th interval, i = 0, 1, . . . , n;

τ – length of time interval in years (can be different from ∆t in thebinomial model).

Let

ui = logSi

Si−1

, i = 1, . . . , n.

The usual estimate of volatility requires computation of the empiricalvariance:

s2 =1

n − 1

n∑

i=1

(ui − u)2,

where

u =1

n

n∑

i=1

ui.

Computational Finance – p. 25

Page 26: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

From the equation

log

(

St+τ

St

)

∼ N(

(µ − 1

2σ2)τ, σ2τ

)

,

the empirical variance s2 is an estimate for σ2τ . Therefore, we have

σ =s√τ

with the standard error approximately equal to

σ√2n

.

Standard error measures the precision of computation. It is a main buildingblock for confidence intervals.

The rule of thumb: to get the precision of e.g. 0.1% we need the standarderror smaller than 0.1%/1.96.

Computational Finance – p. 26

Page 27: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Trading Days vs. Calendar Days

An important issue is whether time should be measured in calendar days ortrading days when volatility parameters are estimated and used. Practitionerstend to ignore days when the exchange is closed while estimating volatilityfrom historical data. The number of trading days in a year is approximatelyequal to 252. Therefore,

when using prices from consecutive trading days, take τ = 1252

when using prices from consecutive weeks (Mondays, Tuesdays, etc.),take τ = 5

252

Computational Finance – p. 27

Page 28: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Binomial Model Calibration

so far we have computed the volatility of the stock price in theBlack-Scholes model

we do not know the growth rate

we do not need the growth rate, because pricing is done with respect to arisk-neutral measure under which:

St = S0e(r− 1

2σ2)t+σWt ,

where r is a risk-free interest rate.

Find u and d such that under a risk-neutral measure p∗ the one periodexpectation and variance in the Binomial Model agree with the Black-Scholes

model under its risk-neutral measure.

Computational Finance – p. 28

Page 29: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

E and V ar in Black-Scholes

Let ∆t be the length of one period in the Binomial Model.

The Black-Scholes model under a risk-neutral measure:

St = S0e(r− 1

2σ2)t+σWt .

The conditional variance of St+∆t given St is equal to

V ar(St+∆t|St) = S2t e2r∆t

(

eσ2∆t − 1)

.

The conditional expectation of St+∆t given St is equal to

E (St+∆t|St) = Ster∆t.

Computational Finance – p. 29

Page 30: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

E and V ar in Binomial Model

Remember that ∆t is the length of one period in the Binomial Model.

The conditional expectation of St+∆t given St is

E (St+∆t|St) = St

(

p∗u + (1 − p∗)d)

.

The conditional variance of St+∆t given St in a binomial model with theperiod length ∆t, parameters r, u, d and the risk neutral probability of the upmove equal to p∗ is

V ar(St+∆t|St) = E (S2t+∆t|St) −

(

E (St+∆t|St))2

= p∗(Stu)2 + (1 − p∗)(Std)2 − S2t

(

p∗u + (1 − p∗)d)2

.

Computational Finance – p. 30

Page 31: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

How they meet

Expectation

St

(

p∗u + (1 − p∗)d)

= Ster∆t

Variance

p∗(Stu)2 + (1 − p∗)(Std)2 − S2t

(

p∗u + (1 − p∗)d)2

= S2t e2r∆t

(

eσ2∆t − 1)

After simplification:

p∗u + (1 − p∗)d = er∆t

p∗u2 + (1 − p∗)d2 = e2r∆t+σ2∆t

Computational Finance – p. 31

Page 32: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

The story is not finished yet

p∗u + (1 − p∗)d = er∆t

p∗u2 + (1 − p∗)d2 = e2r∆t+σ2∆t

There are two equations with three unknowns, so we may expect more thanone solution.

The following relation follows from the first equation

p∗ =er∆t − d

u − d.

Possible solutions:

u = d−1 leads to the Cox-Ross-Rubinstein model – industry standard

p∗ = 1 − p∗ = 1/2 leads to the Jarrow-Rudd model – also quite popular

Computational Finance – p. 32

Page 33: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Cox-Ross-Rubinstein (CRR)

Assume that u = d−1. We obtain the following set of parameters

u = β +√

β2 − 1,

d = 1/u = β −√

β2 − 1,

where

β =1

2

(

e−r∆t + e(r+σ2)∆t)

.

In practice, there is a tendency to use a simplified version of the CRR model.It can be shown that up to the terms of higher order, we can set

u = eσ√

∆t, d = 1/u = e−σ√

∆t,

and p∗ computed as the risk neutral measure for these u and d.

Computational Finance – p. 33

Page 34: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

Jarrow-Rudd (JR)

Assume now that p∗ = 12 . This leads to the following parameters

u = er∆t(

1 +√

eσ2∆t − 1)

,

d = er∆t(

1 −√

eσ2∆t − 1)

.

The most popular approximate version for the Jarrow-Rudd model is

u = e(r−σ2/2)∆t+σ√

∆t,

d = e(r−σ2/2)∆t−σ√

∆t.

Observe that the CRR tree is symmetric (due to ud = 1) and the JR tree isskewed since ud = e(2r−σ2)∆t.

Computational Finance – p. 34

Page 35: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

General binomial tree

Assume

ud = e2ν∆t,

where ν is some scalar.

This leads to the following approximate solution (exact solution is rathercomplicated):

u = eν∆t+σ√

∆t,

d = eν∆t−σ√

∆t

p∗ =1

2+

1

2

(µ − ν

σ

)√∆t.

where µ = r − σ2/2.

Observe that for ν = 0 we obtain the approximate version of the CRR modeland for ν = µ, the JR model.

Computational Finance – p. 35

Page 36: Computational Finance - Logowanieapalczew/CFP_lecture1.pdf · 2011-10-10 · Literature Rüdiger Seydel, Tools for Computational Finance, Third Edition, Springer, 2006 John C. Hull,

'

&

$

%

Input: market data, number of periods M , payoff function h, exercise time T

∆t = T/M

Calibrate the model to the market data: S0, r, u, d, p∗

S00 = S0

SjM = S00ujdM−j , j = 0, 1, . . . , M

(for American options) Sji = S00ujdi−j for i = 0, 1, . . . , M − 1, and j = 0, 1, . . . i

For j from 0 to M do VjM = h(SjM )

For i from M − 1 to 0 do(European) Vji = e−r∆t

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

(American) Vji = max“

h(Sji), e−r∆t

p∗Vj+1,i+1 + (1 − p∗)Vj,i+1

””

Output: V00 – the price

Computational Finance – p. 36