Read the equation
The implementation multiplies s by 1+μdt+σdW. This approximates the proportional drift-diffusion equation for a small step, but the multiplier can be negative. The exact geometric Brownian transition uses an exponential and preserves a positive starting value, so these two updates should not be conflated.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| s | Current value |
| mu | Relative drift |
| sigma | Relative diffusion scale |
| dW | Wiener increment |
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
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)
}
// FokkerPlanck computes probability density evolution
// ∂p/∂t = -∂(μp)/∂x + (1/2)∂²(σ²p)/∂x²
func FokkerPlanck(p []float64, mu, sigma, dt, dx float64) []float64 {
n := len(p)
if n < 3 {
return pExact original notation
dS = μS·dt + σS·dW