- Research
- Open Access
Numerical methods for simulation of stochastic differential equations
- Mustafa Bayram^{1}Email author,
- Tugcem Partal^{2} and
- Gulsen Orucova Buyukoz^{3}
https://doi.org/10.1186/s13662-018-1466-5
© The Author(s) 2018
- Received: 23 May 2017
- Accepted: 2 January 2018
- Published: 15 January 2018
Abstract
In this paper we are concerned with numerical methods to solve stochastic differential equations (SDEs), namely the Euler-Maruyama (EM) and Milstein methods. These methods are based on the truncated Ito-Taylor expansion. In our study we deal with a nonlinear SDE. We approximate to numerical solution using Monte Carlo simulation for each method. Also exact solution is obtained from Ito’s formula. To show the effectiveness of the numerical methods, approximation solutions are compared with exact solution for different sample paths. And finally the results of numerical experiments are supported with graphs and error tables.
Keywords
- stochastic differential equations
- Monte Carlo methods
- Euler-Maruyama method
- Milstein method
1 Introduction
Until recently, many of the models ignored stochastic effects because of difficulty in solution. But now, stochastic differential equations (SDEs) play a significant role in many departments of science and industry because of their application for modeling stochastic phenomena, e.g., finance, population dynamics, biology, medicine and mechanics. If we add a random element or elements to the deterministic differential equation, we have transition from an ordinary differential equation to SDE. Unfortunately, in many cases analytic solutions are not available for these equations, so we are required to use numerical methods [1, 2] to approximate the solution. [3–6] discussed the numerical solutions of SDEs. [7] presented many numerical experiments. Some analytical and numerical solutions were proposed in [8]. [9] considered numerical approximations of random periodic solutions for SDEs. On the other hand, [10] constructed a Milstein scheme by adding an error correction term for solving stiff SDEs.
- 1.
\(W(0)=0\) (w.p.1);
- 2.
\(W(t)-W(s) \sim\sqrt{t-s} N(0,1)\) for \(0\leq s < t\), where \(N(0,1)\) indicates a standard normal random variable;
- 3.
Increments \(W(t)-W(s)\) and \(W(\tau)- W(\upsilon)\) are independent on distinct time intervals for \(0\leq s< t<\tau< \upsilon\).
2 Monte Carlo simulations
Monte Carlo methods are numerical methods, where random numbers are used to conduct a computational experiment. Numerical solution of stochastic differential equations can be viewed as a type of Monte Carlo calculation. Monte Carlo simulation is perchance the most common technique for propagating the incertitude in the various aspects of a system to the predicted performance.
In Monte Carlo simulation, the entire system is simulated a large number of times. So, a set of suitable sample paths is produced on \([t_{0},T]\). Each simulation is equally likely, referred to as a realization of the system. For each realization, all of the uncertain parameters are sampled. For each sample, we produce a sample path solution to the SDE on \([t_{0},T]\). This is generally obtained from the stochastic Taylor formula, which was derived in [13], for the solution X of the SDE, on a small subinterval of \([t_{0},T]\) [5, 14]. From the Ito-Taylor expansion, we can construct numerical schemes for (1) over the interval \([t_{i},t_{i+1}]\).
3 Stochastic Taylor series expansion
The Taylor formula plays a very significant role in numerical analysis. We can obtain the approximation of a sufficiently smooth function in a neighborhood of a given point to any desired order of accuracy with the Taylor formula.
Enlarging the increments of smooth functions of Ito processes, it is beneficial to have a stochastic expansion formula with correspondent specialities to the deterministic Taylor formula. Such a stochastic Taylor formula has some possibilities. One of these possibilities is an Ito-Taylor expansion obtained via Ito’s formula [7].
3.1 Ito-Taylor expansion
3.2 Euler-Maruyama method
3.3 Milstein method
Note that \(g'(X(t_{i}))\) is differentiation of \(g(X(t_{i}))\), and if the type of SDE is an additive noise SDE, then the Milstein method leads to the Euler-Maruyama method.
4 Application
Estimation values for Euler-Maruyama and Milstein methods
N | Euler-Maruyama estimation | Milstein estimation |
---|---|---|
2^{9} | 35.0213 | 35.0531 |
2^{10} | 35.1408 | 35.0277 |
2^{11} | 35.2520 | 35.2222 |
2^{12} | 35.3850 | 35.4594 |
2^{13} | 5.3261 | 35.5083 |
Calculated mean square errors for Euler-Maruyama and Milstein methods
N | Euler-Maruyama estimation | Milstein estimation |
---|---|---|
2^{9} | 1.80e − 01 | 8.26e − 02 |
2^{10} | 7.01e − 02 | 2.04e − 02 |
2^{11} | 2.98e − 02 | 5.30e − 03 |
2^{12} | 1.40e − 02 | 1.30e − 03 |
2^{13} | 6.80e − 03 | 3.34e − 04 |
Upper left and lower left graphs show that the exact solution of (23) \(X{\mathit{exact}}_{\mathit{mean}}\) holds average of exact solution which is plotted as blue asterisks connected with dashed lines. \(X_{\mathit{exact}}\) keeps exact solutions of (23) along individual paths on the interval \([0,1]\).
5 Conclusion
In this paper we have studied the Euler and Milstein schemes which are obtained from the truncated Ito-Taylor expansion already proposed in [7]. Then we implemented these schemes to a nonlinear stochastic differential equation for comparing the EM and Milstein methods to each other while illustrating efficiency. Moreover, we calculated estimation values for Euler-Maruyama and Milstein methods so as to analyze similarities between the exact solution and numerical approximations. Then we investigated approximations for 2^{9}, 2^{10}, 2^{11}, 2^{12} and 2^{13} discretization in the interval \([0,1]\) with 10,000 different sample paths. According to our results, we can say that when the discretization value N is increasing, numerical solutions achieved from Euler-Maruyama and Milstein schemes are close to exact solution, and our results in the tables show that the Milstein method is more effective than the Euler-Maruyama method.
Declarations
Acknowledgements
The authors would like to thank the referee for his valuable comments and suggestions which improved the paper into its present form.
Authors’ contributions
The authors have made the same contribution. All authors read and approved the final manuscript.
Competing interests
The authors declare that they have no competing interests.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
- Bayram, M: Automatic analysis of the control of metabolic networks. Comput. Biol. Med. 26(5), 401-408 (1996) View ArticleGoogle Scholar
- Guzel, N, Bayram, M: Numerical solution of differential-algebraic equations with index-2. Appl. Math. Comput. 174(2), 1279-1289 (2006) MathSciNetMATHGoogle Scholar
- Allen, E: Modeling with Itô Stochastic Differential Equations. Mathematical Modelling: Theory and Applications, vol. 22 (2007) MATHGoogle Scholar
- Carletti, M, Burrage, K, Burrage, PM: Numerical simulation of stochastic ordinary differential equations in biomathematical modelling. Math. Comput. Simul. 64(2), 271-277 (2004) MathSciNetView ArticleMATHGoogle Scholar
- Tocino, A, Ardanuy, R: Runge-Kutta methods for numerical solution of stochastic differential equations. J. Comput. Appl. Math. 138(2), 219-241 (2002) MathSciNetView ArticleMATHGoogle Scholar
- Song, M, Yu, H: Convergence and stability of implicit compensated Euler method for stochastic differential equations with Poisson random measure. Adv. Differ. Equ. 2012(1), 214 (2012) MathSciNetView ArticleMATHGoogle Scholar
- Kloeden, PE, Platen, E: Numerical Solution of Stochastic Differential Equations. Springer, New York (1992) View ArticleMATHGoogle Scholar
- Farnoosh, R, Rezazadeh, H, Sobhani, A, Behboudi, M: Analytical solutions for stochastic differential equations via martingale processes. Math. Sci. 9(2), 87-92 (2015) MathSciNetView ArticleGoogle Scholar
- Zhan, Q: Mean-square numerical approximations to random periodic solutions of stochastic differential equations. Adv. Differ. Equ. 2015(1), 292 (2015) MathSciNetView ArticleGoogle Scholar
- Yin, Z, Gan, S: An improved Milstein method for stiff stochastic differential equations. Adv. Differ. Equ. 2015(1), 369 (2015) MathSciNetView ArticleGoogle Scholar
- Maruyama, G: Continuous Markov processes and stochastic equations. Rend. Circ. Mat. Palermo 4(1), 48-90 (1955) MathSciNetView ArticleMATHGoogle Scholar
- Milstein, G: Approximate integration of stochastic differential equations. Theory Probab. Appl. 19(3), 557-562 (1975) View ArticleGoogle Scholar
- Wagner, W, Platen, E: Approximation of Ito integral equations (1978) Google Scholar
- Malham, SJ, Wiese, A: An introduction to sde simulation. arXiv preprint arXiv:1004.0646 (2010)
- Gikhman, II, Skorokhod, AV: Stochastic differential equations (1972) Google Scholar
- Mil’shtein, G: A method of second-order accuracy integration of stochastic differential equations. Theory Probab. Appl. 23(2), 396-401 (1979) MathSciNetView ArticleGoogle Scholar
- Talay, D: Efficient numerical schemes for the approximation of expectations of functionals of the solution of a sde, and applications, 294-313 (1984) Google Scholar
- Higham, DJ: An algorithmic introduction to numerical simulation of stochastic differential equations. SIAM Rev. 43(3), 525-546 (2001) MathSciNetView ArticleMATHGoogle Scholar