A price or a rate does not follow a smooth curve, but it is not pure noise either. A stochastic differential equation says both things at once: a trend, and a random kick on top. Every model in Level 5 is written this way.
Take the mean-reverting equation of M-B06: Differential equations, pulled from 2% towards 4%. Now give it a random kick at every instant, from the same Brownian path, at three sizes.
Blue: σ = 0, the ODE. Purple: σ = 0.5 and σ = 1.5 points a year, driven by the same Brownian draws.
With no noise the path is the smooth ODE solution. With noise it wanders, but the pull towards 4% is still there, and the bigger σ, the wider it wanders. That is a stochastic differential equationStochastic differential equation (SDE): dX = μ(X, t) dt + σ(X, t) dW, a rule for how X changes that includes a Brownian kick.: a driftDrift μ: the deterministic part of the change, per unit of time. that says where X tends to go, and a diffusionDiffusion σ: the size of the random kick, multiplying the Brownian increment dW. that says how hard it is shaken.
The rules
What an SDE says. Drift, diffusion, and the Itô integralItô integral: the limit of sums Σ σ(t_k)(W(t_{k+1}) − W(t_k)), with the integrand taken at the start of each step. behind the notation.
Three processes.ArithmeticArithmetic Brownian motion: dX = μ dt + σ dW with constants μ and σ; X(t) is normal with mean X₀ + μt and variance σ²t. and geometric Brownian motionGeometric Brownian motion: dS = μS dt + σS dW; S(t) = S₀ exp((μ − ½σ²)t + σW(t)) is lognormal and always positive., and the Ornstein–Uhlenbeck processOrnstein–Uhlenbeck process: dX = a(b − X) dt + σ dW, mean reversion with constant noise. X(t) is normal and its variance levels off at σ²/(2a)..
Simulation. When there is no formula, step forward with Euler–MaruyamaEuler–Maruyama: simulate an SDE with X_{k+1} = X_k + μΔt + σ√Δt Z_k, with Z_k independent standard normal draws..
W is a standard Brownian motion; μ and σ are the drift and diffusion (constants for ABM and GBM); a > 0 is the speed and b the level of the OU process; Δt = T/n and tk = kΔt. The integrals with dW are Itô integrals. Sources: Øksendal (2003), chapter 5; Shreve (2004), volume II, section 6.2; Kloeden and Platen (1992) for Euler–Maruyama.
Try it
Switch between the three processes, change the drift and the noise, and vary the number of Euler–Maruyama steps. Check that the simulated mean and spread at T match the exact ones, and watch which processes cross zero.
Try itSimulate a stochastic differential equation
Process
dS = μS dt + σS dW, S(0) = 100, T = 1 year
Euler–Maruyama steps
20 simulated paths exact mean exact 95% band (dashed)
Mean at T, 2,000 paths104.71
Mean at T, exact105.13
Standard deviation at T, 2,000 paths21.5
Standard deviation at T, exact21.24
Share of paths below zero at T0%
Euler–Maruyama against the exact lognormal solution on the same draws: the average gap at T is 0.3003. Quadruple the steps and it roughly halves. GBM never goes below zero.
Worked examples
1. One Euler–Maruyama step for GBM
Step 1 of 4
1
The set-up
S₀ = 100, μ = 5%, σ = 20% a year, one monthly step Δt = 1/12, and a standard normal draw Z = 0.8.