Skip to main content
A random walk is the canonical non-stationary series: each value is the previous one plus a random step, optionally nudged by a constant drift. It is the process behind the naive forecast (tomorrow ā‰ˆ today), a first model of efficient-market prices, and a useful stress test for whether a pipeline handles trends and growing variance rather than assuming a stable mean.
The model yt=ytāˆ’1+μ+Ļƒā€‰Īµt,εt∼N(0,1)y_t = y_{t-1} + \mu + \sigma\,\varepsilon_t, \qquad \varepsilon_t \sim \mathcal{N}(0, 1)
  • drift (μ\mu) — the constant step added each period; a deterministic trend.
  • volatility (σ\sigma) — the standard deviation of the random step.
  • start_value (y0y_0) — where every series begins.
Because steps accumulate, the variance grows with time — the series has no fixed mean to revert to.

Generate

Instantiate the generator and draw a few series. All outputs are long-format (unique_id, ds, y).
The three series share the same process but a different noise draw. They all start at 100 and trend gently upward — that shared pull is the drift — while wandering by an amount set by the volatility. Notice how they fan out over time: that spreading is the growing variance a random walk always produces.

Control the process

drift sets the trend and volatility sets the noise. Holding volatility fixed, larger drift turns a flat wander into a clear trend.
Sharing the seed isolates the effect: the wiggles are identical, but a larger drift lifts the whole path. Raise volatility instead and the paths would keep this trend while wandering further from it.

Statistics by series

Summary statistics vary widely between series even from one generator — a direct consequence of the accumulating, unbounded variance.
Related generators
  • Geometric Brownian motion — a multiplicative random walk for strictly positive series like prices.
  • SARIMA with d=1 — a random walk with added autoregressive/moving-average structure.
  • Add trend breaks or outliers with the changepoints and anomalies options.
Every parameter is documented in the generator reference.