Documente Academic
Documente Profesional
Documente Cultură
2
(t, x) =
(t, x)
t
x2
(16.1)
i = 0, . . . , N,
j = 0, . . . , M,
0jM
"
N. Privault
Explicit method
Using the forward time difference approximation
(ti+1 , xj ) (ti , xj )
(ti , x) '
t
t
of the time derivative, we discretize (16.1) as
(ti+1 , xj ) (ti , xj )
(ti , xj+1 ) + (ti , xj1 ) 2(ti , xj )
=
t
(x)2
and letting = (t)/(x)2 this yields
(ti+1 , xj ) = (ti , xj+1 ) + (1 2)(ti , xj ) + (ti , xj1 ),
1 j M 1, 1 i N , i.e.
(ti , x0 )
..
i+1 = Ai +
,
.
0
(ti , xM )
with
and
The vector
i = 0, 1, . . . , N 1,
(ti , x1 )
..
i =
,
.
(ti , xM 1 )
1 2
0
1 2
0
1 2
..
..
A = ...
.
.
0
0
0
0
0
0
0
0
0
(ti , x0 )
0
..
.
0
(ti , xM )
i = 0, 1, . . . , N,
..
.
0
0
0
..
.
0
0
0
..
.
0
0
0
..
.
1 2
0
1 2
0
1 2
i = 0, . . . , N,
can be given by the lateral boundary conditions (t, 0) and (t, X).
488
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
"
(ti , xj ) (ti1 , xj )
(ti , x) '
t
t
of the time derivative, we discretize (16.1) as
(ti , xj ) (ti1 , xj )
(ti , xj+1 ) + (ti , xj1 ) 2(ti , xj )
=
t
(x)2
and letting = (t)/(x)2 we get
(ti1 , xj ) = (ti , xj+1 ) + (1 + 2)(ti , xj ) (ti , xj1 ),
1 j M 1, 1 i N , i.e.
i1
with
= Bi +
(ti , x0 )
0
..
.
0
(ti , xM )
i = 1, 2, . . . , N,
1 + 2
0
0
0
0
1 + 2
0
0
0
0
1 + 2
0
0
0
..
.
.
.
.
.
..
..
..
..
..
..
B= .
.
.
0
0
1
+
2
0
0
0 1 + 2
0
0
0
0
1 + 2
(ti , x0 )
..
i = B 1 i1 B 1
i = 1, . . . , N.
,
.
0
(ti , xM )
489
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
N. Privault
r(t, x) =
1
2
(t, x) + rx (t, x) + x2 2 2 (t, x),
t
x
2
x
(16.2)
Explicit method
Using here the backward time difference approximation
(ti , xj ) (ti1 , xj )
(ti , x) '
t
t
of the time derivative, we discretize (16.2) as
r(ti , xj ) =
1 j M 1, 0 i N 1, i.e.
(ti1 , xj ) =
1
t( 2 j 2 rj)(ti , xj1 ) + (1 t( 2 j 2 + r))(ti , xj )
2
1
+ t( 2 j 2 + rj)(ti , xj+1 ),
2
(ti , xM ) = xM Ker(T ti ) ,
0 i N,
(ti , xM ) = 0
0 i N,
490
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
"
100
50
-50
-100
0
0.1
0.2
0.3
0.4
0.5
time to maturity
0.6
0.7
0.8
0.9
20
40
60
80
100
120
140
160
180
200
strike
Implicit method
Using the forward time difference approximation
(ti+1 , xj ) (ti , xj )
(ti , x) '
t
t
of the time derivative, we discretize (16.2) as
r(ti , xj ) =
(ti+1 , xj ) (ti , xj )
(ti , xj+1 ) (ti , xj1 )
+ rxj
t
2x
1
(ti , xj+1 ) + (ti , xj1 ) 2(ti , xj )
+ x2j 2
,
2
(x)2
1 j M 1, 0 i N 1, i.e.
1
(ti+1 , xj ) = t( 2 j 2 rj)(ti , xj1 ) + (1 + t( 2 j 2 + r))(ti , xj )
2
1
t( 2 j 2 + rj)(ti , xj+1 ),
2
1 j M 1, i.e.
"
491
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
N. Privault
1
2 t
i+1
= Bi +
r 2 (ti , x0 )
0
..
.
0
21 t r(M 1) + 2 (M 1)2 (ti , xM )
i = 0, 1, . . . , N 1, with
Bj,j1 =
1
t rj 2 j 2 ,
2
Bj,j = 1 + 2 j 2 t + rt,
and
1
Bj,j+1 = t rj + 2 j 2 ,
2
for j = 1, . . . , M 1, and B(i, j) = 0 otherwise.
By inversion of the matrix B, i is given in terms of i+1 as
1
2
(ti , x0 )
2 t r
..
i = B 1 i+1 B 1
,
.
0
21 t r(M 1) + 2 (M 1)2 (ti , xM )
i = 0, . . . , N,
= cer(T s) ,
492
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
"
140
120
100
80
60
40
20
0
time to maturity
10
20
40
60
80
100
120
140
160
180
200
strike
1 ) + + (X
N )
(X
N
can be used according to the strong law of large number for the evaluation of
the expected value IE[(X)]. Despite its apparent simplicity, the Monte Carlo
method can be delicate to implement and the optimization of Monte Carlo
algorithms and random number generation have been the object of numerous
works which are outside the scope of this text, cf. e.g. [43], [69].
Random samples for the solution of a stochastic differential equation of
the form
dXt = b(Xt )dt + a(Xt )dWt
(16.3)
can be generated by discretization. More precisely, the Euler discretization
scheme for the stochastic differential equation (16.3) is given by
tN = X
tN +
X
k+1
k
'
"
N
X
tk
w tk+1
tk
b(Xs )ds +
tN )(tk+1
b(X
k
w tk+1
tk
a(Xs )dWs
tN )(Wt
tk ) + a(X
Wtk ).
k+1
k
493
N. Privault
In particular, when Xt is the geometric Brownian motion given by
dXt = rXt dt + Xt dWt
we get
N = X
N + rX
N (tk+1 tk ) + X
N (Wt
X
Wtk ),
tk+1
tk
tk
tk
k+1
which can be computed as
tN = X
tN
X
0
k
k
Y
1 + r(ti ti1 ) + (Wti Wti1 ) .
i=1
w tk+1
tk
w tk+1
b(Xs )ds +
w tk+1
tk
a(Xs )dWs
tk
tk
hence
w tk+1
tk
1
((Wtk+1 Wtk )2 (tk+1 tk )),
2
and
tN ' X
tN +
X
k+1
k
w tk+1
tk
494
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html
"
k
Y
i=1
"
1
1 + (r 2 /2)(ti ti1 ) + (Wti Wti1 ) + 2 (Wti Wti1 )2 .
2
495
This version: April 25, 2013
http://www.ntu.edu.sg/home/nprivault/indext.html