You are on page 1of 8

Euler and Milstein Discretization

by Fabrice Douglas Rouah


www.FRouah.com
www.Volopta.com
"Monte Carlo simulation" in the context of option pricing refers to a set
of techniques to generate underlying valuestypically stock prices or interest
ratesover time. Typically the dynamics of these stock prices and interest rates
are assumed to be driven by a continuous-time stochastic process. Simulation,
however, is done at discrete time steps. Hence, the rst step in any simulation
scheme is to nd a way to "discretize" a continuous-time process into a discrete time process. In this Note we present two discretization schemes, Euler
and Milstein discretization, and illustrate both with the Black-Scholes and the
Heston models.
We assume that the stock price St is driven by the stochastic dierential
equation (SDE)
dSt = (St ; t) dt + (St ; t) dWt
(1)
where Wt is Brownian motion. We simulate St over the time interval [0; T ],
which we assume to be is discretized as 0 = t1 < t2 <
< tm = T , where
the time increments are equally spaced with width dt: Equally-spaced time
increments is primarily used for notational convenience, because it allows us
to write ti ti 1 as simply dt: All the results derived with equally-spaced
increments are easily generalized to unequal spacing.
Integrating dSt from t to t + dt produces
St+dt = St +

t+dt

(Su ; u) du +

t+dt

(Su ; u) dWu :

(2)

Equation (2) is the starting point for any discretization scheme. At time t, the
value of St is known, and we wish to obtain the next value St+dt .

Euler Scheme

The simplest way to discretize the process in Equation (2) is to use Euler discretization. This is equivalent to approximating the integrals using the leftpoint rule. Hence the rst integral is approximated as the product of the
integrand at time t, and the integration range dt
Z

t+dt

(Su ; u) du

(St ; t)

t+dt

du

(St ; t) dt:

We use the left-point rule since at time t the value (St ; t) is known. The
right-hand rule would require that (St+dt ; t + dt) be known at time t. In an
1

identical fashion, the second integral is approximated as


Z

t+dt

(Su ; u) dWu

(St ; t)

t+dt

dWu

(St ; t) (Wt+dt
p
(St ; t) dtZ;

Wt )

since Wt+dt Wt and dtZ are identical in distribution, where Z is a standard


normal variable. Hence, Euler discretization of (2) is
p
St+dt = St + (St ; t) dt + (St ; t) dtZ:
(3)

1.1

Euler Scheme for the Black-Scholes Model

The Black-Scholes stock price dynamics under the risk neutral measure are
dSt = rSt dt + St dWt :

(4)

An application of Equation (3) produces Euler discretization for the BlackScholes model
p
St+dt = St + rSt dt + St dtZ:
(5)
Alternatively, we can generate log-stock prices, and exponentiate the result. By
Itos lemma ln St follows the process
d ln St =

1
2

dt + dWt :

(6)

Euler discretization via Equation (3) produces


1
2

ln St+dt = ln St + r
so that
St+dt = St exp
where dt = ti

1.2

ti

1
2

dt +

dt +

dtZ

dtZ :

(7)

1.

Euler Scheme for the Heston Model

The Heston model is described by the bivariate stochastic process for the stock
price St and its variance vt
dSt
dvt

p
= rSt dt + vt St dW1;t
p
=
(
vt ) dt +
vt dW2;t

where E [dW1;t dW2;t ] = dt.

(8)

1.2.1

Discretization of vt

The SDE for vt in (8) in integral form is


Z

vt+dt = vt +

t+dt

vu ) du +

t+dt

vu dW2;u :

(9)

The Euler discretization approximates the integrals using the left-point rule
Z

t+dt

vu ) du

vt ) dt

t+dt

vu dW2;u

vt (Wt+dt
p
vt dtZv

Wt )

where Zv is a standard normal random variable. The right hand side involves
(
vt ) rather than (
vt+dt ) since at time t we dont know the value of vt+dt .
This leaves us with
p
vt+dt = vt + (
vt ) dt +
vt dtZv :
To avoid negative variances, we can replace vt with vt+ = max (0; vt ). This is
the full truncation scheme. The reection scheme replaces vt with its absolute
value jvt j.
1.2.2

Process for St

In a similar fashion, the SDE for St in (8) is written in integral form as


St+dt = St + r

t+dt

Su du +

t+dt

vu Su dWu :

Euler discretization approximates the integrals with the left-point rule

t+dt

Su du

St dt

t+dt

vu Su dW1;u

vt St (Wt+dt
p
=
vt dtSt Zs

Wt )

where Zs is a standard normal random variable that has correlation


We end up with
p
St+dt = St + rSt dt + vt dtSt Zs :

with Zv .

1.3

Process for ln St

By Itos lemma ln St follows the diusion


d ln St =

p
1
vt dt + vt dW1;t
2

or in integral form
ln St+dt = ln St +

1
vu du +
2

vu dW1;u :

Euler discretization of the process for ln St is thus


ln St+dt

ln St + r

ln St + r

p
1
vt dt + vt (W1;t+dt
2
p
1
vt dt + vt dtZs :
2

W1;t )

(10)

Hence the Euler discretization of St is


St+dt = St exp

p
1
vt dt + vt dtZs :
2

Again, to avoid negative variances we must apply the full truncation or reection
scheme by replacing vt everywhere with vt+ or with jvt j.
1.3.1

Process for (St ; vt ) or (ln St ; vt )

Start with the initial values S0 for the stock price and v0 for the variance. Given
a value for vt at time t, we rst obtain vt+dt from
p
vt+dt = vt + (
vt ) dt +
vt dtZv
and we obtain St+dt from

St+dt = St + rSt dt +
or from
St+dt = St exp

p
vt dtSt Zs

p
1
vt dt + vt dtZs :
2

To generate Zv and Zs with correlation , we rst generate two independent


standard
normal variable Z1 and Z2 , and we set Zv = Z1 and Zs = Z1 +
p
2Z .
1
2

Milstein Scheme

This scheme is described in Glasserman [2] and in Kloeden and Platen [4] for
general processes, and in Kahl and Jackel [3] for stochastic volatility models.
The scheme works for SDEs for which the coe cients (St ) and (St ) depend
only on S, and do not depend on t directly. Hence we assume that the stock
price St is driven by the SDE
dSt

=
=

(St ) dt + (St ) dWt


t dt + t dWt :

(11)

In integral form
Z

St+dt = St +

t+dt
s ds

t+dt
s dWs :

(12)

The key to the Milstein scheme is that the accuracy of the discretization is
increased by considering expansions of the coe cients t = (St ) and t =
(St ) via Itos lemma. This is sensible since the coe cients are functions of
S. Indeed, we can apply Itos Lemma to the functions t and t as we would
for any dierentiable function of S. By Itos lemma, then, the SDEs for the
coe cients are
1
2
1
t+
2

0
t t

0
t

00 2
t t

dt + (

0
t t ) dWt

00 2
t t

dt + (

0
t t ) dWt

where the prime refers to dierentiation in S and where the derivatives in t are
zero because we assume that t and t have no direct dependence on t. The
integral form of the coe cients at time s (with t < s < t + dt)
Z s
Z s
1 00 2
0
=
+
+
du
+
( 0u u ) dWu
s
t
u u
u u
2
t
t
Z s
Z s
1 00 2
0
( 0u u ) dWu :
=
s
t+
u u du +
u u+
2
t
t
Substitute for
St+dt

and

= St +
+

in (12) to produce

t+dt
t

t
t+dt
t

+
Z

s
0
u u

0
u u

1
+
2
1
2

00 2
u u

00 2
u u

du +

du +

0
u u ) dWu

ds

0
u u ) dWu

dWs

3=2

The terms higher than order one are dsdu = O (dt) and dsdWu = O (dt)
and are ignored. The term involving dWu dWs is retained since dWu dWs =
5

O (dt) is of order one. This leaves us with


St+dt = St +

t+dt

ds +

t+dt

dWs +

t+dt

s
0
u u ) dWu dWs :

(13)

Apply Euler discretization to the last term to obtain


Z

t+dt

s
0
u u dWu dWs

0
t t

t+dt

dWu dWs

(14)

0
t t

t+dt

(Ws

Wt ) dWs

0
t t

t+dt

Ws dWs

Wt Wt+dt +

Wt2

Now dene dYt = Wt dWt . Using Itos Lemma, it is easy to show1 that Yt has
solution Yt = 21 Wt2 12 t so that
Z

t+dt

Ws dWs = Yt+dt

Yt =

1 2
W
2 t+dt

1 2
W
2 t

1
dt:
2

(15)

Substitute back into (14) to obtain


Z

t+dt

s
0
u u dWu dWs

1
2
1
= :
2

0
u u

0
u u

(Wt+dt

Wt )
2

( Wt )

i
dt :

i
dt

p
where Wt = Wt+dt Wt , which is equal in distribution to dtZ with Z
distributed as standard normal. Combining Equations (13) and (15) the general
form of Milstein discretization is therefore
St+dt = St +

2.1

t dt

dtZ +

1
2

0
t t dt

Z2

1 :

(16)

Milstein Scheme for the Black-Scholes Model

In the Black-Scholes model Equation (4) we have


so the Milstein scheme (16) is
p
1
St+dt = St + rSt dt + St dtZ +
2

(St ) = rSt and

dt Z 2

(St ) = St

which adds the correction term 21 2 dt Z 2 1 to the Euler scheme in (5). In


the Black-Scholes model for the log-stock price, Equation (6), we have (St ) =
1 @Y
1 Indeed, @Y =
;
@t
2 @W
(Wt 1) dWt = Wt dWt .

= W , and

@2Y
@W 2

= 1, so that dYt =

1
2

+0+

1
2

1 1 dt +

r 12 2 and
therefore

(St ) =

so that

0
t

0
t

1
2

ln St+dt = ln St + r

= 0: The Milstein scheme (16) is


2

dt +

dtZ

which is identical to the Euler scheme in (7). Hence, while the Milstein scheme
improves the discretization of St in the Black-Scholes model, it does not improve
the discretization of ln St .

2.2

Milstein Scheme for the Heston Model

Recall that this model is given in Equation (8) as


dSt
dvt

2.3

p
= rSt dt + vt St dW1;t
p
vt dW2;t
=
(
vt ) dt +

Process for vt

The coe cients of the variance process are (vt ) =


so an application of Equation (16) for vt produces
vt+dt = vt + (

p
1
vt dtZv +
4

vt ) dt +

which can be written


vt+dt =

vt +

vt ) and

dt Zv2

1 p
dtZv
2

+ (

vt ) dt

1
4

(vt ) =

vt

(17)

dt:

This last equation is also Equation (2.18) of Gatheral [1]. Milstein discretization
of the variance process produces far fewer negative values for the variance than
Euler discretization. Nevertheless, the full truncation scheme or the reection
scheme must be applied to (17) as well.
2.3.1

Process for St and ln St

The coe cients of the stock price process are


so Equation (16) becomes
St+dt = St + rSt dt +

(St ) = rSt and

p
1
vt dtSt Zs + St2 dt Zs2
4

1 :

(St ) =

vt St

(18)

We can also discretize the log-stock process, which by Itos lemma follows the
process
p
1
d ln St = r
vt dt + vt dW1;t :
2
p
1
The coe cients are (St ) = r 2 vt and (St ) = vt so that 0t = 0t = 0.
Since vt is known at time t, we can treat it as a constant in the coe cients. An

application of (16) produces


p
1
vt dt + vt dtdZs
2

ln St+dt = ln St + r

which is identical to Equation (10). Hence, as in the Black-Scholes model, the


discretization of ln St rather than St means that there are no higher corrections
to be brought to the Euler discretization. The discretization of the stock price
is
p
1
vt dt + vt dtZs :
(19)
St+dt = St exp
r
2
Again, it is necessary to apply the full truncation or reections schemes in
Equations (18) and (19).

2.4

Process for (St ; vt ) or (ln St ; vt )

Given a value for vt at time t, we rst update to vt+dt using (17)


vt+dt = vt + (

p
1
vt dtZv +
4

vt ) dt +

and we obtain St+dt using


St+dt = St + rSt dt +
or from
St+dt = St exp

dt Zv2

p
1
vt dtSt Zs + St2 dt Zs2
4
r

1 :

p
1
vt dt + vt dtZs :
2

To generate Zv and Zs with correlation , we rst generate two independent


standard
normal variable Z1 and Z2 , and we set Zv = Z1 and Zs = Z1 +
p
2Z .
1
2

References
[1] Gatheral, J. (2006) The Volatility Surface: A Practitioners Guide. New
York, NY: John Wiley & Sons.
[2] Glasserman, P. (2003). Monte Carlo Methods in Financial Engineering.
New York, NY: Springer.
[3] Kahl, C., and P. Jackel (2006). Fast Strong Approximation Monte-Carlo
Schemes for Stochastic Volatility Models. Quantitative Finance, Vol. 6, No.
6.
[4] Kloeden, P.E., and E. Platen (1992). Numerical Solution of Stochastic Differential Equations. New York, NY: Springer.

You might also like