ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Euler step for mean reversion with noise

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…

Implementation mathematicsSource recovered; runtime not executed
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
gh-eq-5574995d21690594source-comment-equation
dX=θ(μ−X)dt+σdWdX = θ(μ - X)dt + σdW

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

TermMeaning 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

Related builds

Sources & provenance

01
Go mathematical helpers
Lines 143–143 · 33aa84f2aa61
02
Go mathematical helpers
Lines 143–143 · 33aa84f2aa61

Search equations, builds, manuscript text, and recovered sources.