Read the equation
The deterministic term moves x toward μ at rate θ, and σdW adds noise. The code returns a forward Euler–Maruyama step rather than the exact finite-time Ornstein–Uhlenbeck transition. With positive θ, an excessively large dt can make the discretized deterministic part unstable even though the continuous drift is mean reverting.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| theta | Mean-reversion rate |
| mu | Long-run target |
| sigma | Noise scale |
| dt | Step interval |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
// ItoProcess computes dX = μ·dt + σ·dW (Ito SDE step)
func ItoProcess(x, mu, sigma, dt, dw float64) float64 {
return x + mu*dt + sigma*dw
}
// OrnsteinUhlenbeck computes mean-reverting process
// dX = θ(μ - X)dt + σdW
func OrnsteinUhlenbeck(x, theta, mu, sigma, dt, dw float64) float64 {
drift := theta * (mu - x) * dt
diffusion := sigma * dw
return x + drift + diffusion
}
// GeometricBrownian computes GBM step
// dS = μS·dt + σS·dW
func GeometricBrownian(s, mu, sigma, dt, dw float64) float64 {
return s * (1.0 + mu*dt + sigma*dw)Exact original notation
dX = θ(μ - X)dt + σdW