Tutorials › Stochastic Calculus › Euler-Maruyama Errors for Geometric Brownian Motion

Simulating SDEs: Euler-Maruyama and Milstein · Tutorial 521 of 600

Euler-Maruyama Errors for Geometric Brownian Motion

Learn to compute Euler–Maruyama paths for geometric Brownian motion and quantify their coupled strong error and moment bias against the exact solution.

Intermediate 10 min read

What You'll Learn

  • Write the exact geometric Brownian motion solution and the Euler–Maruyama recurrence on one Brownian grid.
  • Distinguish coupled strong error from weak bias in expectations.
  • Derive exact mean-square error and moment formulas for the Euler approximation.
  • Identify the leading strong-error and weak-bias terms as the step size decreases.
  • Check path calculations and moment comparisons with exact parameter choices.

One Brownian Path, Two Approximations

For geometric Brownian motion, the exact solution is available, so Euler–Maruyama can be assessed directly rather than only through asymptotic order statements. The comparison depends on the question being asked. A strong error compares the exact and numerical values driven by the same Brownian increments. A weak error compares expectations, such as the means or second moments, and does not require matching individual paths.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a standard Brownian motion \(B_t\). Fix \(T>0\), initial value \(S_0\), and constants \(\mu,\sigma\in\mathbb{R}\). The stochastic integral below is an Ito integral: its integrand is progressively measurable and belongs to \(\mathcal{L}^2\), meaning \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\). Here \(H_s=\sigma S_s\); the exact solution has finite second moments, so this condition holds. All expectations and errors in this tutorial are under \(\mathbb{P}\); no risk-neutral measure is used.

Definition: The geometric Brownian motion considered here solves \(dS_t=\mu S_t\,dt+\sigma S_t\,dB_t\), with \(S_0\) prescribed. The coefficient \(\mu S_t\) is the drift and \(\sigma S_t\) is the diffusion coefficient. With grid \(t_n=nh\), \(h=T/N\), and \(\Delta B_n=B_{t_{n+1}}-B_{t_n}\), its Euler–Maruyama approximation is \(Y_0=S_0\), \(Y_{n+1}=Y_n(1+\mu h+\sigma\Delta B_n)\).

This is an Ito SDE and the update uses Ito Brownian increments. In Ito differential bookkeeping, \(dB_t\,dB_t=dt\), \(dB_t\,dt=0\), and \(dt\,dt=0\). A Stratonovich integral is a different convention: for this diffusion, \(\sigma S_t\circ dB_t=\sigma S_t\,dB_t+\tfrac12\sigma^2S_t\,dt\). Thus one should not silently replace the Ito drift \(\mu S_t\) by a Stratonovich drift. The exact solution and Euler recurrence below are both for the stated Ito equation.

The Exact Solution and the Meaning of Strong Error

The solution is \(S_t=S_0\exp((\mu-\tfrac12\sigma^2)t+\sigma B_t)\). To verify it, apply Ito's formula to \(F(t,x)=S_0\exp((\mu-\tfrac12\sigma^2)t+\sigma x)\). Its derivatives are \(F_t=(\mu-\tfrac12\sigma^2)F\), \(F_x=\sigma F\), and \(F_{xx}=\sigma^2F\). The Ito correction is \(\tfrac12F_{xx}\,dt=\tfrac12\sigma^2F\,dt\), giving \(dF=\mu F\,dt+\sigma F\,dB_t\), with \(F(0,0)=S_0\).

Definition: The gridpoint strong mean-square error at \(t_n\) is \(\mathbb{E}|S_{t_n}-Y_n|^2\), where \(S_{t_n}\) and \(Y_n\) use the same Brownian increments. Its square root is the root-mean-square strong error. A weak moment bias, by contrast, is the difference between a moment of \(Y_n\) and the corresponding moment of \(S_{t_n}\).

The shared increments matter: for each step, the exact multiplier and Euler multiplier are functions of the same \(\Delta B_n\). This coupling makes it possible to compute the strong error exactly.

Worked Example: An Euler Path on a Two-Step Grid

Take \(S_0=2\), \(\mu=\tfrac12\), \(\sigma=\tfrac12\), \(T=1\), and \(N=2\). For an increment input \(\Delta B_0=\tfrac14\), \(\Delta B_1=-\tfrac14\), compute the exact and Euler grid values. These are specified increment values for illustrating the coupled calculation, not an assertion that a Brownian increment equals a particular value with positive probability.

Here \(h=\tfrac12\). The first Euler multiplier is \(1+\tfrac12\cdot\tfrac12+\tfrac12\cdot\tfrac14=\tfrac{11}{8}\), so \(Y_1=2\cdot\tfrac{11}{8}=\tfrac{11}{4}\). The second multiplier is \(1+\tfrac14-\tfrac18=\tfrac98\), so \(Y_2=\tfrac{11}{4}\cdot\tfrac98=\tfrac{99}{32}\).

The cumulative Brownian values are \(B_{t_1}=\tfrac14\) and \(B_{t_2}=0\). The exact exponent is \((\mu-\tfrac12\sigma^2)t+\sigma B_t=\tfrac38t+\tfrac12B_t\). Hence \(S_{t_1}=2e^{3/16+1/8}=2e^{5/16}\), and \(S_{t_2}=2e^{3/8}\). The gridpoint errors \(Y_n-S_{t_n}\) are therefore \(\tfrac{11}{4}-2e^{5/16}\) and \(\tfrac{99}{32}-2e^{3/8}\), approximately \(0.01632\) and \(0.1838\).

Check: Directly multiplying the Euler factors gives \(2\cdot\tfrac{11}{8}\cdot\tfrac98=\tfrac{99}{32}\), as above. The exact endpoint uses total increment \(\tfrac14-\tfrac14=0\), so its value \(2e^{3/8}\) also follows directly from the exact solution.

Exact Formula for the Coupled Strong Error

Theorem: Let \(h=T/N\) and define \(q=1+ (2\mu+\sigma^2)h+\mu^2h^2\) and \(c=e^{\mu h}(1+(\mu+\sigma^2)h)\). For each \(n=0,\ldots,N\), $$ \mathbb{E}|S_{t_n}-Y_n|^2 =S_0^2\left(e^{(2\mu+\sigma^2)t_n}+q^n-2c^n\right). $$

Proof. On step \(i\), write \(Z=\Delta B_i\), which has distribution \(N(0,h)\). The exact multiplier is \(R=\exp((\mu-\tfrac12\sigma^2)h+\sigma Z)\), and the Euler multiplier is \(A=1+\mu h+\sigma Z\). Independence of Brownian increments makes the pairs \((R_i,A_i)\) independent across steps. First, \(\mathbb{E}[R^2]=e^{(2\mu+\sigma^2)h}\), so \(\mathbb{E}[S_{t_n}^2]=S_0^2e^{(2\mu+\sigma^2)t_n}\). Also, \(\mathbb{E}[A^2]=(1+\mu h)^2+\sigma^2h=q\), because \(\mathbb{E}Z=0\) and \(\mathbb{E}Z^2=h\); consequently \(\mathbb{E}[Y_n^2]=S_0^2q^n\).

For the mixed moment, the normal moment-generating function gives \(\mathbb{E}e^{\sigma Z}=e^{\sigma^2h/2}\) and \(\mathbb{E}[Ze^{\sigma Z}]=\sigma h e^{\sigma^2h/2}\). Therefore $$ \mathbb{E}[RA] =e^{(\mu-\sigma^2/2)h}\left((1+\mu h)e^{\sigma^2h/2}+\sigma^2h e^{\sigma^2h/2}\right) =e^{\mu h}(1+(\mu+\sigma^2)h)=c. $$ Independence across steps now gives \(\mathbb{E}[S_{t_n}Y_n]=S_0^2c^n\). Expanding the square, $$ \mathbb{E}|S_{t_n}-Y_n|^2 =\mathbb{E}[S_{t_n}^2]+\mathbb{E}[Y_n^2]-2\mathbb{E}[S_{t_n}Y_n], $$ which yields the formula. It also covers \(n=0\), when the error is zero. \(\square\)

The formula gives the mean-square error at any gridpoint, not only at maturity. For fixed \(T\) and \(N\to\infty\), the leading term can also be identified. Set \(\lambda=2\mu+\sigma^2\) and \(a=\mu+\sigma^2\). Taylor expansion at \(h=0\) gives $$ \log q=\lambda h+(\mu^2-\tfrac12\lambda^2)h^2+O(h^3),\qquad \log c=\lambda h-\tfrac12a^2h^2+O(h^3). $$ Since \(Nh=T\), exponentiating these expansions in the exact error formula gives $$ \mathbb{E}|S_T-Y_N|^2 =S_0^2e^{\lambda T}\left(\tfrac12\sigma^4T h+O(h^2)\right). $$ Indeed, the coefficient inside the brackets is \(\mu^2-\tfrac12\lambda^2+a^2=\tfrac12\sigma^4\). For \(\sigma\ne0\) and \(S_0\ne0\), the root-mean-square terminal error is thus of order \(h^{1/2}\). If \(\sigma=0\), the leading term vanishes; the displayed asymptotic does not claim a nonzero order-\(h\) mean-square error in that case.

Worked Example: Exact Strong Error for One Euler Step

Take \(S_0=1\), \(\mu=0\), \(\sigma=1\), \(T=1\), and \(N=1\). Then \(h=1\), \(q=2\), and \(c=e^0(1+1)=2\). The exact strong mean-square error is $$ \mathbb{E}|S_1-Y_1|^2=e+2-2\cdot2=e-2\approx0.7183. $$ The root-mean-square error is \(\sqrt{e-2}\approx0.8475\).

Check: In this case \(S_1=e^{-1/2+B_1}\) and \(Y_1=1+B_1\). The exact second moment is \(\mathbb{E}[S_1^2]=e\), the Euler second moment is \(\mathbb{E}[(1+B_1)^2]=2\), and the mixed moment is \(\mathbb{E}[e^{-1/2+B_1}(1+B_1)]=2\). Substituting these three moments gives \(e+2-4=e-2\), independently confirming the formula.

Weak Bias in the First Two Moments

The normal distribution gives the exact moments without any discretization. Since \(B_T\sim N(0,T)\), $$ \mathbb{E}[S_T]=S_0e^{\mu T},\qquad \mathbb{E}[S_T^2]=S_0^2e^{(2\mu+\sigma^2)T}. $$ For Euler–Maruyama, independence of increments and the one-step moments used above give $$ \mathbb{E}[Y_N]=S_0(1+\mu h)^N,\qquad \mathbb{E}[Y_N^2]=S_0^2\left((1+\mu h)^2+\sigma^2h\right)^N. $$

Proposition: For fixed \(T\), as \(h=T/N\to0\), the Euler biases in the first two moments are $$ \mathbb{E}[Y_N]-\mathbb{E}[S_T] =-\tfrac12 S_0e^{\mu T}\mu^2T h+O(h^2), $$ $$ \mathbb{E}[Y_N^2]-\mathbb{E}[S_T^2] =S_0^2e^{(2\mu+\sigma^2)T} \left(\mu^2-\tfrac12(2\mu+\sigma^2)^2\right)T h+O(h^2). $$

Proof. For sufficiently small \(h\), the factors \(1+\mu h\) and \(q=1+(2\mu+\sigma^2)h+\mu^2h^2\) are positive, so their logarithms can be expanded. The first moment satisfies \(N\log(1+\mu h)=\mu T-\tfrac12\mu^2T h+O(h^2)\). Exponentiating yields \((1+\mu h)^N=e^{\mu T}(1-\tfrac12\mu^2T h+O(h^2))\), which proves the first formula after multiplication by \(S_0\). For the second moment, \(\log q=(2\mu+\sigma^2)h+(\mu^2-\tfrac12(2\mu+\sigma^2)^2)h^2+O(h^3)\). Multiplying by \(N=T/h\), exponentiating, and multiplying by \(S_0^2\) proves the second formula. The remainders are for fixed parameters and fixed \(T\). \(\square\)

Worked Example: Comparing the First Two Moments

Use \(S_0=2\), \(\mu=\tfrac12\), \(\sigma=\tfrac12\), \(T=1\), and \(N=2\). The step is \(h=\tfrac12\). The exact mean is \(2e^{1/2}\), while the Euler mean is \(2(1+\tfrac14)^2=2\cdot\tfrac{25}{16}=\tfrac{25}{8}\). Thus the exact bias, numerical minus exact, is \(\tfrac{25}{8}-2e^{1/2}\approx-0.1724\).

For the second moment, the exact value is \(4e^{5/4}\), since \(2\mu+\sigma^2=1+\tfrac14=\tfrac54\). The Euler one-step second-moment factor is \((1+\tfrac14)^2+\tfrac14\cdot\tfrac12=\tfrac{25}{16}+\tfrac18=\tfrac{27}{16}\). Its two-step second moment is \(4(\tfrac{27}{16})^2=\tfrac{729}{64}\). The bias is therefore \(\tfrac{729}{64}-4e^{5/4}\approx-2.571\).

Check: The Euler mean squared is \((\tfrac{25}{8})^2=\tfrac{625}{64}\). Hence its variance is \(\tfrac{729}{64}-\tfrac{625}{64}=\tfrac{13}{8}\). For the exact solution, the variance is \(4e^{5/4}-(2e^{1/2})^2=4e^{5/4}-4e\). These checks use the same first and second moments as the bias calculations.

Common Pitfall: Mixing Up Path Error and Moment Bias

A small difference between the means does not imply a small error on each coupled path. Conversely, a pathwise discrepancy for one increment input does not determine the bias in an expectation. For instance, in the one-step example the strong mean-square error is \(e-2\), while the mean bias is zero: both \(\mathbb{E}[S_1]\) and \(\mathbb{E}[Y_1]\) equal \(1\). The numerical mean agrees exactly, even though the coupled random variables differ.

A related calculation error is to compare the exact endpoint with an Euler value generated from an independent Brownian increment. That may be useful for comparing distributions, but it does not compute \(\mathbb{E}|S_T-Y_N|^2\) under the shared-increment coupling used for strong error. In the theorem, the term \(c^N\) is the mixed moment created specifically by using the same increments; omitting it or replacing it with a product of separate means gives the wrong strong error.

Check Your Understanding

Use the same-increment convention whenever a question asks for strong error.

  1. For geometric Brownian motion, write the exact multiplier over one step and the Euler multiplier over that same step.
  2. With \(S_0=1\), \(\mu=0\), \(\sigma=1\), and \(T=1\), compute the Euler mean and compare it with the exact mean.
  3. State the formula for \(\mathbb{E}|S_{t_n}-Y_n|^2\), and identify which term depends on coupling the paths.
  4. For \(\sigma=0\), explain why the leading strong-error coefficient displayed in the asymptotic formula vanishes.
  5. Explain why equality of the exact and Euler means does not imply that their coupled strong error is zero.