Euler–Maruyama Method
   HOME

TheInfoList



OR:

In
Itô calculus Itô calculus, named after Kiyosi Itô, extends the methods of calculus to stochastic processes such as Brownian motion (see Wiener process). It has important applications in mathematical finance and stochastic differential equations. The cent ...
, the Euler–Maruyama method (also simply called the Euler method) is a method for the approximate
numerical solution Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods t ...
of a
stochastic differential equation A stochastic differential equation (SDE) is a differential equation in which one or more of the terms is a stochastic process, resulting in a solution which is also a stochastic process. SDEs have many applications throughout pure mathematics an ...
(SDE). It is an extension of the
Euler method In mathematics and computational science, the Euler method (also called the forward Euler method) is a first-order numerical analysis, numerical procedure for solving ordinary differential equations (ODEs) with a given Initial value problem, in ...
for
ordinary differential equation In mathematics, an ordinary differential equation (ODE) is a differential equation (DE) dependent on only a single independent variable (mathematics), variable. As with any other DE, its unknown(s) consists of one (or more) Function (mathematic ...
s to stochastic differential equations named after
Leonhard Euler Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
and Gisiro Maruyama. The same generalization cannot be done for any arbitrary deterministic method.


Definition

Consider the stochastic differential equation (see
Itô calculus Itô calculus, named after Kiyosi Itô, extends the methods of calculus to stochastic processes such as Brownian motion (see Wiener process). It has important applications in mathematical finance and stochastic differential equations. The cent ...
) :\mathrm X_t = a(X_t, t) \, \mathrm t + b(X_t, t) \, \mathrm W_t, with
initial condition In mathematics and particularly in dynamic systems, an initial condition, in some contexts called a seed value, is a value of an evolving variable at some point in time designated as the initial time (typically denoted ''t'' = 0). Fo ...
''X''0 = ''x''0, where ''W''''t'' denotes the
Wiener process In mathematics, the Wiener process (or Brownian motion, due to its historical connection with Brownian motion, the physical process of the same name) is a real-valued continuous-time stochastic process discovered by Norbert Wiener. It is one o ...
, and suppose that we wish to solve this SDE on some interval of time , ''T'' Then the Euler–Maruyama approximation to the true solution ''X'' is the
Markov chain In probability theory and statistics, a Markov chain or Markov process is a stochastic process describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Informally ...
''Y'' defined as follows: * Partition the interval , ''T''into ''N'' equal subintervals of width \Delta t>0: ::0 = \tau_ < \tau_ < \cdots < \tau_ = T \text \Delta t = T/N; * Set ''Y''0 = ''x''0 * Recursively define ''Y''''n'' for 0 ≤ ''n'' ≤ ''N-1'' by ::\, Y_ = Y_n + a(Y_n, \tau_n) \, \Delta t + b(Y_n, \tau_n) \, \Delta W_n, :where ::\Delta W_n = W_ - W_. The
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
s Δ''W''''n'' are
independent and identically distributed Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in Pennsylvania, United States * Independentes (English: Independents), a Portuguese artist ...
normal random variables with
expected value In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
zero and
variance In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable. The standard deviation (SD) is obtained as the square root of the variance. Variance is a measure of dispersion ...
Δ''t''.


Derivation

The Euler-Maruyama formula can be derived by considering the integral form of the Itô SDE :X_ = X_ + \int_^ a(X_s, s) \, ds + \int_^ b(X_s, s) \, dW_s and approximating a(X_s, s) \approx a(X_n, \tau_n) and b(X_s, s) \approx b(X_n, \tau_n) on the small time interval tau_n, \tau_/math>.


Strong and weak convergence

Like other approximation methods, the accuracy of the Euler–Maruyama scheme is analyzed through comparison to an underlying continuous solution. Let X denote an Itô process over ,T/math>, equal to : X_t = X_0 + \int_0^t \mu(s, X_s) ds + \int_0^t \sigma(s, X_s) dW_s at time t \in ,T/math>, where \mu and \sigma denote deterministic "drift" and "diffusion" functions, respectively, and W_t is the
Wiener process In mathematics, the Wiener process (or Brownian motion, due to its historical connection with Brownian motion, the physical process of the same name) is a real-valued continuous-time stochastic process discovered by Norbert Wiener. It is one o ...
. As discrete approximations of continuous processes are typically assessed through comparison between their respective final states at T>0, a natural convergence criterion for such discrete processes is : \lim_ \mathbb \left \hat_N - X_T \ \right= 0. Here, \hat_N corresponds to the final state of the discrete process \hat, which approximates X_T by taking N steps of length \Delta t = T/N. Iterative schemes satisfying the above condition are said to strongly converge to the continuous process X, which automatically implies their satisfaction of the weak convergence criterion, : \lim_ \mathbb \left g(\hat_N) - g(X_T) \ \right= 0, for any smooth function g. More specifically, if there exists a constant K and \gamma_s, \delta_0 > 0 such that : \mathbb \left \hat_N - X_T \ \right\leq K \delta_0^ for any \delta \in (0,\delta_0), the approximation converges strongly with order \gamma_s to the continuous process X; likewise, \hat converges weakly to X with order \gamma_w if the same inequality holds with g(\hat_N) - g(X_T) in place of \hat_N - X_T. Strong order \gamma_s convergence implies weak order \gamma_w \geq \gamma_s convergence: exemplifying this, it was shown in 1972 that the Euler–Maruyama method strongly converges with order \gamma_s = 1/2 to any Itô process, provided \mu, \sigma satisfy Lipschitz continuity and linear growth conditions with respect to x, and in 1974, the Euler–Maruyama scheme was proven to converge weakly with order \gamma_w = 1 to Itô processes governed by the same such \mu, \sigma, provided that their derivatives also satisfy similar conditions.


Example with geometric Brownian motion

A simple case to analyze is
geometric Brownian motion A geometric Brownian motion (GBM) (also known as exponential Brownian motion) is a continuous-time stochastic process in which the logarithm of the randomly varying quantity follows a Brownian motion (also called a Wiener process) with drift. It ...
, which satisfies the SDE :dX_t = \lambda X_t\,dt + \sigma X_t\,dW_t for fixed \lambda and \sigma. Applying Itô’s lemma to \ln X_t yields the closed-form solution : X_t = X_0 \exp\left( \left(\lambda - \tfrac \sigma^2\right)t + \sigma W_t \right) Discretising with Euler–Maruyama gives the time-step updates : Y_ = \left(1 + \lambda\Delta t + \sigma\Delta W_n\right) Y_n = Y_0 \prod_^ \left(1 + \lambda\Delta t + \sigma\Delta W_k\right) By using a
Taylor series In mathematics, the Taylor series or Taylor expansion of a function is an infinite sum of terms that are expressed in terms of the function's derivatives at a single point. For most common functions, the function and the sum of its Taylor ser ...
expansion of the exponential function in the analytic solution, we can get a formula for the exact update in a time-step. : \begin X_ &= X_ \exp\left( (\lambda - \tfrac\sigma^2)\Delta t + \sigma\Delta W_k \right) \\ & = X_\left 1 + \lambda\Delta t + \sigma\Delta W_k + \tfrac\sigma^2\left((\Delta W_k)^2 - \Delta t\right) + O\left(\Delta t^\right) \right\\ \end Summing the local errors between the analytic and Euler-Maruyama solutions over each of the N = T / \Delta t steps gives the strong error estimate : \mathbb\left X_T - Y_N, \,\right= O\left(\sqrt\right) confirming strong order 1/2 convergence. Another numerical aspect to consider is stability. The path's second moment is \mathbb, X_t, ^2 \propto \exp\left((2\lambda + \sigma^2)t\right) , so long-time decay of the solution occurs only when 2\lambda + \sigma^2 < 0. The Euler–Maruyama scheme preserves variance decay in this case provided that \Delta t \leq \frac\left(2\lambda + \sigma^2\right) .


Application

An area that has benefited significantly from SDEs is
mathematical biology Mathematical and theoretical biology, or biomathematics, is a branch of biology which employs theoretical analysis, mathematical models and abstractions of living organisms to investigate the principles that govern the structure, development ...
. As many biological processes are both stochastic and continuous in nature, numerical methods of solving SDEs are highly valuable in the field.


References

{{DEFAULTSORT:Euler-Maruyama method Numerical differential equations Stochastic differential equations Leonhard Euler Articles with example Python (programming language) code Articles with example MATLAB/Octave code