Tutorials › Stochastic Processes › Mean and Covariance of the Ornstein-Uhlenbeck Process

Gaussian Processes · Tutorial 884 of 994

Mean and Covariance of the Ornstein-Uhlenbeck Process

Use the OU transition recursion to derive its mean and covariance, then calculate and verify them for deterministic and Gaussian starting distributions.

Advanced 10 min read

What You'll Learn

  • Write the OU transition law as a recursion with a Gaussian innovation independent of the past.
  • Derive the mean function for deterministic and Gaussian initial values.
  • Obtain the variance function from the conditional variance recursion.
  • Derive the covariance between two times by conditioning on the earlier time.
  • Calculate OU means, variances, and covariances at specified times.
  • Distinguish covariance from the uncentered second moment.

From the Transition Law to the Mean and Covariance

The Ornstein-Uhlenbeck (OU) process is a Gaussian model for a quantity that fluctuates while being pulled toward a long-run level. Its transition law gives the distribution at a later time conditional on the current value. Rewriting that law as a recursion makes it possible to derive the process’s mean and covariance, including when the initial value is random.

Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_t)_{t\ge0}\) be a continuous-time process with state space \(S=\mathbb{R}\), and let \((\mathcal{F}_t)_{t\ge0}\) be a filtration to which the process is adapted. Fix a mean-reversion rate \(\kappa>0\), a level \(\theta\in\mathbb{R}\), and a noise parameter \(\sigma>0\). The OU transition law, for \(0\le s<t\), is

$$ X_t\mid\mathcal{F}_s \sim N\!\left(\theta+e^{-\kappa(t-s)}(X_s-\theta), \frac{\sigma^2}{2\kappa}\left(1-e^{-2\kappa(t-s)}\right)\right). $$

Define \(q=\sigma^2/(2\kappa)\) and \(a_{s,t}=e^{-\kappa(t-s)}\). Equivalently, the transition law can be written as the recursion

$$ X_t=\theta+a_{s,t}(X_s-\theta)+\varepsilon_{s,t}, \qquad \varepsilon_{s,t}\mid\mathcal{F}_s \sim N\!\left(0,q(1-a_{s,t}^2)\right). $$

Because the conditional law of \(\varepsilon_{s,t}\) does not depend on \(\mathcal{F}_s\), this innovation is independent of \(\mathcal{F}_s\). In particular, it has mean zero and is uncorrelated with any square-integrable \(\mathcal{F}_s\)-measurable random variable. Assume \(X_0\) is independent of the transition innovations and has finite second moment. We allow either a deterministic start \(X_0=x_0\), or a Gaussian start \(X_0\sim N(m_0,v_0)\), including the degenerate Gaussian case \(v_0=0\).

Theorem: Suppose \(X_0\sim N(m_0,v_0)\), where \(v_0\ge0\), and the OU process has the transition law above. For \(t\ge0\), $$ \mathbb{E}[X_t]=\theta+(m_0-\theta)e^{-\kappa t}, \qquad \operatorname{Var}(X_t)=v_0e^{-2\kappa t}+q(1-e^{-2\kappa t}). $$ For \(s,t\ge0\), its covariance is $$ \operatorname{Cov}(X_s,X_t) =e^{-\kappa|t-s|} \left(v_0e^{-2\kappa\min(s,t)} +q\left(1-e^{-2\kappa\min(s,t)}\right)\right). $$ Every finite collection of values of \(X\) is jointly Gaussian.

The variance formula separates the effect of the initial uncertainty from the variability accumulated through the transitions. The covariance formula says that the dependence between two times is the variance at the earlier time multiplied by the exponential decay over the time gap.

Deriving the Moment Formulas

Proof. First fix \(t\ge0\). Taking \(s=0\) in the recursion gives \(X_t=\theta+e^{-\kappa t}(X_0-\theta)+\varepsilon_{0,t}\). The innovation has conditional mean zero, so its unconditional mean is zero. Taking expectations therefore yields \(\mathbb{E}[X_t]=\theta+e^{-\kappa t}(m_0-\theta)\). The innovation is independent of \(X_0\), and its variance is \(q(1-e^{-2\kappa t})\). The variance of the sum of these independent terms is consequently \(e^{-2\kappa t}v_0+q(1-e^{-2\kappa t})\), as stated.

To calculate covariance, suppose first that \(s\le t\). The recursion from \(s\) to \(t\) gives \(X_t=\theta+e^{-\kappa(t-s)}(X_s-\theta)+\varepsilon_{s,t}\). Since \(X_s\) is \(\mathcal{F}_s\)-measurable and the innovation is independent of \(\mathcal{F}_s\), \(\operatorname{Cov}(X_s,\varepsilon_{s,t})=0\). Thus $$ \operatorname{Cov}(X_s,X_t)=e^{-\kappa(t-s)}\operatorname{Var}(X_s). $$ Substituting the variance formula already obtained gives the claimed expression for \(s\le t\). For \(t<s\), covariance symmetry gives \(\operatorname{Cov}(X_s,X_t)=\operatorname{Cov}(X_t,X_s)\), which is the same formula with the earlier time \(\min(s,t)\) and time gap \(|t-s|\).

Finally, take any ordered times \(0\le t_1<\cdots<t_r\). Recursively applying the transition equation expresses each \(X_{t_j}\) as a linear combination of \(X_0\) and the innovations over the successive intervals \((t_{\ell-1},t_\ell]\), with \(t_0=0\). Each interval innovation is independent of the history at its left endpoint, so these successive innovations are mutually independent. They are Gaussian, and \(X_0\) is Gaussian and independent of them. The vector consisting of \(X_{t_1},\ldots,X_{t_r}\) is therefore a linear transformation of independent Gaussian variables, hence is jointly Gaussian. If \(r=1\), the same argument applies directly to \(X_{t_1}\). This proves all the claims. \(\square\)

When \(X_0=x_0\) is deterministic, set \(m_0=x_0\) and \(v_0=0\). The formulas then reduce to $$ \mathbb{E}[X_t]=\theta+(x_0-\theta)e^{-\kappa t}, \qquad \operatorname{Var}(X_t)=q(1-e^{-2\kappa t}). $$ For a Gaussian initial value, the same transition noise acts on both its initial mean and its initial variance: the mean deviation from \(\theta\) decays by \(e^{-\kappa t}\), while the initial variance decays by \(e^{-2\kappa t}\).

Worked Moment Calculations

Worked Example: A Deterministic Initial Value

Let \(\kappa=1\), \(\theta=3\), \(\sigma^2=8\), and \(X_0=1\). Find the means at \(s=\log 2\) and \(t=\log 4\), the variance at \(s\), and the covariance between \(X_s\) and \(X_t\).

First, \(q=\sigma^2/(2\kappa)=8/2=4\). Also \(e^{-s}=e^{-\log 2}=1/2\) and \(e^{-t}=e^{-\log 4}=1/4\). Therefore $$ \mathbb{E}[X_s]=3+(1-3)\frac12=3-1=2, \qquad \mathbb{E}[X_t]=3+(1-3)\frac14=3-\frac12=\frac52. $$ Since \(v_0=0\), the variance at \(s\) is $$ \operatorname{Var}(X_s)=4\left(1-e^{-2s}\right) =4\left(1-\frac14\right)=4\cdot\frac34=3. $$ The time gap is \(t-s=\log 4-\log 2=\log 2\), so \(e^{-(t-s)}=1/2\). The covariance is $$ \operatorname{Cov}(X_s,X_t)=\frac12\cdot 3=\frac32. $$ Check: The recursion from \(s\) to \(t\) has coefficient \(1/2\) and innovation variance \(4(1-(1/2)^2)=3\). Hence \(\operatorname{Var}(X_t)=(1/2)^2\cdot3+3=3/4+3=15/4\), which agrees with \(4(1-e^{-2t})=4(1-1/16)=15/4\).

Worked Example: A Gaussian Initial Value

Let \(\kappa=1\), \(\theta=1\), \(\sigma^2=4\), and \(X_0\sim N(0,6)\). Compute the means and variances at \(s=\log 2\) and \(t=\log 4\), and find their covariance.

Here \(q=4/(2\cdot1)=2\), \(m_0=0\), and \(v_0=6\). Using \(e^{-s}=1/2\) and \(e^{-t}=1/4\), the means are $$ \mathbb{E}[X_s]=1+(0-1)\frac12=\frac12, \qquad \mathbb{E}[X_t]=1+(0-1)\frac14=\frac34. $$ At \(s\), the variance is $$ \operatorname{Var}(X_s)=6\left(\frac12\right)^2 +2\left(1-\left(\frac12\right)^2\right) =\frac{6}{4}+2\cdot\frac34 =\frac32+\frac32=3. $$ At \(t\), it is $$ \operatorname{Var}(X_t)=6\left(\frac14\right)^2 +2\left(1-\left(\frac14\right)^2\right) =\frac{6}{16}+2\cdot\frac{15}{16} =\frac38+\frac{30}{16} =\frac38+\frac{15}{8}= \frac94. $$ The gap is again \(\log 2\), so the covariance is $$ \operatorname{Cov}(X_s,X_t)=\frac12\operatorname{Var}(X_s)=\frac12\cdot3=\frac32. $$ Check: Propagating the variance from \(s\) to \(t\) gives \((1/2)^2\cdot3+2(1-(1/2)^2)=3/4+3/2=9/4\), matching the direct calculation.

Worked Example: Initial Variance Matching the Transition Scale

Let \(\kappa=2\), \(\theta=0\), \(\sigma^2=4\), and \(X_0\sim N(5,1)\). Find the mean, variance, and covariance at \(s=\log 2\) and \(t=\log 4\).

Now \(q=4/(2\cdot2)=1\), and \(e^{-2s}=e^{-2\log2}=1/4\), while \(e^{-2t}=e^{-2\log4}=1/16\). The means are $$ \mathbb{E}[X_s]=0+(5-0)\frac14=\frac54, \qquad \mathbb{E}[X_t]=0+(5-0)\frac1{16}=\frac5{16}. $$ The variances are $$ \operatorname{Var}(X_s)=1\cdot\frac14+1\left(1-\frac14\right) =\frac14+\frac34=1, $$ and $$ \operatorname{Var}(X_t)=1\cdot\frac1{16}+1\left(1-\frac1{16}\right) =\frac1{16}+\frac{15}{16}=1. $$ The coefficient over the gap is \(e^{-2(t-s)}=e^{-2\log2}=1/4\). It follows that $$ \operatorname{Cov}(X_s,X_t)=\frac14\operatorname{Var}(X_s)=\frac14. $$ Check: The transition variance over this gap is \(1(1-(1/4)^2)=15/16\). Thus the later variance computed from the earlier one is \((1/4)^2\cdot1+15/16=1/16+15/16=1\), as required.

Interpreting the Formulas and Avoiding Errors

The covariance is symmetric in its two time arguments, although its most useful expression uses the earlier time. For \(s\le t\), the relation \(\operatorname{Cov}(X_s,X_t)=e^{-\kappa(t-s)}\operatorname{Var}(X_s)\) is especially efficient: once the earlier variance is known, the covariance requires only the decay factor over the gap. On the diagonal \(s=t\), the same formula gives \(\operatorname{Cov}(X_s,X_s)=\operatorname{Var}(X_s)\), since \(e^0=1\).

If \(X_0\sim N(\theta,q)\), then \(m_0=\theta\) and \(v_0=q\). Substituting into the moment formulas gives \(\mathbb{E}[X_t]=\theta\) and \(\operatorname{Var}(X_t)=q\) at every time, and \(\operatorname{Cov}(X_s,X_t)=q e^{-\kappa|t-s|}\). This is a useful special case: the mean and covariance depend only on the time gap in the covariance expression. It follows from the formulas without assuming that every initial distribution has these properties.

Common mistake: confusing a covariance with a product moment. In the first worked example, the means are \(2\) and \(5/2\), and the covariance is \(3/2\). The product moment is instead $$ \mathbb{E}[X_sX_t] =\operatorname{Cov}(X_s,X_t)+\mathbb{E}[X_s]\mathbb{E}[X_t] =\frac32+2\cdot\frac52 =\frac32+5=\frac{13}{2}. $$ A wrong calculation that reports \(13/2\) as the covariance has omitted the centering terms. The correction is to subtract the product of the means: \(13/2-2(5/2)=13/2-5=3/2\).

Another useful check is the time-zero boundary. The formulas give \(\mathbb{E}[X_0]=\theta+(m_0-\theta)=m_0\) and \(\operatorname{Var}(X_0)=v_0\). For deterministic \(X_0=x_0\), the variance at zero is zero. These checks help catch errors such as using \(e^{-\kappa t}\) rather than \(e^{-2\kappa t}\) for the initial contribution to the variance.

Check Your Understanding

Use the transition recursion and verify each result by substituting it into the relevant mean, variance, or covariance formula.

  1. For \(\kappa=1\), \(\theta=0\), \(\sigma^2=2\), and \(X_0=2\), find \(\mathbb{E}[X_{\log 2}]\) and \(\operatorname{Var}(X_{\log 2})\).
  2. For a Gaussian initial value \(X_0\sim N(1,4)\), write the mean and variance at time \(t\) when \(\theta=3\), \(\kappa=1\), and \(\sigma^2=4\).
  3. If \(s\le t\), explain why the covariance is \(e^{-\kappa(t-s)}\operatorname{Var}(X_s)\), rather than the same factor times \(\operatorname{Var}(X_t)\).
  4. Suppose \(\mathbb{E}[X_s]=1\), \(\mathbb{E}[X_t]=2\), and \(\operatorname{Cov}(X_s,X_t)=3\). Compute \(\mathbb{E}[X_sX_t]\).
  5. For \(X_0\sim N(\theta,q)\), verify from the formulas that the variance at time \(t\) is \(q\).