I am uncertain as to how to calculate the mean and variance of the following Geometric Ornstein-Uhlenbeck process.

$$d X(t) = a ( L - X_t ) dt + V X_t dW_t$$

Is anyone able to calculate the mean and variance of this process as well as include the calculations for the solution?

  • 1
    $\begingroup$ Wait guys, he's not talking about the normal OU process, he's looking at the Geometric version. I couldn't find easily the answer on google for that. $\endgroup$
    – SRKX
    Jan 7, 2013 at 7:53

3 Answers 3


Okay so I'll take Jase answer and format it properly so that it answers your question and it will be useful for users in the future.

For clarity, let me restate the dynamics of the Modified Ornstein-Uhlenbeck model using the more common notation:

$$dS_t = \theta (\mu-S_t)dt + \sigma S_t dW_t$$

This blog post provides a closed form solution:

$$ S_t = S_0 \exp(- \alpha t + \sigma W_t) + \frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))$$

where $\alpha=\theta+\frac{1}{2} \sigma^2$.

So first, the expectation:

$$\mathbb{E}[S_t] = \mathbb{E}[ S_0 \exp(- \alpha t + \sigma W_t) + \frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))]$$

$$\mathbb{E}[S_t] = \mathbb{E}[ S_0 \exp(- \alpha t + \sigma W_t)] + \mathbb{E}[\frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))]$$

$$\mathbb{E}[S_t] = S_0 \mathbb{E}[\exp(- \alpha t + \sigma W_t)] + \frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))$$

Now, note that $\exp(- \alpha t + \sigma W_t)$ can be expressed as $\exp(- \alpha t + \sigma \sqrt{t} Z)$ (with $Z \sim \mathcal{N}(0,1)$) hand is log-normally distributed: $\sim \ln \mathcal{N} (-\alpha t, \sigma^2 t) $, so you can apply the formulas of the log-normal distribution for mean and variance.

$$\mathbb{E}[\exp(- \alpha t + \sigma \frac{1}{\sqrt{t}} Z)]= \exp(- \alpha t + \frac{1}{2} \frac{\sigma^2}{t})$$

So, we get

$$\mathbb{E}[S_t] = S_0 \exp(- \alpha t + \frac{1}{2} \sigma^2 t) + \frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))$$

Now for the variance:

$$ Var[S_t]= Var[S_0 \exp(- \alpha t + \sigma W_t) + \frac{\theta \mu}{\alpha} (1+ \exp(-\alpha t))]$$

As the second term is constant, we get:

$$ Var[S_t]= Var[S_0 \exp(-\alpha t + \sigma W_t)]$$ $$ Var[S_t]= S_0^2 Var[\exp(- \alpha t + \sigma W_t)]$$

Using again the log-normal formula $$ Var[S_t]= S_0^2 (\exp(\sigma^2 t)-1) \exp(-2 \alpha t+\sigma^2t)$$

To sum up, and substituting $\alpha$ with $\theta+\frac{1}{2} \sigma^2$ we get:

$$\mathbb{E}[S_t] = S_0 \exp(- \theta t) + \frac{\theta \mu}{\theta+\frac{1}{2} \sigma^2} (1+ \exp(- (\theta+\frac{1}{2} \sigma^2) t))$$

$$ Var[S_t]= S_0^2 (\exp(\sigma^2 t)-1) \exp(-2 \theta t)$$

Hopefully this should answer your question.

  • $\begingroup$ Shouldn't it be $dS_t$ instead of $dX_t$ in the first formula? $\endgroup$
    – vonjd
    Jan 18, 2013 at 12:17
  • 1
    $\begingroup$ Oh yeah sure of course... Thanks for pointing that out. $\endgroup$
    – SRKX
    Jan 18, 2013 at 13:14
  • $\begingroup$ In the expression for $S_t$, shouldn’t the second term be $\frac{\theta\mu}{\alpha}(1-exp(- \alpha t))$ instead of $\frac{\theta\mu}{\alpha}(1+exp(-\alpha t))$? $\endgroup$ Jul 14, 2013 at 21:27
  • 1
    $\begingroup$ This is wrong, the solution doesn't solve the SDE. Also the variance explodes with time while a OU process should reach a stationary variance. $\endgroup$
    – Freelunch
    Apr 13, 2019 at 11:17

An OU process

$ dx_t = \theta(\mu - x_t)dt + \sigma dW_t $

where W follows standard Wiener process then mean is $ \mu $ and variance is $ \sigma^2/2\theta $ . You can substitute your factors.

Using mathematica

mean = Mean[OrnsteinUhlenbeckProcess[$ \mu,\sigma,\theta $]]

variance = Variance[OrnsteinUhlenbeckProcess[$ \mu,\sigma,\theta $]]

  • 1
    $\begingroup$ He's apparently not looking for the classic Ornstein-Uhlenbeck process, but the Geometric version. $\endgroup$
    – SRKX
    Jan 7, 2013 at 8:00
  • $\begingroup$ Any comments for downvote ?! $\endgroup$
    – ash
    Jan 7, 2013 at 10:42
  • 2
    $\begingroup$ Your answer is wrong; I mean it's not the right process. $\endgroup$
    – SRKX
    Jan 7, 2013 at 10:54

The explicit "solution" used in the former answer is incorrect. However, a correct one to $$dS_t=\theta(\mu-S_t)dt+\sigma S_tdW_t$$ can be found here and is of the form

$$S_t =S_0 e^{-\alpha t + \sigma W_t} + \theta\,\mu\,\int_0^t e^{-\alpha (t-s) + \sigma(W_t - W_s)} ds$$

again defining $\alpha:=\theta + \frac{1}{2}\sigma^2 $. By this, we can compute the moments as done before:

  1. Taking the expectation

$$\mathbb{E}\left[S_t\right] =S_0e^{-\alpha t}\mathbb{E}\left[ e^{\sigma W_t}\right] + \theta\,\mu\,\int_0^t e^{-\alpha (t-s)}\mathbb{E}\left[e^{\sigma(W_t - W_s)} \right]ds$$

where as already pointed out the expectations are just the mean of a lognormal with variance $\sigma^2t$ and $\sigma^2(t-s)$ and Wikipedia provides the answer for the lazy:

$$\mathbb{E}\left[ e^{\sigma W_t}\right]= e^{\frac{\sigma^2t}{2}}$$

(and the same for the difference). Now we just have to solve

$$\int_0^t e^{-\alpha (t-s)+\frac{\sigma^2(t-s)}{2}} ds =\int_0^t e^{(-\alpha +\frac{\sigma^2}{2})(t-s)} ds =\int_0^t e^{-\theta(t-s)} ds =\frac{1-e^{-\theta t}}{\theta}$$

from which we obtain

$$\mathbb{E}\left[S_t\right] =S_0e^{-\alpha t+\frac{\sigma^2t}{2}} + \theta\mu\frac{1-e^{-\theta t}}{\theta}\\ =S_0e^{-\theta t}+\mu\left(1-e^{-\theta t}\right)$$

which is just the mean in the non-geometric case. This in hindsight was unnecessarily long as $$\mathbb{E}\left[S_t\right] =S_0+ \theta \int_0^t(\mu-\mathbb{E}\left[S_s\right])ds$$ is the same ODE as in the non-geometric case.

We now just require the second moment and we are done. In the non-geometric case, this is much easier as things cancel and the Itô Isometry gives the answer. Here $$ dS_t^2 =2S_tdS_t+d\langle S \rangle_t =2S_t\theta (\mu-S_t)dt + 2\sigma S_t^2 dW_t+ \sigma^2 S_t^2 dt$$ and using the standard bound for the second moment of an SDE, Itô integral is a true martingale by which $$ \frac{d}{dt}\mathbb{E}\left[S_t^2 \right] =2\theta \mu\mathbb{E}\left[S_t \right]-2\theta\mathbb{E}\left[S_t^2 \right] +\sigma^2 \mathbb{E}\left[S_t^2 \right] $$ which one can solved using the former result to obtain $$ \mathbb{E}\left[S_t^2 \right]=\left(2 \theta \mu \left(\frac{S_{0} {\mathrm e}^{-t \left(\sigma^{2}-\theta \right)}}{-\sigma^{2}+\theta}+\frac{\mu \,{\mathrm e}^{-\left(\sigma^{2}-2 \theta \right) t}}{-\sigma^{2}+2 \theta}-\frac{\mu \,{\mathrm e}^{-t \left(\sigma^{2}-\theta \right)}}{-\sigma^{2}+\theta}\right)\\-2 \theta \mu \left(\frac{S_{0}}{-\sigma^{2}+\theta}+\frac{\mu}{-\sigma^{2}+2 \theta}-\frac{\mu}{-\sigma^{2}+\theta}\right)\right) {\mathrm e}^{\left(\sigma^{2}-2 \theta \right) t} $$ which then specifies the variance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.