Monte Carlo Simulation for Derivative Pricing › Simulating Geometric Brownian Motion
Quantitative FinanceAll chapters Monte Carlo Simulation for Derivative Pricing › Simulating Geometric Brownian MotionOne section · Sections in this chapter3 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
To generate sample paths, we need to simulate the stochastic differential equation governing the asset price. The key mathematical tool that enables this simulation is Itô's lemma, which we applied in earlier chapters to derive the behavior of functions of stochastic processes. From Itô's lemma, we derived that if follows geometric Brownian motion, then the terminal price has an exact analytical form:
where:
- : asset price at time
- : initial asset price
- : risk-free interest rate
- : volatility
- : time to maturity
- : value of the Brownian motion at time
This equation reveals that the terminal stock price is determined by an exponential function of two terms: a deterministic drift and a random component. The drift term includes the Itô correction, or "volatility drag," of . This adjustment arises from the convexity of the exponential function in stochastic calculus. Without it, we would systematically overestimate expected prices.
Since , meaning the Brownian motion at time follows a normal distribution with mean zero and variance , we can write where is a standard normal random variable. This substitution gives us the exact simulation formula for the terminal price:
where:
- : asset price at time
- : initial asset price
- : risk-free interest rate
- : volatility
- : time to maturity
- : standard normal random variable,
The formula decomposes the price evolution into two interpretable parts. The first part, , represents the deterministic drift of the log-price, combining the risk-free rate growth with the volatility drag adjustment. The second part, , captures the random diffusion term, scaled by volatility (which amplifies randomness) and by the square root of time (reflecting the well-known result that standard deviation of returns scales with the square root of time horizon).
For European options that depend only on , this single-step simulation is all we need. We simply draw a standard normal random variable, plug it into the formula, and obtain one realization of the terminal price. Repeating this process thousands or millions of times gives us the sample distribution needed for Monte Carlo estimation. However, for path-dependent options where the payoff depends on the entire trajectory of prices, we must simulate the complete path from time zero to maturity.
The Euler-Maruyama Discretization
To generate a complete price path, we divide the time interval into discrete steps, each of size . At each step, we must advance the price from its current value to the next point in time. The Euler-Maruyama discretization provides a straightforward method for this task by applying a first-order Taylor approximation to the stochastic differential equation:
where:
- : asset price at the next time step
- : current asset price
- : risk-free interest rate
- : volatility
- : time step size ()
- : independent standard normal random variable
The approximation adds two terms to the current price to obtain the next price. The first term, , represents the expected growth over the time step, capturing the deterministic drift component. The second term, , introduces the random fluctuation, with the square root of the time step appearing because variance scales linearly with time while standard deviation scales with the square root.
However, this additive form has a subtle but important drawback: it can produce negative prices when is large or volatility is high. Since we are adding a random term that can be arbitrarily negative to a positive price, there is always some probability of ending up with a negative value, which is nonsensical for asset prices. A more stable approach uses the exact solution over each interval, applying our closed-form expression for terminal prices but treating each small interval as a mini-simulation:
where:
- : asset price at the next time step
- : current asset price
- : risk-free interest rate
- : volatility
- : time step size
- : independent standard normal random variable
This log-Euler scheme, sometimes called the exact discretization for GBM, preserves positivity unconditionally because the exponential function always returns positive values regardless of its input. Since the exponential of any real number is positive, and we multiply this positive quantity by the positive current price, the next price must be positive. This scheme is also exact for geometric Brownian motion rather than just an approximation, making it the preferred method in practice for simulating GBM paths.
Generating Standard Normal Random Variables
We build our simulations by generating standard normal random variables. As we covered in the probability fundamentals, computers produce uniform random numbers through deterministic algorithms called pseudo-random number generators. These uniform random numbers must then be transformed to the desired distribution through mathematical operations.
The most common approaches for converting uniform random variables to standard normal random variables are:
-
Box-Muller transform: This elegant method produces two independent standard normal random variables from two independent uniform random variables. Given two independent uniforms , we compute:
where:
- : independent standard normal random variables
- : independent uniform random variables on
The transformation works by generating a random point in polar coordinates in a cleverly chosen way. The angle is uniformly distributed around the circle, while the squared radius follows an exponential distribution (because is exponentially distributed when is uniform). Converting these polar coordinates to Cartesian coordinates using cosine and sine yields two independent standard normals. This result can be verified by computing the joint density function and showing it equals the product of two standard normal densities.
-
Inverse transform: This approach exploits the fundamental theorem connecting cumulative distribution functions to uniform random variables. We apply the inverse of the standard normal CDF:
where:
- : standard normal random variable
- : inverse of the standard normal cumulative distribution function
- : uniform random variable on
The intuition here is straightforward: if represents a cumulative probability (a value between 0 and 1), then tells us which value of a standard normal distribution has that cumulative probability. By mapping a uniformly distributed cumulative probability to its corresponding quantile , this method exactly reproduces the standard normal distribution. The method is conceptually elegant and directly applicable, but requires numerical approximation of since no closed-form expression exists for this function.
In practice, numerical libraries like NumPy implement highly optimized algorithms (often the Ziggurat method, which is faster than Box-Muller for modern CPU architectures) that we use directly without needing to implement these transformations ourselves.