Skip to content
All library documents

Why Euler and Exact Geometric Brownian Motion Steps Differ

Article Quant Q&A · Author: Kob

Summary

The document compares three discrete simulations intended to represent geometric Brownian motion (GBM). Two use the exponential form: one evaluates the closed-form solution from the cumulative Wiener process, and the other compounds the corresponding exponential increment at each step. With the same normal shocks and time increments, these two constructions produce matching paths in the example because the exponential increments accumulate to the same expression.

The remaining method is the Euler discretization of the GBM stochastic differential equation. It updates price using a linear drift term and a linear shock term, so it only approximates the continuous-time process over finite steps; it is not algebraically equivalent to the exponential solution. The provided sample paths show a small difference between this approximation and the two exponential methods. The example illustrates the distinction for one set of parameters and shocks, but does not quantify the approximation error across step sizes or establish that Euler is unsuitable in every application.

Key ideas

  • The closed-form GBM solution can be evaluated from cumulative Wiener-process increments.
  • Compounding exponential GBM increments reproduces the same path as evaluating the closed-form solution at each time step.
  • The linear Euler update approximates the stochastic differential equation and differs from the exact exponential step at finite step sizes.
  • The example uses shared normal shocks to expose differences caused by the update equations rather than different randomness.

Tags

Full text
# Geometric Brownian motion simulations computed in different ways


# Geometric Brownian motion simulations computed in different ways












I have come across three different equations that, as far as I know, will yield the same Geometric Brownian Motion process given that we use the same random variables in each case; however, when I try to convince myself that this is true by computing the resulting processes in R, I can only get two of the three to output the expected GBM, and the third is only just slightly off.

The three equations I'm using are:

$$\Delta S_t = \mu S_t \Delta t + \sigma \sqrt{\Delta t}Z S_t$$ $$S_t = S_0 e^{(\mu-\frac{\sigma^2}{2})t+\sigma \sqrt{\Delta t} W_t}$$ $$\Delta S_t = S_{t} e^{(\mu-\frac{\sigma^2}{2})\Delta t+\sigma \sqrt{\Delta t}Z}$$ Where $Z$ is a standard normal random variable, $W_t$ is the Wiener process, and I'm using $\Delta t$ and $\Delta S$ instead of $dt$ and $dS$ because my time steps are large.

My R code and the output for the code are below. I'm trying to figure out why the latter two methods produce the same result but the former is off slightly. Could someone please help find the error in my code or let me know where my understanding is flawed?

```
Z <- rnorm(12, mean=0, sd=1)

# the resulting wiener process
W <- cumsum(Z)

# initialize parameters
mu <- 0.1
sig <- 0.2
S0 <- 10

#dS=mu*S*dt+sig*S*dW definition of gbm
sim1 <- c(S0)
for (n in 1:length(Z)){
  dS <- (1/12)*mu*sim1[n]+sqrt(1/12)*sig*sim1[n]*Z[n]
  sim1 <- append(sim1, sim1[n]+dS)
}

# exponential analytic solution 
sim2 <- c(S0)
t <- 0
for (n in 1:length(Z)){
  t <- t+(1/12)
  sim2 <- append(sim2, S0*exp((mu-sig*sig*0.5)*t+sqrt(1/12)*sig*W[n]))
}

# incremental exponential solution
sim3 <- c(S0)
for (n in 1:length(Z)){
  sim3 <- append(sim3, sim3[n]* exp((mu - sig * sig / 2) * (1/12) 
                       + sig * Z[n] * sqrt(1/12)))
}
```

Output

```
 [1] 10.000000  9.471675 10.268718 11.624626 11.168953 11.338817 11.053753 10.191896
 [9] 10.380249 11.328181 12.042882 11.459601 11.555696

 [1] 10.000000  9.469593 10.283796 11.715882 11.246756 11.400095 11.098550 10.248980
 [9] 10.422763 11.400374 12.122583 11.530201 11.607932

 [1] 10.000000  9.469593 10.283796 11.715882 11.246756 11.400095 11.098550 10.248980
 [9] 10.422763 11.400374 12.122583 11.530201 11.607932
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.