HomeProbability & StatisticsWiener Process Dynamics & Stochastic Drift

📈 Wiener Process Dynamics & Stochastic Drift

Simulate Brownian motion, Ornstein-Uhlenbeck, and Geometric Brownian Motion — the mathematical foundation of financial modelling.

Probability & Statistics3DEasy60 FPS
wiener-process ↗ Open standalone

About this simulation

This simulator plots sample paths of a Wiener process, W(t), the continuous-time random walk whose increments are independent and normally distributed with variance equal to the elapsed time. It also lets you switch to two derived models: the mean-reverting Ornstein-Uhlenbeck process and Geometric Brownian Motion, the stochastic differential equation behind the Black-Scholes option-pricing formula. Paths are generated numerically with the Euler-Maruyama scheme, the standard way to integrate a stochastic differential equation on a computer.

🔬 What it shows

Up to 30 independent random paths drawn simultaneously, with their running mean overlaid in white so you can see how individual jagged trajectories average out into a smoother trend. Each process type reveals a different behaviour: BM wanders without bound, OU keeps returning to its long-run mean, and GBM stays strictly positive and grows exponentially on average, like a stock price.

🎮 How to use

Pick BM, OU or GBM from the Process Type buttons. For BM, adjust diffusion σ and drift μ; for OU, set mean-reversion speed θ, long-run mean μ and volatility σ; for GBM, tune annual drift μ and volatility σ (%/yr) and the starting price S₀. Each slider redraws the batch of paths instantly so you can see how the parameter reshapes the spread.

💡 Did you know?

Wiener process paths are continuous everywhere but differentiable nowhere — a mathematical curiosity first proven rigorously by Norbert Wiener in the 1920s, decades after Robert Brown observed the same jittery motion in pollen grains under a microscope in 1827.

Frequently asked questions

What exactly is a Wiener process?

It is a continuous-time stochastic process W(t) that starts at zero and has independent, normally distributed increments: W(t) − W(s) follows a normal distribution with mean 0 and variance t − s. It is the rigorous mathematical model behind Brownian motion, the random jiggling of particles suspended in a fluid.

What is the difference between BM, OU and GBM in this simulator?

BM (Brownian motion) is the pure random walk with no restoring force, so its spread grows without limit. OU (Ornstein-Uhlenbeck) adds a mean-reversion term that pulls the path back toward a target value, making it useful for interest rates or temperatures. GBM (Geometric Brownian Motion) multiplies the randomness by the current value itself, so the path always stays positive, which is why it models stock prices.

How does the simulator generate the paths?

It uses the Euler-Maruyama method, the stochastic equivalent of Euler's method for ordinary differential equations. At each small time step it adds a deterministic drift term plus a random shock drawn from a normal distribution and scaled by the square root of the time step, which is the correct way to discretise a stochastic differential equation.

Why do the individual paths look so jagged while the white mean line is smooth?

Each path is nowhere differentiable, so it zig-zags at every scale and never settles into a smooth curve. Averaging many independent paths cancels out most of the random fluctuation while the underlying drift survives, which is exactly why the white mean path looks far smoother than any single trajectory.

Why is Geometric Brownian Motion used for stock prices instead of plain Brownian motion?

Plain Brownian motion can go negative, which makes no sense for an asset price. GBM instead models the logarithm of the price as a Brownian motion with drift, so the price itself is always positive and log-normally distributed. This is precisely the assumption underlying the Black-Scholes option-pricing model.

Frequently Asked Questions

  • What is a Wiener process?
    A Wiener process (also called standard Brownian motion) is a continuous-time stochastic process W(t) with independent, normally distributed increments: W(t)−W(s) ~ N(0, t−s). It is the mathematical formalisation of the random jiggling observed by botanist Robert Brown in 1827 and later given rigorous form by Norbert Wiener in the 1920s.
  • What is the Euler-Maruyama method?
    The Euler-Maruyama method is the stochastic analogue of Euler's method for ODEs. For an SDE dX = f(X,t)dt + g(X,t)dW, it approximates X(t+dt) ≈ X(t) + f(X,t)⋅dt + g(X,t)⋅√dt⋅N(0,1). The simulator uses this discretisation with a small time step dt to generate realistic sample paths.
  • How does Geometric Brownian Motion relate to the Black-Scholes model?
    GBM is the stochastic differential equation dS = μS⋅dt + σS⋅dW, where μ is the drift (expected return) and σ is the volatility. The Black-Scholes option-pricing formula assumes that the underlying asset price follows GBM. Because GBM always stays positive and produces log-normally distributed prices, it is the canonical model for equity prices.
  • What makes the Ornstein-Uhlenbeck process different from standard Brownian motion?
    The OU process adds a mean-reversion term: dX = θ(μ−X)dt + σdW. The parameter θ > 0 pulls the process back toward the long-run mean μ. Unlike pure Brownian motion, the OU process is stationary and its variance does not grow without bound. It is used to model interest rates (Vasicek model), commodity prices, and neuronal membrane potentials.
  • What is the quadratic variation of a Wiener process?
    The quadratic variation of W over [0,T] equals T almost surely. This non-zero quadratic variation is what distinguishes stochastic calculus from ordinary calculus and necessitates Itô's lemma, which adds a correction term (½σ²f''dt) absent from the classical chain rule.
  • Why do paths of the Wiener process look jagged?
    Wiener process paths are almost surely nowhere differentiable. At every point the function changes direction infinitely often — the local variation is infinite. This mathematical roughness, visible as the jagged zig-zag in the simulator, is captured quantitatively by the non-zero quadratic variation.
  • What is the Itô integral and why does it differ from Riemann integration?
    The Itô integral ∫₀ᵀf(t)dW(t) is defined as a limit of sums that always use the left endpoint of each interval (non-anticipating). Because dW has finite quadratic variation, the ordinary Riemann-Stieltjes integral is not well-defined, and the Itô correction term ½σ²f'' appears when applying the chain rule (Itô's lemma).
  • How many paths should I simulate to get reliable statistics?
    For rough statistics (mean path, approximate variance band) 20–50 paths are usually sufficient. For precise tail probabilities or option price estimates, Monte Carlo convergence scales as 1/√N, so 1 000–10 000 paths are typical in practice. The simulator draws up to 30 independent paths simultaneously so you can see the spread visually.
  • What is the mean squared displacement of Brownian motion?
    For a standard Wiener process, E[W(t)²] = t. More generally, for d-dimensional Brownian motion with diffusion coefficient D, the mean squared displacement E[|r(t)|²] = 2dDt grows linearly with time — a key signature that distinguishes normal diffusion from anomalous (sub- or super-) diffusion.
  • Can I export the simulated paths?
    The simulator runs entirely in the browser and does not send data to a server. You can take a screenshot of the canvas. For large-scale Monte Carlo work, running the Euler-Maruyama algorithm in Python with NumPy or in Julia with DifferentialEquations.jl is recommended.
⚙ Under the hood

Explore the behavior of a Wiener process, observing how drift, volatility, and mean reversion influence its trajectory over time. Users can adjust parameters to see the impact on the simulated stochastic path.

Wiener processBrownian motiongeometric Brownian motionOrnstein-Uhlenbeckstochastic processGBMSDE

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)