7  Geometric Brownian Motion

A random variable \(y\) is lognormally distributed if it can be written as \(y= \mathrm{e}^{x}\) where \(x\) has a normal distribution. Another way of saying this is that \(\log y\) is normally distributed. The mean of a lognormal random variable is given by the following.

Important Principle

If \(y = \mathrm{e}^x\) where \(x\) is normally distributed with mean \(m\) and standard deviation \(s\), then \[\mathbb{E}[y]=e^{m + s^2/2}\,. \qquad(7.1)\]

An example of the distribution of a lognormal random variable is shown in Figure 7.1.

Code
import numpy as np
from scipy.stats import lognorm
import plotly.graph_objects as go

# Generate x values
x = np.linspace(0, 5, 1000)

# Lognormal density (s=1, loc=0, scale=1 gives standard lognormal)
pdf = lognorm.pdf(x, s=1, loc=0, scale=1)

# Create plot
fig = go.Figure()
fig.add_trace(
    go.Scatter(
        x=x,
        y=pdf,
        mode='lines',
        name='Lognormal density',
        hovertemplate='x = %{x:.2f}<br>density = %{y:.2f}<extra></extra>'
    )
)

fig.update_layout(
    showlegend=False,
    xaxis_title='',
    yaxis_title='Lognormal density',
    template='plotly_white',
    height=300,
    autosize=True
)

fig.show()
#| out-width: "100%"
Figure 7.1: The distribution of the random variable \(y=e^x\) where \(x\) has the standard normal distribution.

An important stochastic process is geometric Brownian motion given by \[ S_t=S_0\mathrm{e}^{\mu t- \sigma^2 t/2 + \sigma B_t} \qquad(7.2)\] for constants \(\mu\) and \(\sigma\), where \(B\) is a Brownian motion. For each time \(t\), the random variable \(S_t\) in Equation 7.2 is a lognormal random variable. Ito’s formula for exponentials of Ito processes implies1 \[ \frac{\mathrm{d} S}{S} = \mu\mathrm{d} t+\sigma\mathrm{d} B\;. \qquad(7.3)\] When we see an equation like Equation 7.3, we should recognize Equation 7.2 as the solution.

We interpret Equation 7.3 as stating that \(\mu\mathrm{d} t\) is the expected percentage change of \(S\) and \(\sigma^2\mathrm{d} t\) is the variance of the percentage change in an instant \(\mathrm{d} t\). We call \(\mu\) the drift and \(\sigma\) the volatility. The geometric Brownian motion grows at the average rate of \(\mu\), in the sense that \(\mathbb{E}[S_t] = \mathrm{e}^{\mu t}S_0\). This can be verified with the aid of Equation 7.1.

If \(\mu=0\), then \(\mathbb{E}[S_t] = S_0\). In fact, a geometric Brownian motion \(S\) as in Equation 7.2 and Equation 7.3 is a martingale when \(\mu=0\). It is an example of what is called an exponential martingale. An exponential is always positive, so an exponential martingale is always positive.

Taking the natural logarithm of Equation 7.2 gives an equivalent form of the solution: \[ \log S_t= \log S_0+\left(\mu -\frac{1}{2}\sigma^2\right)t + \sigma B_t\;. \qquad(7.4)\] This shows that \(\log S_t - \log S_0\) is a \((\mu-\sigma^2/2,\sigma)\)–Brownian motion. Given information at time \(t\), the logarithm of \(S(u)\) for \(u>t\) is normally distributed with mean \((u-t)(\mu-\sigma^2/2)\) and variance \((u-t)\sigma^2\). Because \(S\) is the exponential of its logarithm, \(S\) can never be negative. For this reason, a geometric Brownian motion is a better model for stock prices than is a Brownian motion. The differential of Equation 7.4 is \[ \mathrm{d} \log S_t = \left(\mu -\frac{1}{2}\sigma^2\right)\mathrm{d} t+ \sigma\mathrm{d} B_t\;. \qquad(7.5)\]

We can summarize this discussion as follows.

Important Principle

The equation \[\frac{\mathrm{d} S}{S} = \mu\mathrm{d} t+\sigma\mathrm{d} B\] is equivalent to the equation \[\mathrm{d} \log S = \left(\mu -\frac{1}{2}\sigma^2\right)\mathrm{d} t+ \sigma\mathrm{d} B\; .\] The solution of both equations is Equation 7.2 or the equivalent Equation 7.4.

We can simulate a path of a geometric Brownian motion \(S\) by first simulating \(\log S\) and then computing the exponential. We simulate the changes \(\Delta \log S\) as normally distributed random variables with mean equal to \((\mu-\sigma^2/2)\Delta t\) and variance equal to \(\sigma^2\Delta t\). We could also simulate the changes \(\Delta \log S\) using a binomial model as in Section 5.2.

Code
import numpy as np
import plotly.graph_objects as go

n = 1000     # number of divisions
mu = 0.1    # drift
sigma = 0.3 # volatility
S0 =  100   # initial value
T = 1       # length of simulation
dt = T / n  # Delta t
steps = np.random.normal(
    loc = (mu-0.5*sigma**2)*dt, 
    scale = sigma*np.sqrt(dt),
    size = n
)
logS = np.empty(n+1)
logS[0] = np.log(S0)
logS[1:] = logS[0] + np.cumsum(steps)
S = np.exp(logS)

fig = go.Figure(
    go.Scatter(
        x=np.arange(0, T+dt, dt),
        y=S,
        mode="lines",
        hovertemplate="t = %{x:.2f}<br>S = %{y:.2f}<extra></extra>", #
    )
)

fig.update_layout(
    showlegend=False,
    xaxis_title="Time",
    yaxis_title="Simulated GBM",
    template="plotly_white",
    height=300,
    autosize=True
)

fig.show()
#| out-width: "100%"
Figure 7.2: A path of a simulated geometric Brownian motion with mu=0.1, sigma=0.3, and 1,000 steps.

7.1 Continuously Compounded Returns

Given a rate of return \(r\) over a time period of \(\Delta t\) years, the annualized continuously compounded return is defined to be the number \(x\) such that \(\mathrm{e}^{x\Delta t} = 1+r\); equivalently, \(x = \log(1+r) / \Delta t\). We frequently take annualized for granted and just say continuously compounded return. As an example, if you earn 10% in a year, then the continuously compounded return is \(\log 1.1 = 0.0953\).

The reason for the name continuously compounded is that compounding a rate of i \(0.0953\) for a total of \(n\) times during a year produces a total return over the year of \[\left(1 + \frac{0.0953}{n}\right)^ n - 1\,,\] which converges to \(0.10\) as \(n \rightarrow \infty\). Thus, compounding an infinite number of times during a year at an annual rate of \(0.0953\) is equivalent to the actual 10% return.

Given a dividend-reinvested asset price \(S\), the rate of return from date \(t_1\) to \(t_2\) is \(S_{t_2}/S_{t_1} - 1\). Denote this rate of return by \(r\) and define the corresponding continuously compounded return \[x = \log(1+r) = \log\left(\frac{S_{t_2}}{S_{t_1}}\right) = \log S_{t_2} - \log S_{t_1}\,.\] Using Equation 7.4, we see that the continuously compounded return is \[ x = \log S_{t_2} - \log S_{t_1} = \left(\mu -\frac{1}{2}\sigma^2\right)(t_2-t_1)+ \sigma\,(B_{t_2} - B_{t_1})\;. \qquad(7.6)\] Thus, from the vantage point of date \(t_1\), the continuously compounded return is normally distributed with mean \[\left(\mu -\frac{1}{2}\sigma^2\right)\Delta t\] and variance \(\sigma^2 \Delta t\), where we define \(\Delta t = t_2-t_1\). Given historical data on rates of return, the parameters \(\mu\) and \(\sigma\) can be estimated by standard methods.

7.2 Tail Probabilities of Geometric Brownian Motions

Let \(S\) be a geometric Brownian motion with coefficients \((\mu, \sigma)\) as in Equation 7.2Equation 7.5. We want to compute the probability, given only date-0 information, that \(S_t>K\) for a given \(t\) and \(K\). This will be useful for deriving option pricing formulas. Because the natural logarithm is a monotonic function, the condition \(S_t>K\) is equivalent to \(\log S_t > \log K\). From this fact and Equation 7.4, we deduce that

\[ S_t > K \quad\Longleftrightarrow\quad \log S_0 + \left(\mu + \frac{1}{2}\sigma^2 \right) t+ \sigma B_t > \log K\,. \]

By rearranging a bit, we obtain

\[ S_t > K \quad\Longleftrightarrow\quad -\frac{B_t}{\sqrt{t}} < \frac{\log S_0-\log K + \left(\mu - \frac{1}{2}\sigma^2 \right) t}{\sigma\sqrt{t}} \qquad(7.7)\]

The reason for rearranging in this way is that the random variable \(-B_t/\sqrt{t}\) has the standard normal distribution—it is normally distributed with mean equal to zero and variance equal to one—and the probability that a standard normal random variable is less than some number is given by the standard normal distribution function. Denote the standard normal distribution function by \(\mathrm N(\cdot)\). We conclude:

Key Result

If \(S\) is a geometric Brownian motion with coefficients \((\mu, \sigma)\), then, for any number \(K\) and any time \(t\), \[ \text{prob}(S_t>K) = \mathrm{N}(d)\;, \qquad(7.8)\] where \[ d = \frac{\log S_0 - \log K + \left(\mu - \frac{1}{2}\sigma^2\right) t}{\sigma\sqrt{t}}\;. \qquad(7.9)\]

This implies that the probability of the event \(S_t<K\) is \(1-\mathrm{N}(d)\). By virtue of the symmetry of the standard normal distribution, this equals \(\mathrm{N}(-d)\). Therefore, we have:

Key Result

If \(S\) is a geometric Brownian motion with coefficients \((\mu, \sigma)\), then, for any number \(K\) and any time \(t\), \[ \text{prob}(S_t<K) = \mathrm{N}(-d)\;, \qquad(7.10)\] where \(d\) is defined in Equation 7.9.

7.3 Exercises

Exercise 7.1 Use Ito’s formula to show that if \(S\) is a geometric Brownian, then \(S^2\) is also a geometric Brownian motion.

Exercise 7.2 Let \[\begin{align*} \frac{\mathrm{d} S_1}{S_1} &= \mu_1\mathrm{d} t + \sigma_1 \mathrm{d} B_1\\ \frac{\mathrm{d} S_2}{S_2} &= \mu_1\mathrm{d} t + \sigma_2 \mathrm{d} B_2 \end{align*}\] where the \(\mu_i\) and \(\sigma_i\) are constants and \(B_1\) and \(B_2\) are Brownian motions with constant correlation \(\rho\).

  1. Define \(Y=S_1S_2\). Show that \(Y\) is a geometric Brownian motion and calculate its drift and volatility.
  2. Repeat for \(Y=S_1/S_2\).

Hint: use the facts \(\mathrm{e}^{x+y}=\mathrm{e}^x \times \mathrm{e}^y\) and \(\mathrm{e}^x/\mathrm{e}^y = \mathrm{e}^{x-y}\).

:


  1. Setting \(X_t = \mu t - \frac{1}{2}\sigma^2 t + \sigma B_t\), we have \(S_t = \mathrm{e}^{X_t}\), so \(\mathrm{d}S/S = \mathrm{d}X + \frac{1}{2}(\mathrm{d}X)^2 = \mu\,\mathrm{d}t - \frac{1}{2}\sigma^2\,\mathrm{d}t + \sigma \,\mathrm{d}B + \frac{1}{2}(\mathrm{d}X)^2 = \mu\,\mathrm{d}t+\sigma\,\mathrm{d}B\).↩︎