Skip to content
All library documents

Euler and Exact Simulation of the Ornstein–Uhlenbeck Process

Article Quant Q&A · Author: DataAdventurer

Summary

The document compares two ways to simulate an Ornstein–Uhlenbeck process, commonly used to represent a mean-reverting variable. One method applies the Euler–Maruyama discretization to the stochastic differential equation, adding a drift adjustment and a normally distributed random increment at each time step. The other uses the known conditional distribution of the process to draw its value directly at a later time.

The distinction follows from the solution’s stochastic integral: with a deterministic exponential integrand, that integral is normally distributed, and its variance is obtained by integrating the squared integrand. This yields the exact transition distribution over a chosen interval. Euler–Maruyama approximates the continuous dynamics and improves as the step size shrinks, while direct sampling avoids intermediate points when only a later value is needed. The document explains the mathematical reason for the differing formulas, but does not discuss parameter estimation, numerical error bounds, or how to choose a simulation method for a particular calibration task.

Key ideas

  • Euler–Maruyama approximates the Ornstein–Uhlenbeck dynamics through successive time steps.
  • The process’s deterministic-integrand Ito integral is normally distributed.
  • Integrating the squared exponential integrand gives the transition variance.
  • Exact transition sampling can generate a later value without simulating intermediate points.
  • Euler–Maruyama converges toward the process as its time step becomes smaller.

Tags

Full text
# Two papers - two different solutions of the Ornstein-Uhlenbeck process


# Two papers - two different solutions of the Ornstein-Uhlenbeck process












Bernal 2016 says that the solution of $$ dr_{t}=\lambda*(\mu-r_{t})*dt+\sigma dW_{t} \qquad (eq.1) $$

equals $$ r_{t}=r_0*exp(-\lambda t)+\mu(1-exp(-\lambda t))+\sigma \int_{0}^{t} exp(-\lambda t)dW_{t} \qquad (eq.2)\\$$

which leads to following Euler Maruyana Scheme: $$ r_{t+\delta t}=r_t+\lambda (\mu -r_t)\delta t+\sigma \sqrt{\delta t} *\mathcal{N}(0,1) \qquad (eq.3)\\$$

On the other side this paper tells us that the solution of the SDE should be $$ S_{i+1}=S_i*exp(-\lambda \delta)+\mu(1-exp(-\lambda t))+\sigma \sqrt{\frac{(1-exp(-2\lambda t)}{2\lambda}}*\mathcal{N}(0,1) \qquad (eq.4)\\$$

Bernal uses $(eq.3)$ for calibration whereas GE and Berg use $(eq.4)$.

Why the difference? Bernals method makes completely sense to me.

## Answer by LocalVolatility (score 11)

https://quant.stackexchange.com/a/40267

Note that the Ito integral of a deterministic integrand $f: \mathbb{R}_+ \rightarrow \mathbb{R}$ is normally distributed

\begin{equation} \int_0^t f(u) \mathrm{d}W_u \sim \mathcal{N} \left( 0, \int_0^t f^2(u) \mathrm{d}u \right). \end{equation}

In your case, we have $f(t) = e^{-\lambda t}$ and thus

\begin{equation} \int_0^t f^2(u) \mathrm{d}u = \frac{1}{2 \lambda} \left( 1 - e^{-2 \lambda t} \right). \end{equation}

When it comes to simulation, the first approach simulates the SDE while the second uses the known distribution of its solution. The first approach converges as the number of time steps becomes small while in the second, you can directly simulate the time point of interest without intermediate sample points.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.