Skip to content
GetProfitable
Search
Dictionary

Rolling window

A fixed-length span of recent data that slides forward one step at a time, used for fitting parameters or computing statistics.

A 60-day rolling standard deviation on day 200 uses days 141 to 200; on day 201 it uses 142 to 201. The window forgets, which is the point: it tracks the current market and discards conditions that no longer apply.

The window length is itself a parameter and often the most important one. Short windows react quickly and are noisy; long windows are stable and late. A 20-day volatility estimate can double in a week, a 250-day estimate barely moves.

Watch the edge effects. The first full estimate only exists after the window fills, so a backtest starting on day one of the data with a 250-day window is silently using look-ahead or nothing at all, depending on the library.

Related: expanding-window, anchored-walk-forward

Educational only, not advice. Spotted an error? Post in Site Feedback.