Interactive model — experiment with these parameters in sItô

For the Ornstein–Uhlenbeck process $dx_t = \theta(\mu - x_t)\,dt + \sigma\,dW_t$ around $\mu = 0$, the Euler–Maruyama recursion on step size $\Delta$ is $x_{n+1} = a\,x_n + \sigma\sqrt{\Delta}\,Z_n$ with contraction factor $a = 1 - \theta\Delta$ and $Z_n \sim \mathcal{N}(0, 1)$. Mean-square stability holds if and only if $|a| < 1$, which restricts the step size to $\theta\Delta < 2$. Even inside that stability boundary, the discrete scheme inflates the stationary variance by $\frac{2}{2 - \theta\Delta}$.

Variance inflation and instability

Iterating the recursion from $x_0 = 0$ gives variance $\sigma^2\Delta\,\frac{1 - a^{2n}}{1 - a^2}$ after $n$ steps. Whenever $|a| < 1$, this converges to $\frac{\sigma^2}{\theta(2 - \theta\Delta)}$ instead of the continuous stationary variance $\frac{\sigma^2}{2\theta}$:

$$ \frac{\operatorname{Var}_{\mathrm{Euler}}}{\operatorname{Var}_{\mathrm{exact}}} = \frac{2}{2 - \theta\Delta}. $$

When $\theta\Delta > 2$, $|a| > 1$ and the variance grows exponentially by $a^2$ per step [1, 2].

Time evolution of Euler–Maruyama variance at θΔ = 1.9 climbing to an inflated plateau near 0.0132 Time evolution of Euler–Maruyama variance at θΔ = 1.9 climbing to an inflated plateau near 0.0132
Path variance $\operatorname{Var}[x_t]$ at $\theta\Delta = 1.9$ ($\theta = 190, \Delta = 0.01$), just inside the stability boundary: variance jumps within a few steps to $\approx 0.0132$, twenty times the exact stationary value $6.58 \times 10^{-4}$. Open variance plot in sItô ↗
Euler–Maruyama path fan at θΔ = 1.9 spanning an inflated stationary envelope across ±0.19 Euler–Maruyama path fan at θΔ = 1.9 spanning an inflated stationary envelope across ±0.19
Path distribution at $\theta\Delta = 1.9$: contraction $a = -0.9$ keeps the scheme bounded, but each noisy step overshoots across zero and holds the 5%–95% band at $\pm 0.19$. Open path fan in sItô ↗

Run this in sItô

Open sItô with this model pre-loaded to inspect the path distribution, summary statistics, and parameter sensitivities—or change any setting and rerun (with $\sigma = 0.5$, $T = 1$, $100$ steps so $\Delta = 0.01$, and $x_0 = 0$; standard error on the simulated variance is $1.4\%$):

$\theta$$\theta\Delta$Exact varianceTheoretical Euler varianceVariance ratioSimulated variance
100.1$1.25 \times 10^{-2}$$1.32 \times 10^{-2}$1.05$1.31 \times 10^{-2}$
1001.0$1.25 \times 10^{-3}$$2.50 \times 10^{-3}$2$2.50 \times 10^{-3}$
1901.9$6.58 \times 10^{-4}$$1.32 \times 10^{-2}$20$1.32\text{–}1.35 \times 10^{-2}$
2202.2$5.68 \times 10^{-4}$$3.9 \times 10^{13}$$7 \times 10^{16}$$3.9 \times 10^{13}$
3003.0$4.17 \times 10^{-4}$$\approx 10^{57}$—Overflow (no number)

At $\theta\Delta = 3$, states reach order $10^{28}$ and the variance ($\approx 10^{57}$) overflows single-precision floating point, so the simulator returns no value.

Choosing the step size

To keep variance inflation small, keep $\theta\Delta \ll 1$: $\theta\Delta = 0.1$ adds a $5\%$ error, while $\theta\Delta = 0.01$ keeps it to $5 \times 10^{-3}$ ($0.5\%$). For stiff mean reversion this demands a fine grid, whereas an exponential integrator solving the linear drift analytically avoids the instability altogether. The same stability constraint governs any drift with a large negative Jacobian—such as steep double-well walls or fast relaxation. See The Ornstein–Uhlenbeck process, grid and step choices in Using sItô, and Compiling parametric SDEs into fast Monte Carlo simulations.

Related notes: Weak and strong convergence, float32 against float64.