Introduction
This calculator simulates the Ornstein-Uhlenbeck process, a stochastic differential equation used to analyse mean-reverting behaviour. It is essential for researchers studying variables that fluctuate around a central equilibrium, such as . By adjusting parameters like reversion speed and volatility , one can model complex physical or social systems that exhibit temporal stability despite random perturbations.
What this calculator does
The tool performs multiple Monte Carlo simulations to generate random paths based on the exact transition formula. It requires initial values, long-term mean, reversion speed, volatility, and time parameters. The output provides a comprehensive statistical breakdown, including average final values, median, standard deviation, skewness, excess kurtosis, half-life of mean reversion, and an fit comparing empirical variance to theoretical expectations.
Formula used
The simulation utilises an exact transition density where the state at time depends on the previous state , the mean , and the reversion rate . The stochastic component incorporates a Gaussian random variable. Theoretical variance at time is derived from the volatility and the speed of reversion.
How to use this calculator
1. Enter the initial value and the long-term equilibrium mean .
2. Input the reversion speed and the volatility parameter .
3. Specify the time horizon , the number of steps, and the desired number of simulation runs.
4. Execute the calculation to view path visualisations and summary statistics.
Example calculation
Scenario: An environmental scientist models the temperature fluctuations of a deep-sea vent that tends to revert to a constant thermal equilibrium over a specific observation period.
Inputs: , = , = , = , = , steps = .
Working:
Step 1:
Step 2:
Step 3:
Step 4:
Result: Expected Value
Interpretation: The system has moved from its initial state of 10.0 towards the long-term mean of 5.0.
Summary: The result demonstrates the decay of the initial condition over time.
Understanding the result
The average final value indicates where paths typically terminate relative to the long-term mean . A high persistence value suggests the process stays near its current level longer, while the half-life provides a metric for how quickly the process returns halfway to equilibrium after a disturbance.
Assumptions and limitations
The model assumes that the parameters , , and remain constant throughout the simulation. It also assumes that the underlying noise follows a Gaussian distribution and that the time steps are sufficiently small for accurate path resolution.
Common mistakes to avoid
Typical errors include setting a non-positive volatility or a negative reversion speed , which would prevent mean reversion. Users should also ensure the number of steps is high enough relative to the time horizon to capture the granularity of the stochastic motion.
Sensitivity and robustness
The output is highly sensitive to the reversion speed ; small increases significantly reduce the variance and half-life. Conversely, the final distribution is heavily influenced by volatility , where larger values lead to wider spreads and higher frequencies of mean-crossings during the simulation runs.
Troubleshooting
If the results show an infinite half-life, ensure is greater than zero. If the fit is low, increasing the number of simulation runs will typically improve the alignment between the empirical data and the theoretical variance curve.
Frequently asked questions
What is the stationary variance?
It represents the long-term variance of the process as time approaches infinity, calculated when the reversion speed is positive.
What does the R-squared variance fit measure?
It assesses how closely the variances calculated from the simulated paths match the theoretical variance predicted by the model formula.
Why is the number of steps limited?
Limits on steps and runs ensure the computational resources remain within stable bounds for real-time browser-based processing.
Where this calculation is used
This statistical model is widely used in academic research to describe mean-reverting phenomena. In environmental science, it helps model temperature or pollutant concentrations that return to a baseline level. In social research, it can represent population dynamics or public opinion trends that exhibit a "return to normal" behaviour after external shocks. It is also a fundamental tool in probability theory for teaching students about stochastic differential equations and the properties of Markov processes.
Results are based on standard mathematical and statistical methods and may involve rounding or approximation. If precise accuracy is required, please verify results independently. See full disclaimer.