Skip to content
All library documents

Euler Simulation of Arithmetic and Geometric Brownian Motion

Article Quant Q&A · Author: Emily

Summary

The document clarifies how drift enters Euler simulations of Brownian motion and geometric Brownian motion. For arithmetic Brownian motion, drift is an additive parameter and does not depend on the previous value of the process. For geometric Brownian motion, the drift term is proportional to the current asset price, as is the diffusion term; discretization therefore scales both by the previous price. The answer provides the corresponding discrete-time relationship conceptually and identifies the drift as the deterministic component.

It also notes that simulation requires drift and volatility inputs. These can be estimated from historical returns under a physical-measure model, or calibrated from derivative prices for a risk-neutral model. A simple historical estimate uses average returns and their standard deviation, with log returns appropriate for a geometric model. The discussion is introductory: it does not address estimation uncertainty, bias, calibration details, or numerical convergence, and the example code itself may need adjustment to match the intended process and grid indexing.

Key ideas

  • Arithmetic Brownian motion has additive drift that does not depend on the prior process value.
  • Geometric Brownian motion has drift and volatility terms proportional to the current asset price.
  • Euler discretization adds the drift over the time step and scales the random shock by the square root of the step.
  • Drift and volatility must be supplied or estimated under the intended probability measure.

Tags

Full text
# Calculate drift of Brownian Motion using Euler method


# Calculate drift of Brownian Motion using Euler method












I am working on a project to approximate numerically the solution $X_t$ of a stochastic differential equation (SDE) using the Euler method. I have do to this for the Brownian motion with drift. I am asked to stimulate $N$ paths under both the P and Q measure on the interval $[0,T]$. The pseudo code is as follows:

for i to N-1

- calculate the drift as function of previous stock price ($\mu$)

- calculate the volatility as function of previous stock price ($\sigma$)

- draw innovation from standard normal distribution ($\epsilon$)

- $S_{t+i} = S_t + \mu_t dt + \sigma_t \sqrt{dt } \epsilon_t$. next

where $dt$ is defined as $(T-0)/N$.

My current code is as follows:

```
nr_runs = 1000; %number of simulation runs
N       = 1000; %compute N grid points
t0      = 0;
T       = 10;

dt      = (T - t0) / N;
x0      = 0; %starting point
x       = zeros(1000);
mu      = 0;
sigma   = zeros(1000);

    for i = 1:N
        sigma(i)   = sqrt(i*dt); %under P measure, variance equal to time
        epsilon = normrnd(0,1);
        if i == 1
            x(i)    = x0 + mu*dt + sigma(i)* sqrt(dt)*epsilon;
        else
            x(i+1)  = x(i) + mu*dt + sigma(i)* sqrt(dt)*epsilon;
        end
    end  

M = mean(x);
```

However, I know no idea how to calculate the drift ($\mu$) from the previous stock price. What is the formula?

Thank you! Any help is appreciated.

## Answer by Magic is in the chain (score 1)

https://quant.stackexchange.com/a/42084

In arithmetic brownian, drift does not depend on the previous price, so it is simply $\mu \Delta t$ as you have done. It depends on the previous price in geometric brownian though. Let’s recall the GBM equation:

$dS_t=\mu S_t dt +\sigma S_t dB_t$

Discretising: $\Delta S_t=\mu S_t \Delta t + \sigma S_t \sqrt{\Delta t} N[0,1]$

$S_{t+1}-S_t=\mu S_t \Delta t + \sigma S_t \sqrt{\Delta t} N[0,1]$

$S_{t+1}=S_t \left( 1+\mu \Delta t \right)+ \sigma S_t \sqrt{\Delta t} N[0,1]$

The first term on the rhs is the drift.

Re-comment, simulation would take drift and vol as inputs. If you have not been given these then you will need to calibrate the parameters using historical stock (physical measure) or current derivative prices(risk neutral) data. For example, to calibrate the arithmetic brownian under the physical measure, the simplest approach would be as follows: take the stock historical prices, convert the prices into returns, e.g., just generate daily return as $S_{t+1}-S_t$ ($\ln S_{t+1}/S_t$ for GBM), calculate the mean and standard deviation of the returns, and these are your daily drift and sigma. Annualising them would give you the parameters you need. Of course there are more sophisticated estimation methods that you can google.

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.