Skip to content

Unit Root Tests: ADF, Phillips-Perron, KPSS

ADF, Phillips-Perron, and KPSS use different null hypotheses, so 'non-stationary' can mean different things. How the three tests are built, where the Dickey-Fuller distribution comes from, and why unit root tests are notoriously underpowered.

11 of 12 ~14 min

When someone says “the series is non-stationary,” ask back: according to which test, with which null, against which alternative? Different answers give opposite conclusions. The three common tests — ADF (Said & Dickey, 1984), Phillips-Perron (1988), and KPSS (Kwiatkowski, Phillips, Schmidt & Shin, 1992) — do not share a null hypothesis: the first two put the unit root under the null, KPSS puts stationarity there. Read them interchangeably and you will produce nonsense. And that is only the first layer of trouble. The second is more fundamental: however you arrange the null, a unit root and a highly persistent stationary process simply look alike in finite samples, so the tests are underpowered by nature. Both layers of trouble run through this article.

Before the derivations, the references: Hamilton (1994, Ch. 17-18) and Tsay (2010, Ch. 2).

The Question Itself

Given a series yty_t, is it stationary? Model it as an AR(1):

yt=μ+ϕyt−1+εty_t = \mu + \phi y_{t-1} + \varepsilon_t

The three ranges of ϕ\phi correspond to three worlds. ∣ϕ∣<1|\phi| < 1: stationary — shocks have transient effects and the ACF decays geometrically. ϕ=1\phi = 1: a unit root — yt=μ+yt−1+εty_t = \mu + y_{t-1} + \varepsilon_t, shocks stay in the level permanently, and the sample ACF decays extremely slowly. ∣ϕ∣>1|\phi| > 1: explosive — not a long-run equilibrium, the object of the bubbles literature.

The unit root test is the hypothesis test H0:ϕ=1H_0: \phi = 1 against H1:ϕ<1H_1: \phi < 1. It sounds like a routine tt-test job. The complication: under H0H_0, the tt-statistic for ϕ^\hat{\phi} does not follow a tt-distribution — and not in a way a small-sample correction can fix; the asymptotics themselves are different. Where that comes from is next.

The Dickey-Fuller Test, and That Non-Standard Distribution

The basic Dickey-Fuller regression rewrites the model in differences:

Δyt=(ϕ−1)yt−1+εt=ρ yt−1+εt\Delta y_t = (\phi - 1) y_{t-1} + \varepsilon_t = \rho \, y_{t-1} + \varepsilon_t

with ρ=ϕ−1\rho = \phi - 1, so H0:ρ=0H_0: \rho = 0 (unit root) against H1:ρ<0H_1: \rho < 0 (stationary). The test statistic is the ordinary

tρ=ρ^SE(ρ^)t_{\rho} = \frac{\hat{\rho}}{\text{SE}(\hat{\rho})}

Ordinary in form only. Under H0H_0 the regressor yt−1y_{t-1} is itself a random walk — it diverges — so the OLS estimator ρ^\hat{\rho} converges at rate TT rather than T\sqrt{T}, and its limit is not normal. Dickey & Fuller (1979) derived the limiting distribution:

tρ=ρ^SE(ρ^)→d∫01W(r)dW(r)(∫01W(r)2dr)1/2t_{\rho} = \frac{\hat{\rho}}{\text{SE}(\hat{\rho})} \xrightarrow{d} \frac{\int_0^1 W(r) dW(r)}{\left( \int_0^1 W(r)^2 dr \right)^{1/2}}

where W(r)W(r) is standard Brownian motion — the numerator is the integral of WW against its own increments, the denominator is the L2L^2 norm of WW, the two are correlated with non-degenerate limits, and the ratio is the Dickey-Fuller distribution. Critical values come from simulating Brownian paths, and they sit far to the left of the tt-distribution’s: in the constant-only case the 1%, 5%, 10% values are roughly −3.43-3.43, −2.86-2.86, −2.57-2.57, against −2.58-2.58, −1.96-1.96, −1.64-1.64 for the tt. Judging an ADF statistic against −1.96-1.96 is among the most common mistakes in the trade, and its direction is exactly wrong: it declares non-stationary series stationary.

The critical values also depend on which deterministic terms the regression carries. Three versions: no constant, no trend (Δyt=ρyt−1+εt\Delta y_t = \rho y_{t-1} + \varepsilon_t, for zero-mean series); constant only (non-zero mean, no trend); constant and trend (Δyt=c+βt+ρyt−1+εt\Delta y_t = c + \beta t + \rho y_{t-1} + \varepsilon_t, for series with a linear trend), whose critical values are more negative still — roughly −3.96-3.96, −3.41-3.41, −3.13-3.13 at 1%, 5%, 10%. Choosing wrong costs you either way: adding a trend where none exists loses power; omitting one that exists mis-sizes the test. The standard advice is almost embarrassingly simple: plot the series first.

ADF: The First Route Around Serial Correlation

The basic DF test assumes εt\varepsilon_t is white noise; any serial correlation in the differenced series and the test is misspecified. Said & Dickey (1984) fix it by adding lagged differences to the regression:

Δyt=c+ρ yt−1+∑j=1kγjΔyt−j+εt\Delta y_t = c + \rho \, y_{t-1} + \sum_{j=1}^k \gamma_j \Delta y_{t-j} + \varepsilon_t

Still testing H0:ρ=0H_0: \rho = 0, one-sided, rejecting for large negative tρt_{\rho}. The extra lags do not change the asymptotic distribution under H0H_0, so the DF critical values carry over. The lag count kk must whiten the residuals — usually chosen by AIC or BIC, in practice starting from Schwert’s (1989) rule k=⌊(T−1)1/3⌋k = \lfloor (T-1)^{1/3} \rfloor and refining general-to-specific. The choice has ditches on both sides: too few lags leaves autocorrelated residuals and an oversized test that rejects too often; too many lags burns degrees of freedom and drains power. There is a nastier failure mode to note for later — ADF assumes constant parameters, and a single structural break in trend or level can make a stationary series look like a unit root. That trap is large enough to get its own section below.

Phillips-Perron: The Second Route

Phillips & Perron (1988) attack the same serial-correlation problem by fixing the standard error rather than augmenting the regression: a non-parametric correction to the basic DF statistic using a Newey-West style heteroskedasticity-and-autocorrelation-consistent (HAC) long-run variance estimate:

tρPP=ρ^OLSσ^ρ,HACt_{\rho}^{PP} = \frac{\hat{\rho}_{OLS}}{\hat{\sigma}_{\rho, HAC}}

The corrected statistic shares the Dickey-Fuller asymptotic distribution with ADF. The gain: no lag order to choose. The cost: finite-sample power generally below ADF, most visibly at moderate persistence. On well-behaved series the two should agree; on series with strong serial correlation or volatility clustering they can quarrel — and the quarrel is itself information, telling you the conclusion is sensitive to how the nuisance parameters are handled.

KPSS: Flip the Null

ADF and PP both seat the unit root in the null, which means “failure to reject” defaults to a unit root verdict. KPSS (Kwiatkowski et al., 1992) turns it around:

H0:yt is stationaryH_0: y_t \text{ is stationary} H1:yt has a unit rootH_1: y_t \text{ has a unit root}

The statistic builds on the cumulative sum of residuals from regressing yty_t on a constant (optionally a trend):

u^t=yt−yˉ,St=∑i=1tu^i\hat{u}_t = y_t - \bar{y}, \quad S_t = \sum_{i=1}^t \hat{u}_i KPSS=∑t=1TSt2T2σ^2KPSS = \frac{\sum_{t=1}^T S_t^2}{T^2 \hat{\sigma}^2}

where σ^2\hat{\sigma}^2 is a Newey-West estimate of the long-run variance of u^t\hat{u}_t. The intuition: for a stationary series the cumulative residuals hover near zero; for a unit-root series they wander off. Under H0H_0 the statistic has a well-defined asymptotic distribution (a functional of Brownian motion), critical values are tabulated, and large values reject stationarity.

Reversing the null is not a gimmick — it is complementarity. Hypothesis tests inherently favor the null: when power is lacking, “not rejected” is a presumption of innocence, not evidence of it. Run ADF and KPSS as a pair, one facing each way, and the four combinations each have a reading:

ADF/PPKPSSInterpretation
Reject (stationary)Don’t reject (stationary)Strongly stationary
Don’t reject (unit root)Reject (unit root)Strongly unit root
Reject (stationary)Reject (unit root)Contradiction. Likely: near-unit-root with a short sample, or a structural break, or a trending stationary series misread as a unit root
Don’t reject (unit root)Don’t reject (stationary)Low power on both sides. No conclusion

The first two rows are the happy cases. The last two are the practitioner’s daily life: the third row is the uncomfortable middle, the signature symptom of near-unit-root processes — the truth sits close to both pure stationarity and pure unit root, and each test rejects the other’s null; the fourth row is the sample simply not carrying enough information. The existence of these rows pushes us straight into the power problem.

Power: The Ceiling of the Craft

Low power is not an implementation flaw here; it is the nature of the problem. Against local alternatives ϕ=1−c/T\phi = 1 - c/T — a unit root minus an amount that shrinks with the sample — ADF’s asymptotic power is pinned well below 1; against alternatives farther from the null power improves, but slowly. Finite samples look worse: with T=100T = 100 and a true ϕ=0.95\phi = 0.95, the probability of correctly rejecting the unit root null runs around three in ten in the simulation literature — better than a coin flip, but not by much. The exact figure moves with the test variant and the setup; the order of magnitude does not.

The root cause is plain: a unit root process and a stationary AR with ϕ=0.95\phi = 0.95 generate sample paths that are practically indistinguishable over a hundred observations — both highly persistent. Which leads to the most important sentence in this article: failing to reject the unit root null does not prove the series has a unit root. It may well be a highly persistent stationary process that your test simply cannot see. This is why applied work, in the gray zone, calls in a referee from outside statistics — economic theory. Is the series mechanically more like an accumulation of shocks (inventory-like quantities, asset prices), or the product of a long-run equilibrium (spreads, valuation ratios)? The former carries a prior toward a unit root, the latter toward stationarity. A theoretical prior is not a free pass, but where power is low it beats the third decimal of a pp-value.

Structural Breaks: Stationary Series Impersonating Unit Roots

Perron’s (1989) famous point: a stationary series with a one-time break in its trend looks like a unit root to ADF. The intuition is short — a break in trend or level produces a permanent shift, and “shocks stay forever” is precisely the signature of a random walk, so the test cannot tell “unit root” from “stationary plus one break”. His example was US real GNP: growth ran at different speeds before 1929 and after World War II, and the break makes the whole series look non-stationary even though, conditional on the break, it may be stationary fluctuation around a deterministic trend. Keep the direction straight: when a break is suspected, standard ADF is biased toward not rejecting the unit root.

The remedy is to put the break into the alternative. The Zivot-Andrews (1992) test pits H0H_0: unit root against H1H_1: trend-stationary with one break, with the break date chosen endogenously — sweep all candidate dates and take the one minimizing the tt-statistic on ρ\rho. The break can sit in the level (a level dummy DUt=1[t>Tb]DU_t = \mathbb{1}[t > T_b] in the regression), in the trend (a trend dummy), or both; critical values depend on the specification and, because the date is searched over, sit further left than the standard DF values. Two breaks call for the minimum-LM test of Lee-Strazicich (2003). Beyond two, stop pushing — power collapses, critical values become unreliable, and a series you believe has many breaks was never going to give any unit root test a clean answer anyway.

A field trick that needs no dedicated test: run the tests on subsamples. A series that tests as a unit root in one stretch and stationary in another is usually a structural break at work, not a genuine unit root.

DF-GLS: Power You Can Have for Free

The other attackable margin of the power problem is how the deterministic terms are removed. Elliott, Rothenberg & Stock (1996) showed that OLS detrending, as in standard ADF, is inefficient in the near-unit-root region, and that GLS detrending under a local alternative buys a real power gain: estimate the deterministic coefficients βˉ\bar{\beta} by GLS under the local alternative ϕ=1+cˉ/T\phi = 1 + \bar{c}/T, form the detrended series y~t=yt−βˉ′xt\tilde{y}_t = y_t - \bar{\beta}' x_t, then run an ADF without deterministic terms on y~t\tilde{y}_t. This is the DF-GLS test; critical values are tabulated. The improvement over standard ADF is largest for near-unit-root alternatives — exactly where it hurts most. For serious applied work, DF-GLS as the default starting point is a sensible habit.

Panels: Buying Power with the Cross-Section

Power that a single series cannot afford can sometimes be pooled from many. With a panel — GDP across countries, valuation ratios across stocks — unit roots can be tested jointly, aggregating information across series. Im-Pesaran-Shin (IPS, 2003) averages the individual ADF tt-statistics with an appropriate standardization and rejects for sufficiently negative averages; Maddala-Wu (1999) combines the individual ADF pp-values by Fisher’s method, with −2∑log⁡pi∼χ2N2-2 \sum \log p_i \sim \chi^2_{2N} under the joint null. Both assume cross-sectional independence — and “every series driven by one common global shock” is the normal state of macro-financial panels, so once independence fails, the tests are mis-sized. Pesaran’s (2007) CIPS handles this by augmenting each series’ ADF regression with cross-section averages as a proxy for the common factor (the CADF regression), then averaging the tt-statistics. Think about which kind of cross-section you have before reaching for a panel test.

The Variance Ratio: Same Question, Different Angle

The last tool approaches from an entirely different direction. The variance ratio test of Lo & MacKinlay (1988) uses a signature property of the random walk: the variance of the qq-period return should be exactly qq times the one-period variance. Define

VR(q)=Var(rt+rt−1+⋯+rt−q+1)/qVar(rt)=1VR(q) = \frac{\text{Var}(r_t + r_{t-1} + \cdots + r_{t-q+1}) / q}{\text{Var}(r_t)} = 1

Under the random walk null this equals 1 for every qq; mean reversion suppresses long-horizon variance, giving VR(q)<1VR(q) < 1; positive autocorrelation inflates it, VR(q)>1VR(q) > 1. The sample statistic

VR(q)=σ^2(q)σ^2(1)VR(q) = \frac{\hat{\sigma}^2(q)}{\hat{\sigma}^2(1)}

comes with appropriate standard errors (a heteroskedasticity-robust version is in the original paper), and significant departures from 1 reject the random walk. It pairs well with ADF because it watches a different dimension: ADF stares at a regression coefficient, the variance ratio at how variance scales with horizon — and the direction of the departure tells you which way the dynamics lean, which ADF never does.

Arranging the Tools into a Procedure

Do not run ADF, PP, and KPSS in isolation and take a majority vote — their nulls differ, and votes cannot be counted that way. A sensible order: plot the series and its ACF first, looking for trends, level shifts, and variance changes, and let that fix the deterministic terms in the DF regression; run ADF (lags chosen as above) and KPSS as the complementary pair, reading the combination off the table; if they agree, report with the power caveat, and if they contradict, investigate the three usual suspects — near unit root, structural break, trending stationarity; with reason to suspect a break, bring in Zivot-Andrews or Lee-Strazicich, and with a heavy near-unit-root suspicion, switch to DF-GLS; for panels choose IPS or CIPS by whether cross-sectional dependence is plausible; and for strongly trended series, ask the substantive question — deterministic trend or stochastic one — which is not merely statistical.

Both workhorses are one import away:

import pandas as pd
from statsmodels.tsa.stattools import adfuller, kpss

y = pd.Series(..)  # your time series


adf_stat, adf_p, adf_lags, adf_nobs, adf_crit, _ = adfuller(y, regression='c', autolag='AIC')
print(f"ADF stat: {adf_stat:.3f}, p-value: {adf_p:.3f}")
print(f"Critical values: {adf_crit}")
# Reject if adf_stat < critical value at desired level

# KPSS test: null = stationarity
kpss_stat, kpss_p, kpss_lags, kpss_crit = kpss(y, regression='c', nlags='auto')
print(f"KPSS stat: {kpss_stat:.3f}, p-value: {kpss_p:.3f}")
print(f"Critical values: {kpss_crit}")
# Reject if kpss_stat > critical value at desired level

When the whole procedure still leaves you unsure, there is a final move — and an underrated one: model it both ways. Fit a stationary model (ARMA) and a unit root model (ARIMA), compare out-of-sample forecasts, and use whichever predicts better. In a field where the tests are inherently underpowered, out-of-sample comparison is the only honest way to judge which specification serves your purpose. And remember that passing a test is not the finish line: once stationarity or a unit root is settled, the model still has to be estimated (ARMA if stationary, ARIMA or VECM if not), breaks still have to be checked, and the economic mechanism behind the persistence still has to be thought through. Unit root tests are where the analysis starts, never where it ends.

References

  • 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.
  • Elliott, G., Rothenberg, T. J., & Stock, J. H. (1996). Efficient tests for an autoregressive unit root. Econometrica, 64(4), 813-836.
  • Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press. Ch. 17-18.
  • Im, K. S., Pesaran, M. H., & Shin, Y. (2003). Testing for unit roots in heterogeneous panels. Journal of Econometrics, 115(1), 53-74.
  • 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.
  • Lee, J., & Strazicich, M. C. (2003). Minimum Lagrange multiplier unit root test with two structural breaks. Review of Economics and Statistics, 85(4), 1082-1089.
  • Lo, A. W., & MacKinlay, A. C. (1988). Stock market prices do not follow random walks: Evidence from a simple specification test. Review of Financial Studies, 1(1), 41-66.
  • Maddala, G. S., & Wu, S. (1999). A comparative study of unit root tests with panel data and a new simple test. Oxford Bulletin of Economics and Statistics, 61(S1), 631-652.
  • Perron, P. (1988). Trends and random walks in macroeconomic time series. Journal of Economic Dynamics and Control, 12(2-3), 297-332.
  • Perron, P. (1989). The great crash, the oil price shock, and the unit root hypothesis. Econometrica, 57(6), 1361-1401.
  • Pesaran, M. H. (2007). A simple panel unit root test in the presence of cross-section dependence. Journal of Applied Econometrics, 22(2), 265-312.
  • Phillips, P. C. B., & Perron, P. (1988). Testing for a unit root in time series regression. Biometrika, 75(2), 335-346.
  • Said, S. E., & Dickey, D. A. (1984). Testing for unit roots in autoregressive-moving average models of unknown order. Biometrika, 71(3), 599-607.
  • Schwert, G. W. (1989). Tests for unit roots: A Monte Carlo investigation. Journal of Business & Economic Statistics, 7(2), 147-159.
  • Tsay, R. S. (2010). Analysis of Financial Time Series (3rd ed.). Wiley. Ch. 2.
  • Zivot, E., & Andrews, D. W. K. (1992). Further evidence on the great crash, the oil-price shock, and the unit-root hypothesis. Journal of Business & Economic Statistics, 10(3), 251-270.