The Ornstein-Uhlenbeck process is a stochastic process described though the stochastic differential equation (1): dxt=−θ(xt−μ)+σ⋅dWt
Stochasticity comes from the second term σ⋅dWt where Wt represents a Weiner process. If we have the second term alone dxt=σ⋅dWt, then the process is pure diffusion; its standard deviation grows as square root of time, meaning that x fluctuates without bounds: σxt=σ(t)(1).
The first term is deterministic; it represents a restoring force that brings x back to its mean value μ. Without the second term, dxt=−θ(xt−μ), x would revert back to μ from any starting position exponentially in time with the relaxation rate set by θ(1).
With both terms, we get the Ornstein-Uhlenbeck process: the second term drives the process by generating fluctuations, while the first term tries to suppress the fluctuations (1). The process is called mean-reverting because, over time, it tends to drift towards its mean value (2).
The further x deviates from the mean, the larger the restoring effect becomes. In other words, the restoring term dominates near μ, while the stochastic term dominates away from μ(1).
The Ornstein-Uhlenbeck is a stationary Gauss-Markov process, which means it is a Gaussian process, a Markov process, and is temporarily homogeneous (2).
From the exponentials in the mean and variance equations, we can notice that the variance converges to its steady-state value twice as fast as the mean.
We can simulate the Ornstein-Uhlenbeck process using an alternative numerical integration method called Euler-Maruyama method. It is an approximate procedure to numercally solve stochastic differential equations (3).