Euler and Milstein Discretization

Embed Size (px)

Citation preview

  • 8/10/2019 Euler and Milstein Discretization

    1/8

    Euler and Milstein Discretizationby Fabrice Douglas Rouah

    www.FRouah.comwww.Volopta.com

    "Monte Carlo simulation" in the context of option pricing refers to a setof techniques to generate underlying valuestypically stock prices or interestratesover time. Typically the dynamics of these stock prices and interest ratesare assumed to be driven by a continuous-time stochastic process. Simulation,however, is done at discrete time steps. Hence, the rst step in any simulationscheme is to nd a way to "discretize" a continuous-time process into a dis-crete time process. In this Note we present two discretization schemes, Eulerand Milstein discretization, and illustrate both with the Black-Scholes and theHeston models.

    We assume that the stock price St is driven by the stochastic dierentialequation (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

  • 8/10/2019 Euler and Milstein Discretization

    2/8

    identical fashion, the second integral is approximated as

    Z t+dt

    t

    (Su; u) dWu (St; t)Z t+dt

    t

    dWu

    = (St; t) (Wt+dt Wt)= (St; t)

    pdtZ;

    sinceWt+dtWt andp

    dtZare identical in distribution, where Zis a standardnormal variable. Hence, Euler discretization of (2) is

    St+dt = St+ (St; t) dt + (St; t)p

    dtZ: (3)

    1.1 Euler Scheme for the Black-Scholes Model

    The Black-Scholes stock price dynamics under the risk neutral measure are

    dSt= rStdt + StdWt: (4)

    An application of Equation (3) produces Euler discretization for the Black-Scholes model

    St+dt= St+ rStdt + Stp

    dtZ: (5)

    Alternatively, we can generate log-stock prices, and exponentiate the result. ByItos lemma ln St follows the process

    d ln St =

    r 1

    22

    dt + dWt: (6)

    Euler discretization via Equation (3) produces

    ln St+dt= ln St+

    r 1

    22

    dt + p

    dtZ

    so that

    St+dt= Stexp

    r 1

    22

    dt + p

    dtZ

    : (7)

    where dt= ti ti1.

    1.2 Euler Scheme for the Heston Model

    The Heston model is described by the bivariate stochastic process for the stock

    priceS

    t and its variancevt

    dSt = rStdt +p

    vtStdW1;t (8)

    dvt = ( vt) dt + p

    vtdW2;t

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

    2

  • 8/10/2019 Euler and Milstein Discretization

    3/8

    1.2.1 Discretization of vt

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

    vt+dt= vt+

    Z t+dtt

    ( vu) du +Z t+dtt

    p

    vudW2;u: (9)

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

    Z t+dtt

    ( vu) du ( vt) dtZ t+dtt

    p

    vudW2;u pvt(Wt+dt Wt)

    =

    pvtdtZv

    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 ofvt+dt.This leaves us with

    vt+dt= vt+ ( vt) dt + p

    vtdtZv:

    To avoid negative variances, we can replace vt with v+t = max(0; vt). This is

    the full truncation scheme. Thereectionscheme replaces vt with its absolutevaluejvtj.

    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

    Z t+dtt

    Sudu +

    Z t+dtt

    pvuSudWu:

    Euler discretization approximates the integrals with the left-point rule

    Z t+dtt

    Sudu StdtZ t+dtt

    pvuSudW1;u

    pvtSt(Wt+dt Wt)

    =p

    vtdtStZs

    where Zs is a standard normal random variable that has correlation with Zv.We end up with

    St+dt= St+ rStdt +p

    vtdtStZs:

    3

  • 8/10/2019 Euler and Milstein Discretization

    4/8

    1.3 Process for lnSt

    By Itos lemma ln St follows the diusion

    d ln St =

    r 1

    2vt

    dt +

    pvtdW1;t

    or in integral form

    ln St+dt = ln St+

    Z t0

    r 1

    2vu

    du +

    Z t0

    pvudW1;u:

    Euler discretization of the process forln St is thus

    ln St+dt = ln St+ r 1

    2vt

    dt +p

    vt(W1;t+dt W1;t) (10)

    = ln St+

    r 1

    2vt

    dt +

    pvtdtZs:

    Hence the Euler discretization ofSt is

    St+dt = Stexp

    r 1

    2vt

    dt +

    pvtdtZs

    :

    Again, to avoid negative variances we must apply the full truncation or reectionscheme by replacing vt everywhere with v

    +t or withjvtj.

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

    Start with the initial valuesS0for the stock price andv0 for the variance. Givena value for vt at time t, we rst obtain vt+dt from

    vt+dt= vt+ ( vt) dt + p

    vtdtZv

    and we obtain St+dt from

    St+dt = St+ rStdt +p

    vtdtStZs

    or from

    St+dt = Stexp

    r 1

    2vt

    dt +

    pvtdtZs

    :

    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

    1 2Z2.

    4

  • 8/10/2019 Euler and Milstein Discretization

    5/8

    2 Milstein Scheme

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

    dSt = (St) dt + (St) dWt (11)

    = tdt + tdWt:

    In integral form

    St+dt = St+ Z t+dt

    t

    sds + Z t+dt

    t

    sdWs: (12)

    The key to the Milstein scheme is that the accuracy of the discretization isincreased by considering expansions of the coecients t = (St) and t = (St) via Itos lemma. This is sensible since the coecients are functions ofS. Indeed, we can apply Itos Lemma to the functions t and t as we wouldfor any dierentiable function of S. By Itos lemma, then, the SDEs for thecoecients are

    dt =

    0tt+

    1

    200t

    2t

    dt + (0tt) dWt

    dt =

    0tt+

    1

    200t

    2t

    dt + (0tt) dWt

    where the prime refers to dierentiation in Sand where the derivatives in t arezero because we assume that t and t have no direct dependence on t. Theintegral form of the coecients at time s (witht < s < t + dt)

    s = t+

    Z st

    0uu+

    1

    200u

    2u

    du +

    Z st

    (0uu) dWu

    s = t+

    Z st

    0uu+

    1

    200u

    2u

    du +

    Z st

    (0uu) dWu:

    Substitute for s and s in (12) to produce

    St+dt = St+ Z t+dt

    t t+ Z

    s

    t 0uu+

    1

    200u

    2u

    du +

    Z s

    t

    (0uu) dWuds

    +

    Z t+dt

    t

    t+

    Z s

    t

    0uu+

    1

    200u

    2u

    du +

    Z s

    t

    (0uu) dWu

    dWs

    The terms higher than order one are dsdu= O

    (dt)2

    and dsdWu = O

    (dt)3=2

    and are ignored. The term involving dWudWs is retained since dWudWs =

    5

  • 8/10/2019 Euler and Milstein Discretization

    6/8

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

    St+dt = St+ t

    Z t+dt

    t

    ds + tZ t+dt

    t

    dWs+Z t+dt

    t

    Z s

    t

    (0uu) dWudWs: (13)

    Apply Euler discretization to the last term to obtain

    Z t+dtt

    Z st

    0uudWudWs 0ttZ t+dtt

    Z st

    dWudWs (14)

    = 0tt

    Z t+dtt

    (Ws Wt) dWs

    = 0tt

    Z t+dtt

    WsdWs WtWt+dt+ W2t!

    Now dene dYt = WtdWt. Using Itos Lemma, it is easy to show1 that Yt hassolutionYt=

    1

    2W2t 12 t so thatZ t+dt

    t

    WsdWs = Yt+dt Yt = 12

    W2t+dt 1

    2W2t

    1

    2dt: (15)

    Substitute back into (14) to obtain

    Z t+dtt

    Z st

    0uudWudWs 1

    20uu

    h(Wt+dt Wt)2 dt

    i= :

    1

    20uu

    h(Wt)

    2 dti

    :

    where Wt = Wt+dt Wt, which is equal in distribution to pdtZ with Zdistributed as standard normal. Combining Equations (13) and (15) the generalform of Milstein discretization is therefore

    St+dt= St+ tdt + tp

    dtZ+1

    20ttdt

    Z2 1 : (16)

    2.1 Milstein Scheme for the Black-Scholes Model

    In the Black-Scholes model Equation (4) we have (St) = rSt and (St) = Stso the Milstein scheme (16) is

    St+dt= St+ rStdt + Stp

    dtZ+1

    22dt Z

    2 1which adds the correction term 1

    22dt

    Z2 1 to the Euler scheme in (5). In

    the Black-Scholes model for the log-stock price, Equation (6), we have (St) =

    1 Indeed, @Y@t

    = 12; @Y@W

    = W, and @2Y

    @W2 = 1, so that dYt =

    1

    2+ 0 + 1

    2 11

    dt+

    (Wt 1) dWt = WtdWt.

    6

  • 8/10/2019 Euler and Milstein Discretization

    7/8

    r 1

    22

    and (St) = so that

    0

    t = 0

    t = 0: The Milstein scheme (16) istherefore

    ln St+dt= ln St+

    r 12

    2

    dt + pdtZ

    which is identical to the Euler scheme in (7). Hence, while the Milstein schemeimproves the discretization ofStin the Black-Scholes model, it does not improvethe discretization ofln St.

    2.2 Milstein Scheme for the Heston Model

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

    dSt = rStdt +p

    vtStdW1;t

    dvt = ( vt) dt + pvtdW2;t

    2.3 Process for vt

    The coecients of the variance process are (vt) = ( vt)and (vt) = pvtso an application of Equation (16) for vt produces

    vt+dt= vt+ ( vt) dt + p

    vtdtZv+1

    42dt

    Z2v 1

    (17)

    which can be written

    vt+dt =

    pvt+

    1

    2p

    dtZv

    2+ ( vt) dt 1

    42dt:

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

    2.3.1 Process for St and ln St

    The coecients of the stock price process are (St) =rSt and (St) =p

    vtStso Equation (16) becomes

    St+dt = St+ rStdt +p

    vtdtStZs+1

    4S2t dt

    Z2s 1

    : (18)

    We can also discretize the log-stock process, which by Itos lemma follows the

    processd ln St =

    r 1

    2vt

    dt +

    pvtdW1;t:

    The coecients are (St) =

    r 12

    vt

    and (St) =p

    vt so that 0

    t = 0

    t = 0.Sincevt is known at time t, we can treat it as a constant in the coecients. An

    7

  • 8/10/2019 Euler and Milstein Discretization

    8/8

    application of (16) produces

    ln St+dt = ln St+

    r 12

    vt

    dt +p

    vtdtdZs

    which is identical to Equation (10). Hence, as in the Black-Scholes model, thediscretization ofln St rather than St means that there are no higher correctionsto be brought to the Euler discretization. The discretization of the stock priceis

    St+dt = Stexp

    r 1

    2vt

    dt +

    pvtdtZs

    : (19)

    Again, it is necessary to apply the full truncation or reections schemes inEquations (18) and (19).

    2.4 Process for(St; vt)

    or(lnSt; vt)

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

    vt+dt= vt+ ( vt) dt + p

    vtdtZv+1

    42dt

    Z2v 1

    and we obtain St+dt using

    St+dt = St+ rStdt +p

    vtdtStZs+1

    4S2t dt

    Z2s 1

    :

    or from

    St+dt = Stexp

    r 1

    2vt

    dt +

    pvtdtZs

    :

    To generate Zv and Zs with correlation , we rst generate two independentstandard normal variable Z1 and Z2, and we set Zv = Z1 and Zs = Z1 +p

    1 2Z2.

    References

    [1] Gatheral, J. (2006) The Volatility Surface: A Practitioners Guide. NewYork, 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 Dif-ferential Equations. New York, NY: Springer.

    8