Search

Search papers and lessons

Ornstein–Uhlenbeck Process

Level 3 · 10 min read

The Ornstein–Uhlenbeck process is random noise that is pulled back toward a fixed average, so it wanders but never drifts away for good.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Discrete math
  • Stochastic processes
  • ReadReady to readNot yet

TL;DR

The Ornstein–Uhlenbeck (OU) process is a random path that is pulled back toward a fixed level as it moves. It is noise with a memory of where it started, but that memory fades. It solves the problem that a plain random walk spreads out without limit, while many real quantities fluctuate around a typical value and stay near it.

Builds on: Stochastic Differential Equation · Leads to: Itô calculus applications such as diffusion models

Note: this lesson explains a mathematical model. It is education, not financial or investment advice.

Where it's used

Interest rates. The Vasicek model of 1977 describes a short-term interest rate as an OU process. Rates move at random but are assumed to be pulled toward a long-run level set by the economy, so a very high rate tends to come down over time.

Particles in a fluid. A small particle in a viscous liquid is kicked by molecules at random, and friction pulls its velocity back toward zero. The velocity of such a particle is an OU process. This was the physical problem that the original 1930 paper by Leonard Ornstein and George Uhlenbeck set out to describe.

Pairs trading. Two stocks that move together can have a price gap that wanders but tends to return to zero. Analysts model that gap as an OU process to estimate how long a gap usually lasts. This is a statistical description, and it does not guarantee that the gap will close.

Physical and biological noise. Quantities that have a set point with random disturbance, such as the temperature of a room with a thermostat or a population near a carrying capacity, are often modelled with the same pull-back structure.

How it works

Take a value that starts at 2 and is pulled toward 0. Each unit of time it moves back by a fixed fraction of its distance from 0, and it is also shoved by noise. We keep the pull simple: the rate is 1, so the value moves back by 1 times its distance per unit time.

  1. Start at X0=2X_0 = 2. The target level is μ=0\mu = 0. The pull strength is θ=1\theta = 1.
  2. Measure the gap from the target: 2−0=22 - 0 = 2. The pull on the value is proportional to this gap, so a big gap gives a big pull. Check: at a gap of 4 the pull would be twice as strong.
  3. Over a short step dtdt, the drift moves the value by −θ(X−μ) dt-\theta (X - \mu)\,dt. With X=2X = 2 and a step of 0.1, the drift is −0.2-0.2. Check: the value moves toward 0, not away.
  4. Add the noise. A random kick of size σdt\sigma\sqrt{dt} is added, with σ=0.5\sigma = 0.5. The kick is random, with mean zero. Check: the kicks cancel on average, so the drift sets the average direction.
  5. Repeat over many steps. The value keeps getting pulled back toward 0 while the kicks keep it wandering. Over time the gap settles into a stable spread around 0 rather than growing.

The picture is a ball on a spring that is being shaken at random. The spring pulls the ball back, the shaking pushes it away, and the ball ends up in a cloud around the spring's rest point.

00.511.522.5300.20.40.60.81timeaverage gap from target
  • theta = 1
  • theta = 2
The average distance from the target shrinks exponentially. A larger theta pulls back faster.

The math

Definition: Ornstein–Uhlenbeck process
A random path that is pulled toward a fixed level μ\mu at a speed θ\theta while being shoved by random noise of size σ\sigma. It is defined as the solution of the equation below.

The OU process is the solution of the stochastic differential equation

dXt=θ(μ−Xt) dt+σ dWt,dX_t = \theta(\mu - X_t)\,dt + \sigma\,dW_t,

where μ\mu is the long-run level, θ>0\theta > 0 is the speed of the pull, σ>0\sigma > 0 is the noise size and dWtdW_t is the increment of a Brownian motion. The first term is the drift from step 3, and the second is the noise from step 4. Without the noise term, the equation is an ordinary differential equation whose solution decays exponentially toward μ\mu, and that is the deterministic core of the process.

Step 3 in symbols: the drift term

The drift θ(μ−Xt)\theta(\mu - X_t) is linear in the gap. It is positive when XtX_t is below μ\mu and negative when it is above, so it always points toward μ\mu. Its size is proportional to the gap, which is the feature that makes the process mean-reverting.

Steps 4 and 5 in symbols: the solution

Solving the equation gives the value at time tt as

Xt=μ+(X0−μ)e−θt+σ∫0te−θ(t−s) dWs.X_t = \mu + (X_0 - \mu)e^{-\theta t} + \sigma\int_0^t e^{-\theta(t-s)}\,dW_s.

The first two terms are the deterministic part, a path that decays exponentially toward μ\mu from the start. The integral is the accumulated noise, with each old kick weighted by e−θ(t−s)e^{-\theta(t-s)}, so recent kicks count more than old ones. This weight is the formal memory that fades.

The mean and variance

Because the integral of noise has mean zero, the mean and variance follow directly:

E[Xt]=μ+(X0−μ)e−θt,Var(Xt)=σ22θ(1−e−2θt).\mathbb{E}[X_t] = \mu + (X_0 - \mu)e^{-\theta t}, \qquad \mathrm{Var}(X_t) = \frac{\sigma^2}{2\theta}\left(1 - e^{-2\theta t}\right).

The mean decays exponentially toward μ\mu, as the exponential in the formula shows. The variance starts at 0 and grows toward a limit.

The stationary distribution

As tt becomes large, e−θte^{-\theta t} goes to 0. The mean tends to μ\mu and the variance to σ2/(2θ)\sigma^2/(2\theta). The value is then normally distributed, X∞∼N(μ,σ22θ)X_\infty \sim \mathcal{N}\left(\mu, \frac{\sigma^2}{2\theta}\right), so the process has a stable Gaussian cloud around μ\mu. A larger pull θ\theta makes the cloud narrower; more noise σ\sigma makes it wider.

Worked examples

Example
1. Tiny: the average gap at time 1

Take μ=0\mu = 0, θ=1\theta = 1, X0=1X_0 = 1, and look at t=1t = 1.

  1. Mean: E[X1]=0+(1−0)e−1=0.3679\mathbb{E}[X_1] = 0 + (1 - 0)e^{-1} = 0.3679.
  2. Half-life check: the mean halves when e−θt=1/2e^{-\theta t} = 1/2, that is when t=ln⁡2/θ=0.6931t = \ln 2 / \theta = 0.6931.
  3. At t=0.6931t = 0.6931 the mean is e−0.6931=0.5e^{-0.6931} = 0.5. Check: 0.50.5 is half of 1.
  4. Interpretation: after one unit of time the average value is about 37 percent of the start, and after about 0.69 units it is half of the start. The pull is strong enough to halve the gap in under one unit.
Example
2. Standard: mean and spread around a level

Take μ=10\mu = 10, θ=2\theta = 2, σ=1\sigma = 1, X0=12X_0 = 12, and look at t=0.5t = 0.5.

  1. Mean: E[X0.5]=10+(12−10)e−2×0.5=10+2e−1=10+0.7358=10.7358\mathbb{E}[X_{0.5}] = 10 + (12 - 10)e^{-2 \times 0.5} = 10 + 2e^{-1} = 10 + 0.7358 = 10.7358.
  2. Variance: Var(X0.5)=14(1−e−2)=0.25×(1−0.1353)=0.25×0.8647=0.2162\mathrm{Var}(X_{0.5}) = \frac{1}{4}(1 - e^{-2}) = 0.25 \times (1 - 0.1353) = 0.25 \times 0.8647 = 0.2162.
  3. Standard deviation: 0.2162=0.4649\sqrt{0.2162} = 0.4649.
  4. Stationary check: as tt grows, the variance tends to 12×2=0.25\frac{1}{2 \times 2} = 0.25.
  5. Interpretation: half a time unit later, the typical value is about 10.74±0.4610.74 \pm 0.46. The gap of 2 has shrunk to about 0.74, and the noise has spread the value over a band that is still growing toward its final width.
Example
3. Realistic: a pairs-trading gap with a half-life

Suppose the gap between two related prices has a half-life of 10 days, which means ln⁡2/θ=10\ln 2 / \theta = 10, so θ=0.0693\theta = 0.0693 per day. The gap today is 2.0 units above its long-run mean of 0. How much of the gap is left in expectation after 30 days?

  1. Compute the pull: θt=0.0693×30=2.079\theta t = 0.0693 \times 30 = 2.079.
  2. Compute the decay: e−2.079=0.125e^{-2.079} = 0.125.
  3. Expected gap: 2.0×0.125=0.252.0 \times 0.125 = 0.25 units. Check: 30 days is 3 half-lives, and (1/2)3=1/8=0.125(1/2)^3 = 1/8 = 0.125.
  4. Interpretation: on average, about one eighth of the gap is left after three half-lives. This is a model-based expectation, not a promise that the gap will close on schedule.

Try it: the gap has a half-life of 5 days. What fraction of the starting gap is left in expectation after 15 days? Answer: 15 days is 3 half-lives, so (1/2)3=1/8(1/2)^3 = 1/8, that is 12.5 percent.

Common mistakes and tradeoffs

It is tempting to think an OU process is just noise around a mean with no memory. In fact it has memory: the mean at time tt depends on X0X_0, and the effect of X0X_0 decays as e−θte^{-\theta t}. The starting point is forgotten only gradually.

It is also tempting to think a larger pull θ\theta makes the noise larger. In fact a larger θ\theta narrows the long-run spread, because the stationary variance is σ2/(2θ)\sigma^2/(2\theta). Faster pull means the value spends less time far from the mean.

Use an OU process when a quantity is expected to return to a level, and when a Gaussian stationary spread is a sensible model. Do not use it for quantities with a trend or for prices that can move to new levels permanently, because a plain random walk or a model with drift describes those better. Alternatives include the random walk when there is no pull, geometric Brownian motion when the noise should scale with the level, and jump processes when the path has sudden moves.

History

In 1930 Leonard Ornstein and George Uhlenbeck published a paper on the theory of Brownian motion. Brownian motion, the random jiggling of small particles, had been described by physicists decades earlier, but the random walk model did not capture the way a particle's velocity is damped by friction. Ornstein and Uhlenbeck wrote down a model in which the velocity is pulled back toward zero and kicked by random molecular impacts, and they showed it reproduced the observed behaviour. The model was later used in finance, particularly for interest rates, where it gave a simple, tractable pull toward a long-run level. The idea caught on because it is one of the few continuous models that is both realistic about noise and solvable in closed form.

Recap

  • The OU process is noise that is pulled back toward a fixed level μ\mu at a rate θ\theta. It is a continuous-time version of a Markov chain: its next move depends only on where it is now.
  • Its equation is dXt=θ(μ−Xt) dt+σ dWtdX_t = \theta(\mu - X_t)\,dt + \sigma\,dW_t, and the drift is proportional to the gap from μ\mu.
  • The mean decays as e−θte^{-\theta t}, and the variance tends to σ2/(2θ)\sigma^2/(2\theta).
  • The long-run distribution is a Gaussian cloud around μ\mu, narrower for larger θ\theta and wider for larger σ\sigma.
  • Next, read Itô calculus, which is needed to solve the equation rigorously, and diffusion models, which use noise processes of this kind.

Check yourself

QuestionAn OU process has theta = 1 and mu = 0. Starting at X_0 = 3, what is the expected value at time 2?Show answer

E[X2]=0+(3−0)e−2=3×0.1353=0.406\mathbb{E}[X_2] = 0 + (3 - 0)e^{-2} = 3 \times 0.1353 = 0.406. The expected value has decayed toward 0.

QuestionFor an OU process with sigma = 0.5 and theta = 2, what is the long-run variance, and what is the standard deviation?Show answer

The stationary variance is σ2/(2θ)=0.25/4=0.0625\sigma^2/(2\theta) = 0.25/4 = 0.0625. The standard deviation is 0.0625=0.25\sqrt{0.0625} = 0.25.

QuestionWhy does a larger theta give a narrower long-run spread, even though the same noise sigma is added?Show answer

A larger theta pulls the value back faster, so the value spends less time far from the mean. The stationary variance is σ2/(2θ)\sigma^2/(2\theta), which falls as theta rises, so the balance between kicks and pull is struck closer to μ\mu.

QuestionA standard random walk has no pull toward a level. Why is its spread after many steps larger than an OU process with the same noise?Show answer

A random walk keeps adding kicks without any pull back, so its variance grows with time and has no limit. The OU process pulls back each step, so its variance levels off at σ2/(2θ)\sigma^2/(2\theta).

QuestionA gap has a half-life of 4 days. What fraction of the starting gap is left in expectation after 12 days?Show answer

12 days is 3 half-lives, so the expected fraction is (1/2)3=1/8(1/2)^3 = 1/8, or 12.5 percent.

Sources