Stochastic Differential Equations

the Euler-Maruyama scheme

/ OY-ler mah-roo-YAH-mah /

The Euler-Maruyama scheme is the simplest numerical method for simulating the solution of an SDE — the direct stochastic analogue of the explicit Euler method for ODEs. Since almost no SDE can be solved in closed form, simulation is how diffusions are actually used in practice (Monte Carlo pricing, particle filters, sampling), and Euler-Maruyama is the default first tool. It answers: how do I generate an approximate path of dX = b(X) dt + sigma(X) dB on a computer?

Discretize time into steps of size h = T/N at grid points t_n = n h. Starting from the known X_0, the recursion is X_{n+1} = X_n + b(X_n) h + sigma(X_n) Delta B_n, where Delta B_n = B_{t_{n+1}} - B_{t_n} are the Brownian increments — independent N(0, h) Gaussians, easy to simulate. So each step adds the deterministic drift over the interval plus a fresh Gaussian shock scaled by sigma; note the noise increment scales like sqrt(h), not h, which is the hallmark of diffusion. Its accuracy is measured two ways. Strong order measures pathwise accuracy: E[ |X_T - X^h_T| ] = O(h^(1/2)), so Euler-Maruyama has strong order 1/2 — to halve the pathwise error you must quarter the step. Weak order measures accuracy of distributions: |E[g(X_T)] - E[g(X^h_T)]| = O(h) for smooth g, so it has weak order 1. The gap between the two orders comes from the stochastic integral term: Euler-Maruyama freezes sigma(X_n) over the step but ignores the variation of sigma within the step, an error of order h in the integral that the Milstein correction fixes.

Euler-Maruyama is the workhorse precisely because it is trivial to code and needs only the increments of one Brownian motion. The honest caveats are important. Its strong order is only 1/2 (worse than the ODE Euler's order 1) because of the noise; if you need pathwise accuracy use Milstein (strong order 1). For computing expectations the weak order 1 is what matters, and Euler is competitive there. The scheme can be numerically unstable or violate the domain of the process: for the CIR/Bessel square-root diffusion a naive Euler step can drive the argument of the square root negative, so it must be modified (full truncation, reflection, or an implicit/specialized scheme). And the convergence orders require the coefficients to be sufficiently smooth (Lipschitz with bounded derivatives); for non-Lipschitz or superlinear coefficients standard Euler-Maruyama can even diverge, and tamed or implicit variants are needed.

To simulate geometric Brownian motion dX = mu X dt + sigma X dB with step h, draw Z_n ~ N(0,1) and iterate X_{n+1} = X_n + mu X_n h + sigma X_n sqrt(h) Z_n. The pathwise error against the exact X_T = X_0 exp((mu - sigma^2/2)T + sigma B_T) shrinks like sqrt(h) (strong order 1/2), while the error in E[X_T] shrinks like h (weak order 1).

Euler-Maruyama for GBM: strong order 1/2 (pathwise), weak order 1 (distributions).

The strong order is only 1/2 because of the noise — don't expect ODE-Euler's order 1 for pathwise accuracy. Stated orders need smooth (Lipschitz, bounded-derivative) coefficients; for non-Lipschitz or superlinear coefficients plain Euler-Maruyama can diverge and you need tamed/implicit variants, and CIR needs a positivity-preserving fix.

Also called
Euler-Maruyama methodstochastic Euler scheme歐拉-丸山方法隨機歐拉法