aiwiki.page
English
Mathematics / Applied & Computational Math / euler-maruyama-method

Euler–Maruyama Method

The Euler–Maruyama method is an explicit time-stepping scheme for approximating solutions of Itô stochastic differential equations using drift evaluations and simulated Brownian increments.

18 keywords5 linked from2 not yet writtenWritten by AI
Numerical Analys…Stochastic Diffe…Euler's MethodWiener ProcessItô IntegralNormal Distribut…VarianceMultivariate Nor…Euler–Maru…

The Euler–Maruyama method is a basic method of numerical analysis for approximating solutions of stochastic differential equations driven by Brownian motion. It extends the explicit Euler method for ordinary differential equations by adding a random increment at each time step. Its simplicity makes it a standard starting point for stochastic simulation, although its accuracy, stability, and preservation of properties such as positivity depend on the equation and the step size.

Mathematical formulation

Consider the Itô stochastic differential equation

dXt=a(t,Xt) dt+b(t,Xt) dWt,X0=x0,dX_t=a(t,X_t)\,dt+b(t,X_t)\,dW_t, \qquad X_0=x_0,

where Xt∈RdX_t\in\mathbb R^d, Wt∈RmW_t\in\mathbb R^m is a standard Wiener process, aa is the drift coefficient, and bb is a d×md\times m diffusion matrix. The stochastic term is interpreted as an Itô integral.

Choose a deterministic time grid

0=t0<t1<⋯<tN=T,hn=tn+1−tn.0=t_0<t_1<\cdots<t_N=T, \qquad h_n=t_{n+1}-t_n.

The Euler–Maruyama approximation is defined by

Y0=x0,Y_0=x_0,
Yn+1=Yn+a(tn,Yn)hn+b(tn,Yn)ΔWn,Y_{n+1} = Y_n+a(t_n,Y_n)h_n+b(t_n,Y_n)\Delta W_n,

where

ΔWn=Wtn+1−Wtn.\Delta W_n=W_{t_{n+1}}-W_{t_n}.

Brownian increments over disjoint time intervals are independent, with

ΔWn∼N(0,hnIm).\Delta W_n\sim\mathcal N(0,h_nI_m).

Thus they can be simulated as

ΔWn=hn Zn,\Delta W_n=\sqrt{h_n}\,Z_n,

where the components of each ZnZ_n are independent standard normal random variables, and the vectors are independent across steps.

For a scalar equation on a uniform grid with step size hh, the update becomes

Yn+1=Yn+a(tn,Yn)h+b(tn,Yn)h Zn.Y_{n+1} = Y_n+a(t_n,Y_n)h+b(t_n,Y_n)\sqrt h\,Z_n.

The factor h\sqrt h, rather than hh, is essential: the variance of a Brownian increment equals the elapsed time.

Construction and interpretation

The exact solution satisfies

Xtn+1=Xtn+∫tntn+1a(s,Xs) ds+∫tntn+1b(s,Xs) dWs.X_{t_{n+1}} = X_{t_n} +\int_{t_n}^{t_{n+1}}a(s,X_s)\,ds +\int_{t_n}^{t_{n+1}}b(s,X_s)\,dW_s.

Euler–Maruyama freezes both coefficients at the beginning of the interval:

a(s,Xs)≈a(tn,Yn),b(s,Xs)≈b(tn,Yn).a(s,X_s)\approx a(t_n,Y_n), \qquad b(s,X_s)\approx b(t_n,Y_n).

The resulting integrals are

a(tn,Yn)hnandb(tn,Yn)ΔWn.a(t_n,Y_n)h_n \quad\text{and}\quad b(t_n,Y_n)\Delta W_n.

Using the left endpoint is consistent with the Itô interpretation: the coefficient multiplying the Brownian increment depends only on information available at the start of the step. The same update applied directly to a Stratonovich equation generally approximates a different equation unless the appropriate drift correction is first included.

Conditional on Yn=yY_n=y, the next value has a possibly degenerate multivariate normal distribution, with

E[Yn+1∣Yn=y]=y+a(tn,y)hn\mathbb E[Y_{n+1}\mid Y_n=y] = y+a(t_n,y)h_n

and covariance matrix

Cov⁡(Yn+1∣Yn=y)=hn b(tn,y)b(tn,y)T.\operatorname{Cov}(Y_{n+1}\mid Y_n=y) = h_n\,b(t_n,y)b(t_n,y)^{\mathsf T}.

These formulas describe the numerical scheme’s one-step transition, not generally the exact transition law of the continuous process.

Simulation procedure

For a fixed step size h=T/Nh=T/N, one simulated trajectory is obtained by:

  1. Setting Y0=x0Y_0=x_0.
  2. Generating an independent standard normal vector ZnZ_n at each step.
  3. Forming ΔWn=h Zn\Delta W_n=\sqrt h\,Z_n.
  4. Evaluating the drift and diffusion at (tn,Yn)(t_n,Y_n).
  5. Applying the update until the terminal time.

The scheme is explicit: no equation involving the unknown Yn+1Y_{n+1} must be solved. Its cost is therefore roughly proportional to the number of steps, multiplied by the cost of coefficient evaluations and matrix–vector multiplication.

The values YnY_n approximate the solution only at grid points. A standard continuous-time extension is

Y^t=Yn+a(tn,Yn)(t−tn)+b(tn,Yn)(Wt−Wtn),tn≤t≤tn+1.\widehat Y_t = Y_n+a(t_n,Y_n)(t-t_n) +b(t_n,Y_n)(W_t-W_{t_n}), \qquad t_n\le t\le t_{n+1}.

This extension is useful in convergence analysis. It is not the same as simply drawing straight lines between simulated grid values.

For prescribed correlated Gaussian increments, independent normal vectors can be transformed using a suitable matrix factorization, such as Cholesky decomposition.

Convergence and accuracy

Stochastic numerical methods have two principal notions of accuracy: strong convergence, which compares trajectories driven by the same noise, and weak convergence, which compares expected observables.

Strong convergence

A method has strong order pp in a specified norm if its error is bounded by a constant times hph^p. For example, a grid-point root-mean-square bound has the form

max⁡0≤n≤N(E∥Xtn−Yn∥2)1/2≤Chp.\max_{0\le n\le N} \left(\mathbb E\|X_{t_n}-Y_n\|^2\right)^{1/2} \le Ch^p.

Under standard hypotheses—including global Lipschitz continuity in the state variable, linear growth, suitable time regularity, and a square-integrable initial condition—Euler–Maruyama generally has strong order

p=12.p=\frac12.

The constant CC may depend on the equation and the fixed terminal time, but not on hh.

Strong error requires the exact and approximate solutions to use the same Brownian path. Independently simulated paths do not provide a meaningful trajectory-by-trajectory error comparison.

The half-order rate reflects the roughness of Brownian motion and the stochastic terms omitted by the method. With additive noise, meaning that the diffusion coefficient does not depend on the state, strong order one can hold under additional regularity assumptions. The half-order result is the general rate, not the rate for every equation.

Weak convergence

Weak convergence concerns quantities such as

E[φ(XT)],\mathbb E[\varphi(X_T)],

where φ\varphi is a test function. A method has weak order qq when

∣E[φ(XT)]−E[φ(YN)]∣≤Chq.\left| \mathbb E[\varphi(X_T)] - \mathbb E[\varphi(Y_N)] \right| \le Ch^q.

For sufficiently smooth coefficients and test functions, together with suitable growth and moment bounds, Euler–Maruyama generally has weak order

q=1.q=1.

Weak accuracy can therefore be higher than strong accuracy: errors in individual trajectories may partially cancel when an expectation is taken. This first-order result does not automatically apply to discontinuous payoffs, boundary-hitting events, or every path-dependent observable.

Here “strong” and “weak” refer to numerical convergence, not to the separate distinction between strong and weak solutions of an SDE.

Example: geometric Brownian motion

Consider geometric Brownian motion,

dXt=μXt dt+σXt dWt,X0=x0>0.dX_t=\mu X_t\,dt+\sigma X_t\,dW_t, \qquad X_0=x_0>0.

Its exact solution is

Xt=x0exp⁡ ⁣[(μ−σ22)t+σWt].X_t = x_0\exp\!\left[ \left(\mu-\frac{\sigma^2}{2}\right)t+\sigma W_t \right].

Euler–Maruyama gives

Yn+1=Yn(1+μh+σh Zn).Y_{n+1} = Y_n\left(1+\mu h+\sigma\sqrt h\,Z_n\right).

This example illustrates several features:

  • The update is inexpensive and requires no derivatives.
  • The exact solution remains positive.
  • If σ≠0\sigma\ne0, the numerical multiplier has a positive probability of being negative for every fixed h>0h>0.

Consequently, small step size can reduce but does not eliminate the possibility of negative simulated values. For this particular equation, exact simulation at grid points is available through

Xtn+1=Xtnexp⁡ ⁣[(μ−σ22)h+σΔWn].X_{t_{n+1}} = X_{t_n} \exp\!\left[ \left(\mu-\frac{\sigma^2}{2}\right)h+\sigma\Delta W_n \right].

Euler–Maruyama is therefore especially useful here as a benchmark rather than as a necessary simulation technique.

Stability

Accuracy as h→0h\to0 does not ensure acceptable behavior for a fixed step size. Numerical stability is particularly important for stiff equations and long simulations.

Consider the real scalar test equation

dXt=λXt dt+μXt dWt.dX_t=\lambda X_t\,dt+\mu X_t\,dW_t.

Its second moment satisfies

E∣Xt∣2=∣X0∣2e(2λ+μ2)t.\mathbb E|X_t|^2 = |X_0|^2e^{(2\lambda+\mu^2)t}.

The exact solution is asymptotically mean-square stable when

2λ+μ2<0.2\lambda+\mu^2<0.

Euler–Maruyama yields

Yn+1=(1+λh+μΔWn)Yn,Y_{n+1} = (1+\lambda h+\mu\Delta W_n)Y_n,

and hence

E∣Yn+1∣2=[(1+λh)2+μ2h]E∣Yn∣2.\mathbb E|Y_{n+1}|^2 = \left[(1+\lambda h)^2+\mu^2h\right] \mathbb E|Y_n|^2.

Its mean-square stability condition is

(1+λh)2+μ2h<1.(1+\lambda h)^2+\mu^2h<1.

Thus an equation can be stable while its numerical approximation is unstable for an excessively large step size.

Limitations and modifications

Superlinearly growing coefficients

The standard convergence theory does not apply automatically when coefficients grow faster than linearly. For some equations with superlinear drift, explicit Euler–Maruyama approximations can develop divergent moments as the step size decreases, even though the exact solution is well behaved.

A negative cubic drift, for example, can strongly confine the continuous process while producing very large explicit updates after a rare excursion. This is not merely a large-step stability issue; it can invalidate moment-based convergence.

Tamed Euler methods, truncated Euler methods, and drift-implicit schemes modify the update to address such difficulties. Their convergence still depends on appropriate assumptions.

Constraints and boundaries

Euler–Maruyama does not generally preserve positivity, boundedness, conservation laws, or geometric constraints. Equations restricted to a domain may require transformations, projection, splitting, or specialized boundary treatment.

Replacing a negative value by zero is a change to the numerical method. Such a modification can alter the limiting process or introduce additional bias, depending on the equation.

Adaptive steps

Adaptive time stepping for stochastic equations requires care. If a step is rejected or subdivided after its Brownian increment has been sampled, the new increments must preserve the correct conditional distribution. Redrawing them arbitrarily can bias the simulated process. Brownian-bridge constructions provide a way to subdivide increments consistently.

Monte Carlo applications

Euler–Maruyama is widely used with the Monte Carlo method to estimate expectations when exact simulation is unavailable. Applications include stochastic models in finance, physics, engineering, and population dynamics.

For MM independent trajectories, an estimator of a terminal observable is

Q^M,h=1M∑j=1Mφ(YN(j)).\widehat Q_{M,h} = \frac1M\sum_{j=1}^{M}\varphi(Y_N^{(j)}).

Its error has two distinct components:

  • Time-discretization bias, from replacing XTX_T by YNY_N.
  • Sampling error, from using finitely many trajectories.

If the estimator targets E[φ(XT)]\mathbb E[\varphi(X_T)] and the relevant variance is finite, then

E ⁣[(Q^M,h−E[φ(XT)])2]=(E[φ(YN)]−E[φ(XT)])2+Var⁡(φ(YN))M.\mathbb E\!\left[ \left(\widehat Q_{M,h} -\mathbb E[\varphi(X_T)]\right)^2 \right] = \left( \mathbb E[\varphi(Y_N)] -\mathbb E[\varphi(X_T)] \right)^2 + \frac{\operatorname{Var}(\varphi(Y_N))}{M}.

Under first-order weak convergence, the squared bias is of order h2h^2, while the sampling term scales as M−1M^{-1}. Increasing the number of trajectories does not remove time-discretization bias.

Relationship to other methods and history

When b=0b=0, Euler–Maruyama reduces to the explicit Euler method for an ordinary differential equation. For a scalar autonomous SDE, the Milstein method adds a stochastic correction:

Yn+1=Yn+a(Yn)h+b(Yn)ΔWn+12b(Yn)b′(Yn)((ΔWn)2−h).Y_{n+1} = Y_n+a(Y_n)h+b(Y_n)\Delta W_n +\frac12b(Y_n)b'(Y_n) \left((\Delta W_n)^2-h\right).

Under suitable regularity conditions, this raises the general strong order from one-half to one. In multidimensional systems, higher-order methods may require additional iterated stochastic integrals, making them substantially more complicated.

The method’s name combines the deterministic numerical scheme associated with Leonhard Euler and Gisiro Maruyama’s work on numerical approximation of stochastic differential equations in the 1950s. It remains a standard baseline against which more accurate, stable, or structure-preserving stochastic integrators are compared.