Tutorials › Stochastic Calculus › Ornstein-Uhlenbeck Solutions By Integrating Factors

Explicit Solutions: Linear SDEs · Tutorial 243 of 600

Ornstein-Uhlenbeck Solutions By Integrating Factors

Use an integrating factor to derive and verify the explicit pathwise solution of the mean-reverting linear SDE.

Advanced 13 min read

What You'll Learn

  • Set up the Ornstein–Uhlenbeck SDE on a filtered probability space with Brownian motion.
  • Derive the integrating-factor equation using Itô’s formula and its correction term.
  • Obtain the explicit solution for any deterministic initial value.
  • Verify the solution and prove uniqueness among adapted solutions.
  • Distinguish the transformed martingale from the stochastic convolution, which is generally not a martingale.
  • Check the formula in concrete parameter choices, including zero mean reversion.

Why an Integrating Factor Works

The Ornstein–Uhlenbeck equation is a linear stochastic differential equation with a restoring drift: when \(X_t\) lies above its long-run level \(\theta\), the drift points downward, and when it lies below \(\theta\), it points upward, provided \(\kappa>0\). The diffusion coefficient \(\sigma\) supplies constant-amplitude random fluctuations. An integrating factor removes the term proportional to \(X_t-\theta\), just as it does for a deterministic linear differential equation.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a Brownian motion \(B_t\) with respect to the filtration. In particular, its increments are independent of the past and \(B_t-B_s\) has distribution \(N(0,t-s)\) for \(s<t\). Fix constants \(\kappa,\theta,\sigma\in\mathbb{R}\) and a deterministic initial value \(x_0\in\mathbb{R}\). The mean-reverting case has \(\kappa>0\), but the solution formula below is valid for every real \(\kappa\).

Definition: The Ornstein–Uhlenbeck equation considered here is \(dX_t=\kappa(\theta-X_t)\,dt+\sigma\,dB_t\), with \(X_0=x_0\). The coefficient \(\kappa(\theta-X_t)\) is the drift, and the constant \(\sigma\) is the diffusion coefficient. An Itô integrand belongs to \(\mathcal{L}^2\) on \([0,T]\) when it is progressively measurable and \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\).

Deriving the Explicit Formula

Center the process at \(\theta\), and multiply by \(e^{\kappa t}\). To justify this step, apply Itô’s formula to \(f(t,x)=e^{\kappa t}(x-\theta)\). Its derivatives are \(f_t(t,x)=\kappa e^{\kappa t}(x-\theta)\), \(f_x(t,x)=e^{\kappa t}\), and \(f_{xx}(t,x)=0\). Since the diffusion coefficient of \(X_t\) is \(\sigma\), the Itô correction is \(\tfrac12 f_{xx}(t,X_t)\sigma^2\,dt=0\). Therefore

$$ \begin{aligned} d\big(e^{\kappa t}(X_t-\theta)\big) &=\kappa e^{\kappa t}(X_t-\theta)\,dt +e^{\kappa t}\big(\kappa(\theta-X_t)\,dt+\sigma\,dB_t\big)\\ &=\sigma e^{\kappa t}\,dB_t. \end{aligned} $$

The two drift terms cancel because \(\theta-X_t=-(X_t-\theta)\). Integrating from \(0\) to \(t\) gives the transformed equation. For a fixed finite horizon \(T\), the deterministic integrand \(H_s=e^{\kappa s}\) is progressively measurable and satisfies \(\mathbb{E}\int_0^T H_s^2\,ds=\int_0^T e^{2\kappa s}\,ds<\infty\). Thus the integral is an Itô integral of an \(\mathcal{L}^2\) integrand.

$$ e^{\kappa t}(X_t-\theta)=x_0-\theta+\sigma\int_0^t e^{\kappa s}\,dB_s. $$
Theorem: For every \(T<\infty\), the unique continuous adapted solution on \([0,T]\) is $$ X_t=\theta+e^{-\kappa t}(x_0-\theta) +\sigma\int_0^t e^{-\kappa(t-s)}\,dB_s,\qquad 0\le t\le T. $$ For each fixed \(t\), the integral is defined with the progressively measurable integrand \(H_s=e^{-\kappa(t-s)}\mathbf{1}_{[0,t]}(s)\), which satisfies \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\).

Proof. First suppose \(X\) is a continuous adapted solution. The Itô calculation above shows that \(e^{\kappa t}(X_t-\theta)=x_0-\theta+\sigma\int_0^t e^{\kappa s}\,dB_s\). Multiplying by \(e^{-\kappa t}\) yields the displayed formula, because multiplying the integrand by the deterministic factor \(e^{-\kappa t}\) gives \(e^{-\kappa(t-s)}\).

Conversely, define \(N_t=\int_0^t e^{\kappa s}\,dB_s\) and set \(X_t=\theta+e^{-\kappa t}(x_0-\theta)+\sigma e^{-\kappa t}N_t\). The integrand \(e^{\kappa s}\) is in \(\mathcal{L}^2\) on every finite interval, so \(N\) has a continuous adapted version. Apply Itô’s formula to \(g(t,n)=e^{-\kappa t}n\): \(g_t=-\kappa e^{-\kappa t}n\), \(g_n=e^{-\kappa t}\), and \(g_{nn}=0\), so the correction \(\tfrac12 g_{nn}\,d[N]_t\) is zero. Since \(dN_t=e^{\kappa t}\,dB_t\), this gives \(d(e^{-\kappa t}N_t)=-\kappa e^{-\kappa t}N_t\,dt+dB_t\). Differentiating the deterministic term gives \(-\kappa e^{-\kappa t}(x_0-\theta)\,dt\). Combining these identities yields \(dX_t=-\kappa(X_t-\theta)\,dt+\sigma\,dB_t=\kappa(\theta-X_t)\,dt+\sigma\,dB_t\), and \(X_0=x_0\). This proves existence. The first part of the proof shows that every solution must equal this formula, which proves uniqueness. \(\square\)

Worked Solutions and Checks

Worked Example: Mean Reversion with a Positive Initial Displacement

Take \(\kappa=2\), \(\theta=3\), \(\sigma=1\), and \(x_0=0\). Substitute these values into the formula:

$$ X_t=3+e^{-2t}(0-3)+\int_0^t e^{-2(t-s)}\,dB_s =3-3e^{-2t}+\int_0^t e^{-2(t-s)}\,dB_s. $$

At \(t=1\), the deterministic part is \(3-3e^{-2}\), and the random part is \(\int_0^1 e^{-2(1-s)}\,dB_s\). The latter is well-defined: on \([0,1]\) its deterministic integrand is progressively measurable and its squared integral is \(\int_0^1 e^{-4(1-s)}\,ds=(1-e^{-4})/4<\infty\).

Check: at \(t=0\), the integral over the empty interval is zero and \(3-3e^0=0=x_0\). The integrating-factor form is \(e^{2t}(X_t-3)=-3+\int_0^t e^{2s}\,dB_s\), matching the transformed equation with \(x_0-\theta=-3\).

Worked Example: Evaluating the Formula at a Chosen Time

Take \(\kappa=1\), \(\theta=-2\), \(\sigma=3\), and \(x_0=5\). The explicit solution is

$$ X_t=-2+7e^{-t}+3\int_0^t e^{-(t-s)}\,dB_s. $$

At \(t=\ln 2\), this becomes $$ X_{\ln 2}=-2+\frac{7}{2} +3\int_0^{\ln 2}e^{-(\ln 2-s)}\,dB_s =\frac{3}{2}+\frac{3}{2}\int_0^{\ln 2}e^s\,dB_s, $$ because \(e^{-(\ln 2-s)}=e^s/2\). The kernel is admissible on this finite interval: it is deterministic and progressively measurable, and \(\int_0^{\ln 2}e^{2s}\,ds=(e^{2\ln 2}-1)/2=3/2<\infty\).

Check: the transformed formula is \(e^t(X_t+2)=7+3\int_0^t e^s\,dB_s\). At \(t=\ln 2\), it gives \(2(X_{\ln 2}+2)=7+3\int_0^{\ln 2}e^s\,dB_s\). Substituting the expression above gives the same right-hand side.

Worked Example: The Zero-Reversion Case

Let \(\kappa=0\), \(\theta=7\), \(\sigma=-2\), and \(x_0=1\). The drift vanishes, since \(0\cdot(7-X_t)=0\), and the formula reduces to

$$ X_t=7+(1-7)-2\int_0^t 1\,dB_s=1-2B_t. $$

Check: this process starts at \(X_0=1\), and its differential is \(dX_t=-2\,dB_t\), exactly the stated SDE when \(\kappa=0\). The formula also has the correct limit as \(\kappa\) tends to zero: \(e^{-\kappa t}\) tends to \(1\), and the kernel \(e^{-\kappa(t-s)}\) tends uniformly to \(1\) for \(s\in[0,t]\). By the Itô isometry, the corresponding integrals converge in \(L^2\), since the squared-integrand difference has integral tending to zero.

The Convolution Is Not Generally a Martingale

The transformed stochastic integral and the stochastic convolution in the explicit solution are related, but they are different processes. Define $$ N_t=\int_0^t e^{\kappa s}\,dB_s, \qquad M_t=\int_0^t e^{-\kappa(t-s)}\,dB_s. $$ For every fixed finite \(T\), the integrand \(e^{\kappa s}\) defining \(N\) is progressively measurable and in \(\mathcal{L}^2\) on \([0,T]\). The process \(N\) is a true square-integrable martingale: the Itô isometry gives \(\mathbb{E}[N_t^2]=\int_0^t e^{2\kappa s}\,ds<\infty\), and for \(s<t\), the increment \(\int_s^t e^{\kappa u}\,dB_u\) has conditional expectation zero given \(\mathcal{F}_s\). Hence \(\mathbb{E}[N_t\mid\mathcal{F}_s]=N_s\).

For each fixed \(t\), \(M_t\) is also a well-defined square-integrable Itô integral: its deterministic integrand on \([0,t]\) is progressively measurable, and \(\int_0^t e^{-2\kappa(t-s)}\,ds<\infty\). But as a process in \(t\), \(M_t=e^{-\kappa t}N_t\) is generally not a martingale. For \(0\le s<t\), the martingale property of \(N\) gives $$ \mathbb{E}[M_t\mid\mathcal{F}_s] =e^{-\kappa t}N_s =e^{-\kappa(t-s)}M_s. $$ If \(\kappa>0\) and \(s>0\), then \(\mathbb{E}[M_s^2]=\int_0^s e^{-2\kappa(s-u)}\,du>0\), so \(M_s\) is not zero almost surely. Since \(e^{-\kappa(t-s)}\ne1\), the conditional expectation is not \(M_s\) almost surely. Thus \(M\) is not a martingale in this case. This distinction matters: the integrating-factor integral \(N\) is a martingale, while the convolution appearing in \(X_t\) generally is not.

Common Pitfall: Forgetting the Exponential Kernel

A tempting but incorrect answer is \(X_t=\theta+(x_0-\theta)+\sigma B_t\), on the grounds that the noise is additive. That expression omits the mean-reverting drift and the time-dependent weighting of past noise. For example, with \(\kappa=1\), \(\theta=0\), \(x_0=1\), and \(\sigma=1\), the incorrect expression is \(1+B_t\). Its differential is \(dB_t\), but the required drift is \(-X_t\,dt\), which is not zero in general. The correct formula is \(X_t=e^{-t}+\int_0^t e^{-(t-s)}\,dB_s\); its drift term is present, as the integrating-factor verification shows.

A second error is to call \(\int_0^t e^{-\kappa(t-s)}\,dB_s\) a martingale because it is an Itô integral. For a fixed terminal time \(t\), it is indeed an Itô integral with a deterministic \(\mathcal{L}^2\) integrand. But when \(t\) varies, the integrand itself changes with \(t\); the conditional expectation calculation above shows why the resulting process is generally not a martingale. Keep the fixed-time integral and the process-level martingale claim separate.

The explicit representation is useful because it turns the SDE into a deterministic decay term plus a weighted accumulation of Brownian increments. The weight \(e^{-\kappa(t-s)}\) discounts noise from earlier times when \(\kappa>0\). This formula is also a direct route to further properties of the process, but deriving its transition laws and covariance structure is a separate calculation.

Check Your Understanding

Use the integrating-factor derivation and verify each proposed conclusion directly.

  1. For \(\kappa=3\), \(\theta=2\), \(\sigma=0\), and \(x_0=8\), write the explicit solution and check its initial value.
  2. For general \(\kappa\), identify the transformed process that is a square-integrable martingale and state the integrability condition for its integrand on \([0,T]\).
  3. Compute \(\mathbb{E}[M_t\mid\mathcal{F}_s]\) for \(M_t=\int_0^t e^{-\kappa(t-u)}\,dB_u\), where \(0\le s<t\), and explain when the result rules out the martingale property.
  4. Set \(\kappa=0\) in the explicit formula and simplify it for arbitrary \(\theta,\sigma,x_0\).
  5. Apply the integrating factor to show why a proposed solution with no mean-reverting drift cannot satisfy the equation for general \(\kappa>0\).