# FxPaul

Math in finance or vice versa

## Process definition

In this article we deduce the closed-from solution of the modified version of Ornstein-Uhlenbeck process:
$dS = \theta(\mu - S) dt + \sigma S dW_t$
where $\theta$ – mean reversion parameter, $\mu$ – mean and $\sigma$ – volatility.

## Integrating factor approach

There exists a general approach to non-linear stochastic differential equations of the form:
$dX_t = f(t,X_t) dt + c(t) X_t dW_t \, , \, X_0 = x$
where $f$ and $g$ are given continuous and deterministic functions.

The method consists of:

1. Define the integrating factor:
$F_t = F_t(\omega) = \exp\left( - \int_0^t {c(s) dW_s} + \frac{1}{2}\int_0^t {c^2(s) dW_s} \right)$
2. So the original equation could be written as $d\left(F_t X_t\right) = F_t f(t,X_t) dt$
3. Now define
$Y_t(\omega) = F_t(\omega) X_t(\omega)$
so that $X_t = F^{-1}_t Y_t$
4. And it yields the deterministic differential equation for each $\omega\in\Omega$
$\frac{dY_t(\omega)}{dt} = F_t(\omega) f\left(t, F^{-1}_t(\omega) Y_t(\omega)\right); \, Y_0 = x$

We can therefore solve it with $\omega$ as a parameter to find $Y_t(\omega)$ and then obtain $X_t(\omega)$

## Modified Ornstein-Uhlenbeck process solution

Let’s apply the described approach to the process. Thus we’ve got in notation of the method:
$f(S, t) = \theta(\mu - S)$
$c = \sigma$

Integrating factor transforms to:
$F_t = \exp{\left( -\sigma W_t+\frac{1}{2}\sigma^2t\right)}$
$Y_t = F_t S_t$
and ODE for it is:
$\frac{dY(t)}{dt} = \theta\exp{\left( -\sigma w+\frac{1}{2}\sigma^2t\right)} \left(\mu - Y(t) \exp{\left( \sigma w- \frac{1}{2}\sigma^2t\right)} \right)$
and initial conditions are:
$Y(0) = S_0$

Thus the solution $Y(t)$ is:
$Y(t) ={\frac { 2\theta \mu {\exp\left(-\sigma W_t+\frac{1}{2}\sigma^2 t \right)}}{{\sigma}^{2}+2\,\theta}}+\exp\left(-\theta\,t\right) \left( S_0 - 2 \frac {\theta\mu \exp(-\sigma W_t)}{\sigma^2+2\theta} \right)$

And recovering $S(t)$ solution:
$S(t) = F_t^{-1} Y_t = \exp{\left(\sigma W_t - \frac{1}{2}\sigma^2t \right)} Y(t)$
$S(t) = S_0\exp{\left( - \alpha t + \sigma W_t\right)} + \frac{\theta\mu}{\alpha}\left( 1 - \exp\left( - \alpha t\right) \right)$
where $\alpha = \theta + \frac{1}{2}\sigma^2$

UPD: Fixed signs in 2 last equations.

Written by fxpaul

May 27, 2011 at 08:39

### 10 Responses

1. Thanks for sharing the solution. I have been looking everywhere for this 🙂 I have a few questions though.
In the expression for S(t), shouldn’t the second term be (1-exp(-alpha t)) instead of (1+exp(-alpha t)). Just feel weird thats its so different from the non-stochastic version.

It seems that the variance either converge to infinity or zero. I wonder if there is there any lognormal process that has bounded variance? (like the OU process)

Thanks!

Boon Teik Ooi

July 14, 2013 at 22:02

• You are right! Thanks for the proof reading of the solution. I’ve just made an update.

I think that the variance converge to something like OU process with $\frac{\theta\mu}{\alpha}$ as mean and $\alpha$ as mean-reversion parameter.

fxpaul

July 16, 2013 at 08:43

2. Excellent stuff! I was looking for this problem.

quant3

December 24, 2013 at 16:14

3. Hi,

I was also looking for the solution of this problem, but i am afraid what you derive for S(t) is not correct. Nevertheless the integrating factor technique is interesting, but i am not sure it works this way in this case.

As far as i know in the literature it is known as Generalized OU process, or sometimes Nelson’s diffusion process, or even continuous GARCH(1,1) process.

Anyhow, i think the correct solution is more complicated, it should depend on the full path of the Brownian motion up to time t, not just on the value W(t). I think Eq. (6) in this paper (https://www.tu-braunschweig.de/Medien-DB/stochastik/lindner5.pdf) is the correct solution. Also, see Eq. (9) and the text below that.

Cheers,
andras

Andras

December 26, 2013 at 21:33

• Hi Andras,

Sorry for very long reply. I’ve got too much work over this Christmas.

There is an error in the derivation of $F_t$.
It should be $F_t = \exp{\left( -\sigma W_t+\frac{1}{2}\sigma^2 W_t\right)}$.

I will fix it over this weekend.

Thanks a lot!

fxpaul

February 8, 2014 at 22:02

4. As Boon Teik Ooi pointed out, the variance of the solution converges to either 0 or infinity as time -> infinity (simply because the solution is a non-random term + exponential BM * exp(-theta*t)). However, the solution is incorrect – the variance is in fact finite, just as it is for the plain OU. You can find the solution in Shreve, p.300.

Alex

February 11, 2016 at 11:33

5. The solution presented here for the Stochastic Differential Equation described is not correct. You can verify this by showing that the differential of the solution described does not satisfy the SDE given. In fact, the exact solution should be

S(t)=\phi(t)[S_{0}+ \theta \mu \int_{0}^{t} \phi^{-1}(x) dx] where
\phi(t)=exp[-(\theta+\sigma^{2}/2) t + \sigma W_{t} ].

Olusegun Otunuga

January 21, 2017 at 14:58

6. Olusegun is right.

Sarah

April 27, 2017 at 22:27

7. Do you have an analytical solution for the similar Cox Ingersoll Ross SDE too?

Nick

October 12, 2017 at 10:15

• Hi Nick, I do not maintain this blog for quite a long time. And I don’t have a solution for this SDE.

fxpaul

October 16, 2017 at 22:09