Direct Answer
Rolling variance is the sample variance of the latest N observations, recomputed each bar. It is the average squared deviation from the window mean, using N-1 in the denominator for the unbiased sample estimate. Larger values mean wider dispersion.
Rolling Variance: Formula, Meaning, Signals, Examples and How to Use It
How Is Rolling Variance Calculated?
Rolling variance is the sample variance of the latest N observations, recomputed each bar. It is the average squared deviation from the window mean, using N-1 in the denominator for the unbiased sample estimate.
Formula: s^2 = sum of (x_i - mean)^2 / (N - 1) over the latest N values
Inputs:
- Series values, often returns
- Window length N
Worked example. For the five values 4, 8, 6, 5 and 7 the sample variance is 2.50. The inputs are illustrative numbers, not market data.
Reading it. Larger values mean wider dispersion. Variance is in squared units, so it is less intuitive than standard deviation, but it is the quantity that adds across independent sources of risk.
Limits. Squaring makes it dominated by outliers, and window length trades responsiveness against noise. It assumes observations in the window are comparable, which breaks around regime shifts.
What is Rolling Variance?
Rolling variance is the sample variance of the latest N observations, recomputed each bar. It is the average squared deviation from the window mean, using N-1 in the denominator for the unbiased sample estimate.
How to use Rolling Variance
Larger values mean wider dispersion. Variance is in squared units, so it is less intuitive than standard deviation, but it is the quantity that adds across independent sources of risk. A reading alone is never a buy or sell signal; it needs context from price structure, volume, volatility and the broader market regime.
Strengths
- Using N minus 1 in the denominator gives an unbiased estimate of the population variance from the window sample.
- Variance is additive for independent components, so portfolio and factor decompositions are built directly on it.
- Reproducible when the formula and data convention are fixed.
Weaknesses and limitations
- Units are squared (percent squared for returns), so the figure has no direct reading in price or return terms without a square root.
- It is computed around the window's own mean, so a trending window with large level shifts reports dispersion from the trend as well as the noise.
- Correlated indicators can create false confidence by repeating the same underlying information.
Editorial and risk note
This page is educational content, not individualized investment advice. It should not imply guaranteed prediction, accuracy or outperformance.
Frequently Asked Questions
Is Rolling Variance a buy or sell signal?
No. Larger values mean wider dispersion. Squaring makes it dominated by outliers, and window length trades responsiveness against noise. A trade built on it still needs a trigger, an invalidation rule, a position size and realistic execution assumptions.
What is the best setting for Rolling Variance?
Rolling Variance takes these inputs: series values, often returns; window length N. There is no universal best setting for the tunable ones, so test them across instruments, regimes and out-of-sample periods and favor stable parameter regions over one historical winner.
Can Rolling Variance be used by itself?
Squaring makes it dominated by outliers, and window length trades responsiveness against noise. It assumes observations in the window are comparable, which breaks around regime shifts. For that reason it is read next to measures of direction, participation, valuation, liquidity and risk, not alone.
Does Rolling Variance work on every timeframe?
The calculation (s^2 = sum of (x_i - mean)^2 / (N - 1) over the latest N values) can be run on any bar size, but behavior is not portable: a reading on a five-minute chart describes a very different market window from the same reading on a daily chart. Validate the exact timeframe before relying on it.
Why does Rolling Variance give false signals?
Units are squared (percent squared for returns), so the figure has no direct reading in price or return terms without a square root. It is computed around the window's own mean, so a trending window with large level shifts reports dispersion from the trend as well as the noise. Lag, noise and regime changes add to this, because market participants react to new information after the reading is calculated.
How should Rolling Variance be backtested?
Rebuild Rolling Variance from series values, often returns using point-in-time data, write the rules before testing, include delisted securities where relevant, model realistic fills and costs, reserve a validation sample and compare with a simpler baseline.