Skip to content

Calculating the Mean and Variance of Geometric Brownian Motion

Original question

How do I calculate the expectation and variance of the solution to a geometric Brownian motion SDE?

For dXt=μXt dt+σXt dWtdX_t=\mu X_t\,dt+\sigma X_t\,dW_t with constant coefficients and deterministic X0=xX_0=x,

E[Xt]=xeμt,Var⁡(Xt)=x2e2μt(eσ2t−1).\mathbb E[X_t]=xe^{\mu t},\qquad \operatorname{Var}(X_t)=x^2e^{2\mu t}(e^{\sigma^2t}-1).
You can derive these by writing down the lognormal solution or by applying Itô's lemma to Xt2X_t^2 and solving two ordinary differential equations.

Find the first and second moments separately

Let m1(t)=E[Xt]m_1(t)=\mathbb E[X_t]. Taking expectations in the integral form of the SDE gives m1′(t)=μm1(t)m_1'(t)=\mu m_1(t) and m1(0)=xm_1(0)=x. The stochastic integral has mean zero, since XtX_t has finite second moments on finite intervals. This follows directly from the explicit exponential solution, which has finite moments of every positive order. Hence m1(t)=xeμtm_1(t)=xe^{\mu t}.

Now set m2(t)=E[Xt2]m_2(t)=\mathbb E[X_t^2]. The Itô product rule gives
d(Xt2)=(2μ+σ2)Xt2 dt+2σXt2 dWt.d(X_t^2)=(2\mu+\sigma^2)X_t^2\,dt+2\sigma X_t^2\,dW_t.
The stochastic term is square integrable on finite horizons by finiteness of the fourth moment. This gives m2′(t)=(2μ+σ2)m2(t)m_2'(t)=(2\mu+\sigma^2)m_2(t) with m2(0)=x2m_2(0)=x^2, so m2(t)=x2e(2μ+σ2)tm_2(t)=x^2e^{(2\mu+\sigma^2)t}. Subtract m1(t)2m_1(t)^2 to get the variance. As an algebra check, t=0t=0 or σ=0\sigma=0 makes the variance vanish. If μ=0\mu=0, the expected level stays xx while variance grows as x2(eσ2t−1)x^2(e^{\sigma^2t}-1).

The extra σ2\sigma^2 in the second moment equation comes from d[X]td[X]_t, which appears when you differentiate Xt2X_t^2 using Itô's rule. In the first moment equation there is no curvature term because the function of XtX_t is linear. Once you have E[Xt2]\mathbb E[X_t^2], subtract the square of the mean. The two terms both contain x2e2μtx^2e^{2\mu t}, and their difference leaves eσ2t−1e^{\sigma^2t}-1. Setting σ=0\sigma=0 makes the variance vanish and recovers deterministic growth.

For an original exercise, take x=80x=80, μ=0.06\mu=0.06 and σ=0.30\sigma=0.30. At t=2t=2, the expected level is 80e0.12≈90.2080e^{0.12}\approx90.20. The variance is

802e0.24(e0.18−1)≈1604.56,80^2 e^{0.24}(e^{0.18}-1)\approx1604.56,
so the standard deviation is about 40.0640.06. The log-price variance over this horizon is 0.180.18, a dimensionless quantity. The price-level variance has units of price squared. If you want variance of the simple return X2/80−1X_2/80-1, divide the price variance by 80280^2 to obtain about 0.2510.251.

For a forecast made at time ss, replace xx by the observed XsX_s and tt by the horizon t−st-s. The future Brownian increment is independent of Fs\mathcal F_s, so the same two formulas give conditional moments. With a positive observed level, doubling the horizon changes the accumulated variance inside the exponential and also changes the expected price around which dispersion is measured.

The closed-form solution gives a second route to the same result. To get the second raw moment, square the entire exponential, including its Brownian coefficient. If Wt∼N(0,t)W_t\sim N(0,t), then E[e2σWt]=e2σ2tE[e^{2\sigma W_t}]=e^{2\sigma^2t}. The deterministic part of the squared solution contributes x2e(2μ−σ2)tx^2 e^{(2\mu-\sigma^2)t}. Multiplying the two factors gives E[Xt2]=x2e(2μ+σ2)tE[X_t^2]=x^2 e^{(2\mu+\sigma^2)t}. This check catches the common algebraic slip of doubling the variance adjustment when the coefficient inside a Gaussian exponential is doubled.

Interactive example

Change the drift and volatility of geometric Brownian motion

The three paths reuse seeded Gaussian shocks. The orange curve shows the theoretical mean.

Expected terminal price 108.33 · terminal standard deviation 27.51
Three simulated stock price paths and the theoretical mean8010012000.250.50.751YearsPrice
  • Path A
  • Path B
  • Path C
  • Expected price

References and next steps