ADF and KPSS Stationarity Tests

Before you fit an OU model, run a Z-score strategy, or build a pairs trade, you need to know whether the underlying series is actually stationary. ADF and KPSS are the two standard hypothesis tests for stationarity, and they ask the question from opposite directions. Using them together is the right discipline.

What "Stationary" Means

A stationary series has constant mean, constant variance, and an autocorrelation that depends only on lag (not on calendar time). Stock prices are not stationary — they drift, their variance changes, and any correlation structure shifts. Stock returns are closer to stationary, but only approximately.

Mean-reverting strategies require stationarity in the thing being traded — typically a spread, a Z-score, or a residual from a regression. Without stationarity, the "mean" you're reverting to is itself moving, and the strategy is structurally broken.

Augmented Dickey-Fuller (ADF) Test

ADF tests the null hypothesis that the series has a unit root (i.e., is non-stationary). The test fits the regression:

ΔX(t) = α + γ × X(t−1) + Σ δ_i × ΔX(t−i) + ε(t)

and tests whether γ = 0 (unit root) vs γ < 0 (mean reversion). The test statistic compared against critical values gives a p-value.

  • p-value < 0.05: reject unit root. The series is statistically distinguishable from non-stationary — i.e., evidence of stationarity.
  • p-value > 0.05: cannot reject unit root. The series may or may not be stationary; ADF didn't resolve it.

ADF's weakness: low power. It often fails to reject the null even for genuinely stationary series, especially with small samples or weak mean reversion. ADF saying "non-stationary" is weak evidence; ADF saying "stationary" (rejecting null) is much stronger.

KPSS Test

KPSS flips the null hypothesis: it tests the null that the series is stationary (around a constant or deterministic trend). KPSS tests whether the partial sum of residuals has bounded variance.

  • p-value > 0.05: cannot reject stationarity. Compatible with the series being stationary.
  • p-value < 0.05: reject stationarity. Strong evidence the series has a unit root or shifting mean.

KPSS has different statistical properties from ADF — different blind spots, different sensitivities. The two tests are designed to complement each other.

The Joint Verdict

Run both. The series is confidently stationary only if ADF rejects unit root AND KPSS does not reject stationarity. If they disagree, the series is borderline and should be treated with caution. If both fail, the series is non-stationary — don't apply OU or mean-reversion to it.

Practical Rules

Stationarity Verdict Matrix
  • ADF rejects + KPSS does not reject: stationary. Trade with confidence.
  • ADF does not reject + KPSS rejects: non-stationary. Do not apply mean-reversion strategies.
  • Both reject: contradictory. Series likely has a structural break or trend; difficult to model.
  • Both fail to reject: ambiguous. Either short sample or weak signal. Try a longer history before concluding.

What These Tests Don't Tell You

  • Speed of mean reversion. Stationarity is necessary for mean reversion; the half-life tells you whether it's tradable.
  • Whether the relationship is stable. A series can be stationary in-sample and break out of stationarity going forward (regime change). Walk-forward is the only protection.
  • Trade quality. Stationary doesn't mean profitable. Trading costs, drawdowns, and capacity all matter independently.

How QuanterLab Uses These Tests

  • The MR Scanner filters candidates by Hurst Exponent first (regime detection), then ADF (test on the candidate spread), then KPSS as a secondary check.
  • The Pairs Scanner runs Engle-Granger cointegration, which uses ADF on residuals.
  • Many builder modules expose ADF p-value as a filter so you can require statistical evidence of stationarity before trading.

The Bottom Line

ADF and KPSS are quick, free, and decisive when used together. Always run both before applying mean-reversion logic. Disagreement between them is information — treat ambiguous results with the caution they deserve, and don't fit OU to non-stationary data just because the math will produce a number.

Further Reading

Foundational papers

  • Dickey, D. A. & Fuller, W. A. (1979). Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association, 74(366), 427–431.
  • Kwiatkowski, D., Phillips, P. C. B., Schmidt, P. & Shin, Y. (1992). Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root. Journal of Econometrics, 54(1–3), 159–178.
  • Engle, R. F. & Granger, C. W. J. (1987). Co-integration and Error Correction: Representation, Estimation, and Testing. Econometrica, 55(2), 251–276.

Textbook references

  • Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press.
  • Tsay, R. S. (2010). Analysis of Financial Time Series (3rd ed.). Wiley.

Related QuanterLab articles

Try it in QuanterLab

In SC001STCB's MR Scanner, observe how Hurst, ADF, and KPSS combine. Names that pass all three filters are the strongest mean-reversion candidates; names that pass only one of three are borderline.

Back to QuanterLab
Report
Loading report...
Article
Loading article...