# Ornstein–Uhlenbeck process

In mathematics, the Ornstein–Uhlenbeck process (named after Leonard Ornstein and George Eugene Uhlenbeck), is a stochastic process that, roughly speaking, describes the velocity of a massive Brownian particle under the influence of friction. The process is stationary, Gaussian, and Markovian, and is the only nontrivial process that satisfies these three conditions, up to allowing linear transformations of the space and time variables.[1] Over time, the process tends to drift towards its long-term mean: such a process is called mean-reverting.

The process can be considered to be a modification of the random walk in continuous time, or Wiener process, in which the properties of the process have been changed so that there is a tendency of the walk to move back towards a central location, with a greater attraction when the process is further away from the centre. The Ornstein–Uhlenbeck process can also be considered as the continuous-time analogue of the discrete-time AR(1) process.

## Representation via a stochastic differential equation

An Ornstein–Uhlenbeck process, xt, satisfies the following stochastic differential equation:

${\displaystyle dx_{t}=\theta (\mu -x_{t})\,dt+\sigma \,dW_{t}}$

The above representation can be taken as the primary definition of an Ornstein–Uhlenbeck process.[1]{{ safesubst:#invoke:Unsubst||date=__DATE__ |B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }}. ## Fokker–Planck equation representation The probability density function ƒ(xt) of the Ornstein–Uhlenbeck process satisfies the Fokker–Planck equation ${\displaystyle {\frac {\partial f}{\partial t}}=\theta {\frac {\partial }{\partial x}}[(x-\mu )f]+{\frac {\sigma ^{2}}{2}}{\frac {\partial ^{2}f}{\partial x^{2}}}}$ The Green function of this linear parabolic partial differential equation, taking ${\displaystyle \mu =0}$ and ${\displaystyle D=\sigma ^{2}/2}$ for simplicity, and the initial condition consisting of a unit point mass at location ${\displaystyle y}$ is ${\displaystyle f(x,t)={\sqrt {\frac {\theta }{2\pi D(1-e^{-2\theta t})}}}\exp \left\{{\frac {-\theta }{2D}}\left[{\frac {(x-ye^{-\theta t})^{2}}{1-e^{-2\theta t}}}\right]\right\}}$ The stationary solution of this equation is the limit for time tending to infinity which is a Gaussian distribution with mean ${\displaystyle \mu }$ and variance ${\displaystyle \sigma ^{2}/(2\theta )}$ ${\displaystyle f_{s}(x)={\sqrt {\frac {\theta }{\pi \sigma ^{2}}}}\,e^{-\theta (x-\mu )^{2}/\sigma ^{2}}.}$ ## Application in physical sciences The Ornstein–Uhlenbeck process is a prototype of a noisy relaxation process. Consider for example a Hookean spring with spring constant ${\displaystyle k}$ whose dynamics is highly overdamped with friction coefficient ${\displaystyle \gamma }$. In the presence of thermal fluctuations with temperature ${\displaystyle T}$, the length ${\displaystyle x(t)}$ of the spring will fluctuate stochastically around the spring rest length ${\displaystyle x_{0}}$; its stochastic dynamic is described by an Ornstein–Uhlenbeck process with: {\displaystyle {\begin{aligned}\theta &=k/\gamma ,\\\mu &=x_{0},\\\sigma &={\sqrt {2k_{B}T/\gamma }},\end{aligned}}} where ${\displaystyle \sigma }$ is derived from the Stokes–Einstein equation ${\displaystyle D=\sigma ^{2}/2=k_{B}T/\gamma }$ for the effective diffusion constant. In physical sciences, the stochastic differential equation of an Ornstein–Uhlenbeck process is rewritten as a Langevin equation ${\displaystyle \gamma {\dot {x}}(t)=-k(x(t)-x_{0})+\xi (t)}$ At equilibrium, the spring stores an average energy ${\displaystyle \langle E\rangle =k\langle (x-x_{0})^{2}\rangle /2=k_{B}T/2}$ in accordance with the equipartition theorem. ## Application in financial mathematics The Ornstein–Uhlenbeck process is one of several approaches used to model (with modifications) interest rates, currency exchange rates, and commodity prices stochastically. The parameter ${\displaystyle \mu }$ represents the equilibrium or mean value supported by fundamentals; ${\displaystyle \sigma }$ the degree of volatility around it caused by shocks, and ${\displaystyle \theta }$ the rate by which these shocks dissipate and the variable reverts towards the mean. One application of the process is a trading strategy known as pairs trade.[2][3][4] ## Mathematical properties The Ornstein–Uhlenbeck process is an example of a Gaussian process that has a bounded variance and admits a stationary probability distribution, in contrast to the Wiener process; the difference between the two is in their "drift" term. For the Wiener process the drift term is constant, whereas for the Ornstein–Uhlenbeck process it is dependent on the current value of the process: if the current value of the process is less than the (long-term) mean, the drift will be positive; if the current value of the process is greater than the (long-term) mean, the drift will be negative. In other words, the mean acts as an equilibrium level for the process. This gives the process its informative name, "mean-reverting." The stationary (long-term) variance is given by ${\displaystyle \operatorname {var} (x_{t})={\sigma ^{2} \over 2\theta }.\,}$ The Ornstein–Uhlenbeck process is the continuous-time analogue of the discrete-time AR(1) process. three sample paths of different OU-processes with θ = 1, μ = 1.2, σ = 0.3: blue: initial value a = 0 (a.s.) green: initial value a = 2 (a.s.) red: initial value normally distributed so that the process has invariant measure ## Solution This stochastic differential equation is solved by variation of parameters.{{ safesubst:#invoke:Unsubst||date=__DATE__ |B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }} Apply Itō's lemma to the function

${\displaystyle f(x_{t},t)=x_{t}e^{\theta t}\,}$

to get

{\displaystyle {\begin{aligned}df(x_{t},t)&=\theta x_{t}e^{\theta t}\,dt+e^{\theta t}\,dx_{t}\\[6pt]&=e^{\theta t}\theta \mu \,dt+\sigma e^{\theta t}\,dW_{t}.\end{aligned}}}

Integrating from 0 to t we get

${\displaystyle x_{t}e^{\theta t}=x_{0}+\int _{0}^{t}e^{\theta s}\theta \mu \,ds+\int _{0}^{t}\sigma e^{\theta s}\,dW_{s}\,}$

whereupon we see

${\displaystyle x_{t}=x_{0}e^{-\theta t}+\mu (1-e^{-\theta t})+\int _{0}^{t}\sigma e^{\theta (s-t)}\,dW_{s}.\,}$

### Formulas for moments of nonstationary processes

From this representation, the first moment is given by (assuming that x0 is a constant)

${\displaystyle E(x_{t})=x_{0}e^{-\theta t}+\mu (1-e^{-\theta t})\!\ }$

The Itō isometry can be used to calculate the covariance function by

{\displaystyle {\begin{aligned}\operatorname {cov} (x_{s},x_{t})&=E[(x_{s}-E[x_{s}])(x_{t}-E[x_{t}])]\\&=E\left[\int _{0}^{s}\sigma e^{\theta (u-s)}\,dW_{u}\int _{0}^{t}\sigma e^{\theta (v-t)}\,dW_{v}\right]\\&=\sigma ^{2}e^{-\theta (s+t)}E\left[\int _{0}^{s}e^{\theta u}\,dW_{u}\int _{0}^{t}e^{\theta v}\,dW_{v}\right]\\&={\frac {\sigma ^{2}}{2\theta }}\,e^{-\theta (s+t)}(e^{2\theta \min(s,t)}-1).\end{aligned}}}

Thus if s < t (so that min(st) = s), then we have

${\displaystyle \operatorname {cov} (x_{s},x_{t})={\frac {\sigma ^{2}}{2\theta }}\left(e^{-\theta (t-s)}-e^{-\theta (t+s)}\right).}$

It is also possible (and often convenient) to represent xt (unconditionally, i.e. as ${\displaystyle t\rightarrow \infty }$) as a scaled time-transformed Wiener process {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }}: ${\displaystyle x_{t}=\mu +{\sigma \over {\sqrt {2\theta }}}e^{-\theta t}W_{e^{2\theta t}}}$ or conditionally (given x0) as ${\displaystyle x_{t}=x_{0}e^{-\theta t}+\mu (1-e^{-\theta t})+{\sigma \over {\sqrt {2\theta }}}e^{-\theta t}W_{e^{2\theta t}-1}.}$ The time integral of this process can be used to generate noise with a 1/ƒ power spectrum. ## Scaling limit interpretation The Ornstein–Uhlenbeck process can be interpreted as a scaling limit of a discrete process, in the same way that Brownian motion is a scaling limit of random walks. Consider an urn containing ${\displaystyle n}$ blue and yellow balls. At each step a ball is chosen at random and replaced by a ball of the opposite colour (equivalently, a ball chosen uniformly at random changes color). Let ${\displaystyle X_{n}}$ be the number of blue balls in the urn after ${\displaystyle n}$ steps. Then ${\displaystyle {\frac {X_{[nt]}-n/2}{\sqrt {n}}}}$ converges in law to an Ornstein–Uhlenbeck process as ${\displaystyle n}$ tends to infinity. ## Generalizations It is possible to extend Ornstein–Uhlenbeck processes to processes where the background driving process is a Lévy process.Template:Clarify These processes are widely studied by Ole Barndorff-Nielsen and Neil Shephard,{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }} and others.{{ safesubst:#invoke:Unsubst||date=__DATE__ |\$B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }}

In addition, in finance, stochastic processes are used the volatility increases for larger values of ${\displaystyle X}$. In particular, the CKLS (Chan–Karolyi–Longstaff–Sanders) process[5] with the volatility term replaced by ${\displaystyle \sigma \,x^{\gamma }\,dW_{t}}$ can be solved in closed form for ${\displaystyle \gamma =1/2}$ or 1, as well as for ${\displaystyle \gamma =0}$, which corresponds to the conventional OU process.

## Notes

1. Template:Harvnb
2. {{#invoke:Citation/CS1|citation |CitationClass=journal }}
4. An Ornstein-Uhlenbeck Framework for Pairs Trading
5. Chan et al. (1992)

## References

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}