Concept

Stationarity & Efficiency Tests

Stationarity & Efficiency Tests, also known as ADF/KPSS, variance-ratio, random-walk benchmark, are Statistics concepts. A reference entry: the Library explains it rather than implements it.

What are Stationarity & Efficiency Tests?

Stationarity and efficiency tests ask two related questions of a series: do its statistical properties (mean, variance) stay stable through time, and does the series follow a random walk, with returns that carry no usable memory? Unit-root tests answer the first. The augmented Dickey-Fuller (ADF) test takes non-stationarity (a unit root) as its null hypothesis, so rejection is evidence of stationarity, mean-reverting behavior in trading terms; the KPSS test flips the logic and takes stationarity as its null. Efficiency tests answer the second: the variance-ratio test compares the variance of k-period returns to k times the one-period variance, which are equal under a random walk. Ratios persistently below one point toward mean reversion, above one toward trending behavior.

The machinery comes from econometrics: Dickey and Fuller published the unit-root test in 1979 (the augmented version handles serial correlation), Kwiatkowski, Phillips, Schmidt, and Shin proposed the KPSS test in 1992 as the complementary null, and Lo and MacKinlay's 1988 variance-ratio study formalized the random-walk benchmark, finding that weekly US stock returns of that era did not follow one. Trading platforms later compressed these procedures into rolling indicator-pane studies.

Traders use these tests as regime instruments. Mean-reversion logic (fading a z-score, trading a pairs spread) presumes the traded series is roughly stationary, which raw price levels usually are not; spreads built through cointegration are candidates precisely because a stationary combination is the goal. Rolling versions of ADF, KPSS, or variance ratios are plotted as trend-versus-reversion gauges alongside measures such as the Hurst exponent, fractal dimension, and autocorrelation.

The caveats are substantial: the tests have limited power in short windows, verdicts flip with lag and window choices, structural breaks masquerade as unit roots, and repeated rolling inference invites false positives. Above all, stationarity measured in the past is a description, not a contract; regimes end, and a test confirms the change only after enough post-change data accumulates. Treated as a probabilistic tilt rather than a switch, though, the tests give quantitative structure to a question every strategy silently answers: is this market trending, reverting, or indistinguishable from noise?

How to read a rolling stationarity test on a chart

Platform implementations plot a windowed statistic below price; reading one takes a few checks.

  1. 1Confirm what is being tested: raw prices are almost never stationary, so useful inputs are spreads, residuals after detrending, oscillator values, or returns.
  2. 2Locate the statistic against its critical values: a rolling ADF statistic more negative than its critical line argues for stationarity in that window, while a rolling KPSS statistic above its critical line argues against it.
  3. 3Check persistence: a verdict that holds across consecutive windows and survives a modest lookback change deserves weight; a one-bar excursion across a critical line does not.
  4. 4Cross-check with an independent measure, such as a variance ratio or an entropy measure, before switching playbooks on the strength of a single test.

How it's calculated

Statistical checks of whether a price series is stationary or carries a unit root, and whether its returns deviate from a random walk.

ADF regression: ytyt1=α+γ×yt1+i=1pci×(ytiyti1)+et\text{ADF regression: } y_t - y_{t-1} = \alpha + \gamma \times y_{t-1} + \sum_{i=1}^{p} c_i \times (y_{t-i} - y_{t-i-1}) + e_t
ADF statistic=t-ratio of the estimated γ; the unit-root null γ=0 is rejected when the statistic is more negative than the critical value\text{ADF statistic} = t\text{-ratio of the estimated } \gamma \text{; the unit-root null } \gamma = 0 \text{ is rejected when the statistic is more negative than the critical value}
KPSS statistic=t=1TSt2T2×lrv\text{KPSS statistic} = \frac{\sum_{t=1}^{T} S_t^2}{T^2 \times \mathrm{lrv}}
VR(q)=Var(ytytq)q×Var(ytyt1)\operatorname{VR}(q) = \frac{\operatorname{Var}(y_t - y_{t-q})}{q \times \operatorname{Var}(y_t - y_{t-1})}
Random-walk benchmark: VR(q)=1VR(q)<1 leans mean reversion, VR(q)>1 leans trend persistence\text{Random-walk benchmark: } \operatorname{VR}(q) = 1 \text{; } \operatorname{VR}(q) < 1 \text{ leans mean reversion, } \operatorname{VR}(q) > 1 \text{ leans trend persistence}
y_t: log price at bar t (y_(t-1), y_(t-i), y_(t-i-1), y_(t-q) are earlier values)
alpha: intercept of the ADF regression
gamma: coefficient on the lagged level; gamma = 0 means a unit root (nonstationary)
c_i: coefficient on the i-th lagged difference
p: number of augmenting lags (commonly chosen by AIC or BIC)
e_t: ADF regression error at bar t
S_t: partial sum through bar t of the residuals from regressing y on an intercept (include a trend to test trend stationarity)
T: number of observations
lrv: long-run variance of the level-regression residuals (Newey-West estimate)
VR(q): variance ratio at return horizon q
q: return horizon in bars (commonly 2 to 16)
Var(): sample variance
t: bar index
i: lag or summation index

ADF and KPSS have opposite nulls, so they are read together: ADF rejecting while KPSS does not is the cleanest stationarity verdict.

Both tests use nonstandard critical values (Dickey-Fuller and KPSS tables), and the values change when a trend term is included.

The variance ratio follows Lo and MacKinlay, usually estimated on overlapping log returns with heteroskedasticity-robust z-statistics.

How traders use it

  • Gating mean reversion: run a rolling ADF (or KPSS) on a spread or detrended series and allow reversion entries only while the test favors stationarity, standing aside when the spread starts behaving like a random walk.
  • Regime classification: a rolling variance ratio above one supports momentum tactics, below one supports fading extremes; many workflows require agreement with an independent regime measure before switching playbooks.
  • Input validation: checking that series fed to statistical or machine-learning models (returns, spreads, oscillator inputs) are approximately stationary, since many estimators, from linear regression forecasts to exponential smoothing, quietly assume it.
  • Benchmarking against randomness: variance ratios locate a market relative to the random-walk baseline that Monte Carlo price paths and probability cones simulate forward; a market that tests as efficient argues against pattern edges.
  • Pair selection: screening candidates by running ADF on the fitted spread, keeping combinations that stay stationary out of the formation window, and re-testing periodically since relationships decay.

Stationarity & efficiency tests vs. related measures

Autocorrelation: Autocorrelation measures memory at specific lags; unit-root and variance-ratio tests aggregate that memory into a single verdict about the series' overall character. The tests are the hypothesis-testing layer on top of what the correlogram shows.

Fractal Dimension: Fractal dimension (and the related Hurst exponent) grades trendiness on a continuous scale without a significance framework; ADF and KPSS give verdicts against critical values. Regime dashboards often plot one of each.

Entropy Measures: Entropy asks how unpredictable the sequence of moves is without assuming a linear model; variance-ratio and unit-root tests are linear-model statistics. A series can look linearly efficient yet carry low-entropy structure, so disagreements between the two are informative.

Concept family

Statistics

46 concepts mapped · 46 in the Library

Stationarity & Efficiency Tests FAQ

Turn Stationarity & Efficiency Tests into a trading strategy.

Describe your Stationarity & Efficiency Tests idea to Quant. It builds the strategy with you and backtests it on real data.