You are on page 1of 18

Monte Carlo Lecture 3- Monte Carlo Simulation

Introduction
Approximation error
with Stochastic Differential
Stochastic Taylor exp.
Numerical methods
Equations
Algorithm

Lina von Sydow

Monte Carlo methods, Lina von Sydow, (1 : 18)


Introduction

Monte Carlo dXt = a(Xt ; t)dt + b(Xt ; t)dWt ; 0t T


Introduction
W Wienerprocess
Approximation error
Stochastic Taylor exp.
Numerical methods
Algorithm Let yj be an approximation to Xtj . Euler
discretization:

yj+1 = yj + a(yj ; tj )∆t + b(y


p j ; tj )∆W tj = j  ∆t ;
;
∆Wj = Wtj+1 Wtj = Z  ∆t Z ' N (0; 1):
;
(1)
Explicit method: a and b are evaluated at previous
approximation (yj ; tj ).

Monte Carlo methods, Lina von Sydow, (2 : 18)


Approximation error

Monte Carlo
Introduction Study linear SDE
Approximation error

dXt = Xt dt + Xt dWt
Stochastic Taylor exp.
Numerical methods
Algorithm
with initial value X0 for t = 0. This SDE has
analytical solution

Xt = X0 e (( 2 )t+ Wt )
1
2 (2)

Monte Carlo methods, Lina von Sydow, (3 : 18)


Definition: Absolute error
Monte Carlo
Introduction The absolute error at T is
Approximation error

(∆t) = E (jXT yT∆t j):


Stochastic Taylor exp.
Numerical methods
Algorithm
Here XT is evaluated with (2) and yT∆t with (1)
using same Wiener process.
Expectation is calculated as average over different
Wiener process.

Monte Carlo methods, Lina von Sydow, (4 : 18)


Monte Carlo
Definition: Strong convergence
Introduction
Approximation error yT∆t converges strongly to XT with order > 0 if
Stochastic Taylor exp.
Numerical methods
(∆t) = O(∆t )
yT∆t converges strongly if lim∆t !0 (∆t) = 0.
Algorithm

Euler method converges strongly with order 1=2.

Monte Carlo methods, Lina von Sydow, (5 : 18)


Monte Carlo Definition: Weak convergence
Introduction
Approximation error
Stochastic Taylor exp.
yT∆t converges weakly to XT with respect to g with
Numerical methods order > 0 if
Algorithm

jE (g (XT )) E (g (yT∆t ))j = O(∆t ):

Monte Carlo methods, Lina von Sydow, (6 : 18)


Stochastic Taylor expansion

Begin with deterministic, autonomuous case, i.e.


Monte Carlo
Introduction dXt = a(Xt )  dt
Approximation error
Stochastic Taylor exp.  
dXt
:
Numerical methods
Algorithm = a(Xt )
dt

Let f 2 C 1(R) )
d
dt f (Xt ) = [chainrule] = @@x f (Xt )  dX t

= @ x f (Xt )  a(Xt ) = Lf (Xt ):


dt (3)
@

Monte Carlo methods, Lina von Sydow, (7 : 18)


We can write (3) on integral form
Z t
f (Xt ) = f (Xt0 ) + Lf (Xs )ds (4)
Monte Carlo t0

Define f˜(Xs ) = Lf (Xs ) and repeat (4) for f˜


Introduction

(requires f 2 C 2 ) )
Approximation error
Stochastic Taylor exp.
Numerical methods
Algorithm
t R n s R o
f (Xt ) = f (Xt0 ) + t0 f˜(Xt0 ) + t0 Lf˜(Xz )dz ds =
Rt Rt Rs
= f (Xt0 ) + f˜(Xt0 ) t0 ds + t0 t0 Lf˜(Xz )dzds =
Rt Rs
= f (Xt0 ) + Lf (Xt0 )(t t0 ) + t0 t0 L2 f (Xz )dzds

To get the next term in the expansion, apply (4)


for f˜˜(Xz ) etc.

Monte Carlo methods, Lina von Sydow, (8 : 18)


Now investigate Itô-Taylor expansion of
autonomous SDE

dXt = a(Xt )dt + b(Xt )dWt :


Monte Carlo Itô’s lemma for g (x ; t) = f (x) is
Introduction
Approximation error
n o
a @@x f (Xt ) + 12 b 2 @@x 2 f (Xt ) dt+
Stochastic Taylor exp. 2
Numerical methods df (Xt ) =
Algorithm
+ b @@x f (Xt )dWt 

 L0 f (Xt )dt + L1 f (Xt )dWt

and on integral form

Z t Z t
f (Xt ) = f (Xt0 ) + L0 f (Xs )ds + L1 f (Xs )dWs :
t0 t0
(5)
Monte Carlo methods, Lina von Sydow, (9 : 18)
Now let f = x )
Z t Z t
Xt = X0 + a(Xs )ds + b(Xs )dWs (6)
t0 t0

Monte Carlo f = a in (5) and f = b in (5) and both these


Introduction
substituted into (6) gives
Approximation error
Stochastic Taylor exp.
Numerical methods
Algorithm Xt = n
X0 + o
Rt Rs Rs
+ t0 a(Xt0 ) + t0 L0 a(Xz )dz + t0 L1 a(Xz )dWz ds+
Rt n Rs Rs o
t0 L b(Xz )dWz dWs ;
+ b(Xt0 ) + 0 1
t0 t0 L b(Xz )dz +

with

L0 a = aa0 + 12 b 2 a00 ;
L1 a = ba0 ;
L0 b = ab0 + 21 b 2 b 00 ;
L1 b = bb0 :
Monte Carlo methods, Lina von Sydow, (10 : 18)
Summarizing we get

Z t Z t
Xt = Xt0 + a(Xt0 ) ds + b(Xt0 ) dWs + R
Monte Carlo t0 t0
Introduction
Approximation error
with
Stochastic Taylor exp.
Numerical methods
Algorithm Rt Rs Rt Rs
R = t0 t0 L0 a(Xz )dzds + t0 t0 L1 a(Xz )dWz ds+
Rt Rs Rt Rs
+ t0 t0 L0 b(Xz )dzdWz + t0 t0 L1 b(Xz )dWz dWs :

As for the deterministic case, this methodology can


be repeated to remainder R.

Since dW 2 = dt we expect the last of the four


terms in R to be of lowest order.

Monte Carlo methods, Lina von Sydow, (11 : 18)


By defining R̃ by
Monte Carlo Z t Z s
1
Introduction
R = L b(Xt0 ) dWz dWs + R̃
Approximation error
t0 t0
Stochastic Taylor exp.
Numerical methods we get
Algorithm

Rt Rt
Xt = Xt0 + a(Xt0 ) t0 ds + b(Xt0 ) t0 dWs +
Rt R
+ b(Xt0 )b 0 (Xt0 ) t0 t0 dWz dWs + R̃ :

Monte Carlo methods, Lina von Sydow, (12 : 18)


Numerical methods

Monte Carlo
Introduction Milstein:
Approximation error
Stochastic Taylor exp.
Numerical methods
yj+1 = yj + a(yj )∆t + b(yj )∆W +
+ 12 b(yj )b 0 (yj ) (∆W )2 ∆t
Algorithm

(7)
p
∆W = Z  ∆t Z ' N (0; 1):
Milstein is strongly convergent with order 1.

Monte Carlo methods, Lina von Sydow, (13 : 18)


Monte Carlo Runge-Kutta methods
Introduction
Approximation error
Stochastic Taylor exp.
Taylor-expansion methods use a0 , b 0 etc.
Numerical methods Runge-Kutta methods use a and b with appropriate
Algorithm arguments.

Study term bb0 in Milstein.

Monte Carlo methods, Lina von Sydow, (14 : 18)


Start with:
Monte Carlo
Introduction
Approximation error
b(y + ∆y ) b(y ) =
Stochastic Taylor exp.
Numerical methods

Algorithm
b(y ) + b 0  ∆y + b 00 (y )
2 (∆y )
2 + O (∆y )3 b(y ) =

b 0 (y )  ∆y + O (∆y ))2

Monte Carlo methods, Lina von Sydow, (15 : 18)


Now use ∆y = a  ∆t + b  ∆W (Euler
discretization):
Monte Carlo b(y + ∆y ) b(y ) =
b 0 (y )  (a  ∆t + b  ∆W ) + O(∆t) =
Introduction

b 0 (y )b(y )  ∆W + O(∆t)
Approximation error
Stochastic Taylor exp.
Numerical methods
Algorithm
)
b 0 (y )b(y )  b(y +∆y ) b(y )
∆W =
p
 p
b(y +a ∆t+b ∆t) b(y )
∆t

Monte Carlo methods, Lina von Sydow, (16 : 18)


Monte Carlo Algorithm: Runge-Kutta method
Introduction
p
Approximation error
Stochastic Taylor exp.
ŷj = yj + a(yj )  ∆t + b(yj )  ∆t
Numerical methods
Algorithm yj+1 = yj + a(yj )  ∆t + b(yj )  ∆W +
p1 ∆W 2 ∆t (b(ŷj ) b(yj )) :
2 ∆t

Monte Carlo methods, Lina von Sydow, (17 : 18)


Monte-Carlo simulation - Algorithm
(European options)
1. for k = 1; : : : ; N
Monte Carlo Choose seed and integrate SDE under
Introduction risk-neutral measure dS = rSdt +  SdW )
Approximation error (ST )k .
Stochastic Taylor exp.
Numerical methods
end for
Algorithm 2. Evaluate pay off function
(V (ST ; T ))k = Φ((ST )k ), k = 1; : : : ; N.
3. Compute

1 X
N
Ê (V (ST ; T )) = (V (ST ; T ))k :
N
k=1

4. The discounted variable


V̂ = e rT Ê (V (ST ; T )) is a random variable
with E (V̂ ) = V (S0 ; 0).
Monte Carlo methods, Lina von Sydow, (18 : 18)

You might also like