Beruflich Dokumente
Kultur Dokumente
Computational solution
of stochastic differential equations
Timothy Sauer
Correspondence to: tsauer@gmu.edu process with the following three properties: (1) For
Department of Mathematics, George Mason University, Fairfax, each t, the random variable Wt is normally distributed
VA, 22030, USA
with mean 0 and variance t. (2) For each t1 < t2 , the
Conflict of interest: The authors have declared no conflicts of normal random variable Wt2 Wt1 is independent of
interest for this article. the random variable Wt1 , and in fact independent of
all W t , 0 t t1 . (3) The Wiener process Wt can be Because f and Wt are random variables, so is the
d
represented by continuous paths. Ito integral I = c f (t) dWt . The differential dI is a
The Wiener process is a formal version of notational convenience; thus
random behavior first characterized by the botanist d
Robert Brown1 in 1827, commonly called Brownian
I= f dWt
motion. Brownian motion is crucial in the modeling c
of stochastic processes since it represents the integral
of idealized noise that is independent of frequency, is expressed in differential form as dI = f dW t . The
called white noise. Often, the Wiener process is called differential dW t of Brownian motion Wt is called
upon to represent random, external influences on an white noise. A typical solution is a combination of
otherwise deterministic system, or more generally, drift and the diffusion of Brownian motion.
dynamics that for a variety of reasons cannot be To solve SDEs analytically, we need to introduce
deterministically modeled. the chain rule for stochastic differentials, called the Ito
A typical diffusion process is modeled as formula.2 Let X be defined as in (1) and let Y = f (t,X).
a differential equation involving deterministic, or Then
drift terms, and stochastic, or diffusion terms, the f f
latter represented by a Wiener process, as in the dY = (t, X) dt + (t, X) dX
t x
equation
1 2f
+ (t, X) dX dX (2)
2 x2
dX = a (t, X) dt + b (t, X) dWt . (1)
where the dX dX term is interpreted from the
SDEs are given in differential form, unlike identities
the derivative form of ODEs. That is because
many interesting stochastic processes, like Brownian dt dt = dt dWt = dWt dt = 0
motion, are continuous but not differentiable. dWt dWt = dt. (3)
Therefore, the meaning of the SDE (1) is, by definition,
the integral equation For example, to show that Y = Wt2 is a solution
to the SDE dY = 1 dt + 2W t dW t , apply Itos formula
with f (t,x) = x2 and X = W t . Then
t t
X (t) = X (0) + a s, y ds + b s, y dWs ,
0 0 f f
dY = (t, X) dt + (t, X) dX
t x
where the meaning of the last integral, called an Ito
1 2f
integral, will be defined next. + (t, X) dX dX
Let c = t0 < t1 < < tn 1 < tn = d be a grid of 2 x2
points on the interval [c,d]. The Riemann integral is 1
= 0 + 2Wt dWt + 2 dWt dWt
defined as a limit 2
= 1 dt + 2Wt dWt .
d
n
f (x) dx = lim f ti ti , The Ito formula is the stochastic analogue
c t0
i=1
of the chain rule of differential calculus. Although
it is expressed in differential form for ease of
where ti = ti ti 1 and ti1 ti ti . Similarly, the understanding, its meaning is precisely the equality
Ito integral2 is the limit of the Ito integral of both sides of the equation. It is
proved under rather general hypotheses by referring
d
n
the equation back to the definition of Ito integral.
f (t) dWt = lim f (ti1 ) Wi
c t0 More complete details on Ito integrals and stochastic
i=1
calculus can be found in a number of texts, including
Refs 37.
where Wi = Wti Wti1 , a step of Brownian motion
For a second example, consider the stochastic
across the interval. The difference is that while the ti
differential equation
in the Riemann integral may be chosen at any point in
the interval (ti 1 ,ti ), the corresponding point for the dX = X dt + X dWt
Ito integral is required to be the left endpoint of that (4)
interval. X (0) = X0
1
STRONG CONVERGENCE OF SDE
SOLVERS
The definition of convergence for SDE approximation
methods is similar to convergence for ordinary
differential equation solvers, aside from the differences
0 1 2 3 4
caused by the fact that a solution to an SDE is a
stochastic process, and each computed trajectory is
only one realization of that process. Each approximate
solution path w(t), gives a random value at T, so that
w(T) is a random variable as well. The difference
1
between the values at time T, e(T) = X(T) x(T), is
therefore a random variable.
FIGURE 2 | Solution to Langevin equation (11). The path is the A discrete-time approximation is said to
solution approximation for parameters = 10, = 1, computed by the
converge strongly to the solution X(t) at time T if
EulerMaruyama method with stepsize t i = 0.01 for all i .
TABLE 1 Average Error Versus Step Size for the EulerMaruyama factor of 4 is required to reduce the error by a factor of
and Milstein Approximations of Eq. (15) 2 with the EulerMaruyama method. For the Milstein
t EulerMaruyama Milstein
method, cutting the stepsize by a factor of 2 achieves
the same result.
2 1 0.169369 0.063864 The Milstein method is an Ito-Taylor method,
2 2 0.136665 0.035890 meaning that it is derived from a truncation of the
3
2 0.086185 0.017960 stochastic Ito-Taylor expansion of the solution. This
2 4 0.060615 0.008360 is in many cases a disadvantage, since the partial
2 5 0.048823 0.004158 derivative appears in the approximation method, and
must be provided explicitly by the user. This is
2 6 0.035690 0.002058
7
analogous to higher-order Taylor methods for solving
2 0.024277 0.000981 ordinary differential equations, which are seldom used
2 8 0.016399 0.000471 in practice for that reason. To counter this problem,
2 9 0.011897 0.000242 RungeKutta methods were developed for ODEs,
2 10 0.007913 0.000122 which trade these extra partial derivatives in the
Taylor expansion for extra function evaluations from
the readily-available differential equation.
In the SDE context, the same trade can be made
Milstein Method with the Milstein method, resulting in a strong order 1
method that requires evaluation of b(X) at two places
on each step. A heuristic derivation can be carried out
x0 = X 0 by making the replacement
xi+1 = xi + a (xi , ti ) ti + b(xi , ti )Wi b xi + b (xi ) ti b (xi )
bx (xi )
1 b b (xi ) ti
+ b (xi , ti ) (xi , ti )(Wi2 ti ). (14)
2 x
in the Milstein formula (14), which leads to the
RungeKutta method.
The Milstein method has order 1, meaning that it
will converge to the correct stochastic solution process
more quickly than EulerMaruyama as the stepsize Strong Order 1.0 RungeKutta Method
ti goes to 0. The Milstein method is identical to the
EulerMaruyama method if there is no X term in the x0 = X 0
diffusion part b(X,t) of the equation.
To compare the EulerMaruyama and Milstein xi+1 = xi + a (xi ) ti + b(xi )Wi
methods, we apply them to the BlackScholes SDE 1
+ [b(xi + b (xi ) ti ) b(xi )](Wi2 ti )/ ti .
2
dX = X dt + X dWt . (15)
A proper derivation can be found in Rumelin.17
We discussed the EulerMaruyama approxima- The orders of the methods introduced here for SDEs,18
tion above. The Milstein method becomes 1/2 for EulerMaruyama and 1 for Milstein and
the RungeKutta counterpart, would be considered
x0 = X 0 (16) low by ODE standards. Higher-order methods can
1 be developed for SDEs, but become much more
xi+1 = xi + xi ti + xi Wi + Wi2 ti . complicated as the order grows. As an example,
2
consider the strong order 1.5 scheme for the SDE
Applying the EulerMaruyama and the Milstein (13) proposed by Platen and Wagner.19
methods with decreasing stepsizes t results in
successively improved approximations as shown in
Strong Order 1.5 Taylor Method
Table 1.
The two columns represent the average of the
error {x(T) X(T)} at T = 8 over 100 realizations. The x0 = X 0
1
orders 1/2 for EulerMaruyama and 1 for Milstein are xi+1 = xi + ati + bWi + bbx Wi2 ti
clearly visible in the table. Cutting the stepsize by a 2
for all polynomials f (x). According to this definition,
1 1
+ ay Zi + aax + b2 axx ti2 all moments converge as t 0. If the stochastic
2 2 part of the equation is 0 and the initial value
1 is deterministic, the definition agrees with the
+ abx + b2 bxx (Wi ti Zi )
2 strong convergence definition, and the usual ordinary
1 1 differential equation definition.
+ b bbxx + b2x ( Wi2 ti )Wi (17) Weakly convergent methods can also be assigned
2 3 an order of convergence. We say that a solver
converges weakly with order m if the error in the
where partial derivatives are denoted by moments is of mth order in the stepsize, or
subscripts, and where the additional random variable
E f (X (T)) E f (xt (T)) = O((t)m
Z i is normally distributed with mean 0, variance
E Z2i = 13 ti3 and correlated with W i with
covariance E (Zi Wi ) = 12 ti2 . Note that Zi can for sufficiently small stepsize t.
be generated as In general, the rates of weak and strong
convergence do not agree. Unlike the case in ordinary
1 differential equations, where the Euler method has
Zi = ti Wi + Vi / 3
2 order 1, the EulerMaruyama method for SDEs is
guaranteed to converge strongly with order m = 1/2,
where V i is chosen independently from
and converge weakly with order 1.
ti N (0, 1). Higher-order weak methods can be much
Whether higher-order methods are needed in simpler than corresponding strong methods, and
a given application depends on how the resulting are available in several different forms. The most
approximate solutions are to be used. In the ordinary direct approach is to exploit the Ito-Taylor expansion
differential equation case, the usual assumption is that referred above. An example SDE solver that converges
the initial condition and the equation are known with weakly with order 2 is as follows.
accuracy. Then it makes sense to calculate the solution
as closely as possible to the same accuracy, and higher-
order methods are called for. In the context of SDEs, Weak Order 2 Taylor Method
in particular if the initial conditions are chosen from
a probability distribution, the advantages of higher- x0 = X 0
order solvers are often less compelling, and if they 1
come with added computational expense, may not be xi+1 = xi + ati + bWi + bbx Wi2 ti
2
warranted.
1 1
+ ax bZi + aax + axx b2 t2
2 2
WEAK CONVERGENCE OF SDE
1
SOLVERS + abx + bxx b2 (Wi ti Zi ) (18)
2
Strong convergence allows approximations to be
computed accurately on an individual realization where W i is chosen from ti N (0, 1) and Zi is
basis. For some usages, such detailed pathwise distributed as in the Strong Order 1.5 method.
information is required. In other applications such A second approach is to mimic the idea
as Monte Carlo estimates,2023 the goal is to learn the of RungeKutta solvers for ordinary differential
probability distribution of the solution X(T); single equations. These solvers replace the explicit higher
realizations may not be of interest. derivatives in the Ito-Taylor solvers with extra
Weak solvers are devised to fill this need. function evaluations at interior points of the current
They are often simpler than corresponding strong solution interval. Platen24,25 proposed the weak order
methods, since their goal is to replicate the probability 2 solver of RungeKutta type.
distribution only. In analogy with strong convergence,
we offer the following definition. Weak Order 2 RungeKutta Method
A discrete-time approximation xt with stepsize
t is said to converge weakly to the solution X(T) if x0 = X 0
1
lim E f (xt (T)) = E f (X (T)) xi+1 = xi + [a (u) + a(xi )]ti
t0 2
Multidimensional SDEs
So far we have described solution methods for
Error
102
scalar SDEs. Extending the methods to computational
approximation of coupled SDEs is straightforward, as
long as the noise contributions are uncorrelated. We
103
begin with such an example, and then discuss changes
needed to handle correlated noise inputs.
A common asset model in contemporary finance
104
10 101 100 is the Heston model36
Time step t
dXt = rXt dt + Vt Xt dWt1
FIGURE 3 | The mean error of the estimation of E (X (T )) for SDE
(15). The plot compares the EulerMaruyama method (circles) which dVt = ( Vt ) dt + c Vt dWt2 . (20)
has weak order 1, and the weak order 2 RungeKutta type method
(squares) given in (19). Parameters used were where Xt and V t represent asset price and volatility,
X (0) = 10, T = 1, = 3, = 0.2. respectively. The Heston model is a generalization
of the BlackScholes asset model37 that allows a specified correlation is by taking a matrix square
volatility to change stochastically, yet yields an root of R. One can use the Cholesky factorization
analytic form for the pricing of contingent assets R = CC for this purpose, or alternatively one can use
like options. If we assume that Wt1 and Wt2 are the singular value decomposition (SVD) (see Ref 8 for
independent Wiener processes, the EulerMaruyama description of both).
discrete version would be To create a noise process with correlation R,
begin with k independent, uncorrelated Wiener pro-
x0 = X 0 cesses Z1 , . . . , Zk , satisfying dZi dZi = dt, dZi dZj = 0
for i = j. Define the column vector dW = CdZ, and
v0 = V0 check that the covariance matrix, and therefore the
correlation matrix, of dW is
xi+1 = xi + rxi ti + vi xi Wi1
dWdW = CdZ CdZ
vi+1 = vi + ( vi ) ti + c vi Wi2 . (21)
= CdZdZ C
with Wi1 = = CC dt = R dt.
independent Brownian increments
zi ti , Wi = zi ti , where zi and z2i are
1 2 2 1
independent draws from the standard normal For example, we could consider two molecular
distribution. processes X1 and X2 that are driven by negatively
However, coupled SDEs often involve noise that correlated noise, say with correlation matrix
is driven by a correlated multidimensional Wiener
process. The solution of multidimensional SDEs is 1
R=
complicated in general; here we give only a glimpse of 1
the issues involved.
For where = 0.8. The matrix
multifactor Wiener processes
Wt1 , . . . , Wtk , the generalization of Itos formula
1 0
requires that (3) is replaced with C=
1 2
dt dt = dt dWti = dWti dt = 0
is the Cholesky square root of R, so the noise can be
j generated as
dWti dWt = ij dt (22)
dW 1 = dZ1
where ij represents the statistical correlation between
j
Wti and Wt . As usual, correlation of two random dW 2 = dZ1 + 1 2 dZ2 . (23)
variables X1 and X2 is defined as
ACKNOWLEDGMENT
This work was supported in part by National Science Foundation grant DMS-1216568.
REFERENCES
1. Brown R. A brief account of microscopical observations 14. Milstein G. Numerical Integration of Stochastic
made in the months of June, July and August, 1827, on Differential Equations. Dordrecht: Kluwer; 1995.
the particles contained in the pollen of plants; and on
15. Milstein G, Tretyakov M. Stochastic Numerics for
the general existence of active molecules in organic and
Mathematical Physics. Berlin, Heidelberg and New
inorganic bodies. Philos Mag 1828, 4:161173.
York: Springer; 2004.
2. Ito K. Stochastic integral. Proc Imp Acad Tokyo 1944,
16. Milstein G, Tretyakov M. Numerical integration
20:518524.
of stochastic differential equations with nonglobally
3. Gikhman I, Skorokhod A. Stochastic Differential Lipschitz coefficients. SIAM J Num Anal 2005,
Equations. Berlin: Springer; 1972. 43:11391154.
4. Klebaner F. Introduction to Stochastic Calculus with
17. Rumelin W. Numerical treatment of stochastic
Applications. London: Imperial College Press; 1998.
differential equations. SIAM J Numer Anal 1982,
5. Oksendal B. Stochastic Differential Equations: An 19:604613.
Introduction With Applications. 5th ed. Berlin,
Heidelberg and New York: Springer; 1998. 18. Tocino A, Ardanuy R. Runge-Kutta methods for
numerical solution of stochastic differential equations.
6. Steele JM. Stochastic Calculus and Financial Applica- J Comput Appl Math 2002, 138:219241.
tions. New York: Springer; 2001.
19. Platen E, Wagner W. On a Taylor formula for a class
7. Mao X. Stochastic Differential Equations and
of Ito processes. Probab Math Stat 1982, 3:3751.
Applications. 2nd ed. Chichester, UK: Horwood; 2007.
8. Sauer T. Numerical Analysis. 2nd ed. Boston: Pearson; 20. Fishman GS. Monte Carlo: Concepts, Algorithms,
2012. and Applications. Berlin, Heidelberg and New York:
Springer; 1996.
9. Maruyama G. Continuous Markov processes and
stochastic equations. Rend Circ Math Palermo 1955, 21. Gentle JE. Random Number Generation and Monte
4:4890. Carlo Methods. 2nd ed. Berlin, Heidelberg and New
York: Springer; 2003.
10. Langevin P. On the theory of Brownian motion. C R
Acad Sci (Paris) 1908, 146:530533. 22. Niederreiter H. Random Number Generation and
11. Uhlenbeck GE, Ornstein L. On the theory of Brownian Quasi-Monte Carlo Methods. Philadelphia: SIAM
motion. Phys Rev 1930, 36:823841. Publications; 1992.
12. Kloeden P, Platen E. Numerical Solution of Stochastic 23. Rubinstein RY. Simulation and the Monte Carlo
Differential Equations. Berlin: Springer; 1992. Method. New York: Wiley; 1981.
13. Milstein G. Approximate integration of stochastic 24. Platen E. Derivative-free numerical methods for
differential equations. Theory Probab Appl 1975, stochastic differential equations. Lect Notes Control
19:557600. Inform Sci 1987, 96:187193.
25. Platen E. An introduction to numerical methods for 41. Park S, Miller K. Random number generators:
stochastic differential equations. Acta Numer 1999, good ones are hard to find. Commun ACM 1988,
8:197246. 31:11921201.
26. Kloeden P, Platen E, Schurz H. Numerical Solution of 42. Hellekalek P. Good random number generators are (not
SDE Through Computer Experiments. Berlin: Springer; so) easy to find. Math Comput Simul 1998, 46:485505.
1994. 43. Marsaglia G, Zaman A. A new class of random number
27. Glasserman P. Monte Carlo Methods in Financial generators. Ann Appl Probab 1991, 1:462480.
Engineering. New York: Springer; 2004. 44. Marsaglia G, Tsang WW. The ziggurat method for
28. Sauer T. Numerical solution of stochastic differential generating random variables. J Stat Softw 2000, 5:17.
equations in finance. In: Duan J-C, Hardle W, Gentle J, 45. Romisch W, Winkler R. Stepsize control for mean-
eds. Handbook of Computational Finance. Springer, square numerical methods for stochastic differential
Berlin-Heidelberg; 2012, 529550. equations with small noise. SIAM J Sci Comput 2006,
29. Longstaff F, Schwartz E. Valuing American options 28:604625.
by simulation: a simple least-squaares approach. Rev 46. Lamba H, Mattingly JC, Stuart A. An adaptive Euler-
Financ Stud. 2001, 14:113148. Maruyama scheme for SDEs: convergence and stability.
30. Giles M. Multi-level Monte Carlo path simulation. IMA J Numer Anal 2007, 27:479506.
Oper Res 2008, 56:607617. 47. Hoffman N, Muller-Gronbach T, Ritter K. Step size
31. Heinrich S. Multilevel Monte Carlo methods. In: control for the uniform approximation of systems of
Lecture Notes on Large Scale Scientific Computing. stochastic differential equations with additive noise.
Berlin: Springer; 2001, 5867. Ann Appl Probab 2000, 10:616633.
32. Higham DJ, Mao X, Roj M, Song Q, Yin G. Mean 48. Higham DJ, Kloeden P. Numerical methods for
exit times and the multilevel Monte Carlo method. J nonlinear stochastic differential equations with jumps.
Uncertain Quant 2013, 1:218. Numerische Math 2005, 101:101119.
33. Giles M, Waterhouse B. Multi-level quasi-Monte Carlo 49. Higham DJ, Mao X, Stuart A. Strong convergence of
path simulation. Radon Series Comp Appl Math 2009, Euler-type methods for nonlinear stochastic differential
8:165181. equations. SIAM J Numer Anal 2002, 40:10411063.
34. Giles M, Higham D, Mao X. Analysing mujlei-level 50. Burrage K, Burrage PM, Mitsui T. Numerical solutions
Monte Carlo for options with non-global Lipschitz of stochastic differential equationsimplementation
payoff. Finance Stoch 2009, 13:403413. and stability issues. J Comput Appl Math 2000,
35. Hutzenthaler M, Jentzen A, Kloeden P. Strong 125:171182.
convergence of an explicit numerical method for SDEs 51. Burrage K, Burrage PM, Tian T. Numerical methods
with nonglobally Lipschitz continuous coefficients. Ann for strong solutions of stochastic differential equations:
Appl Probab 2012, 22:16111641. an overview. Proc R Soc Lond A 2004, 460:373402.
36. Heston S. A closed-form solution for options with 52. Saito Y, Mitsui T. Stability analysis of numerical
stochastic volatility with applications to bond and schemes for stochastic differential equations. SIAM J
currency options. Rev Financ Stud 1993, 6:327343. Numer Anal 1996, 33:22542267.
37. Black F, Scholes M. The pricing of options and 53. Talay D, Tubaro L. Expansion of the global error
corporate liabilities. J Polit Econ 1973, 81:637654. for numerical schemes solving stochastic differential
38. Halton JH. On the efficiency of certain quasi-random equations. Stoch Anal Appl 1990, 8:483509.
sequences of points in evaluating multi-dimensional 54. Jentzen A, Kloeden P, Neuenkirch A. Pathwise
integrals. Numer Math 1960, 2:8490. approximation of stochastic differential equations on
39. Higham DJ. An algorithmic introduction to numerical domains: higher order convergence rates without
simulation of stochastic differential equations. SIAM global Lipschitz coefficients. Numerische Math 2008,
Rev 2001, 43:525546. 112:4164.
40. Box GEP, Muller M. A note on the generation
of random normal deviates. Ann Math Stat 1958,
29:610611.