Quant Memo
Advanced

The KPSS Stationarity Test

A stationarity test that flips the usual burden of proof compared to the ADF test — instead of assuming a unit root until proven otherwise, KPSS assumes stationarity until the data provides enough evidence against it, which makes it a useful cross-check rather than a replacement for ADF.

Prerequisites: Stationarity, Unit Roots and the ADF Test

The augmented Dickey-Fuller test is the standard tool for checking stationarity, but it has an awkward property: its null hypothesis is "there is a unit root" (non-stationary), so failing to reject the null doesn't prove non-stationarity — it just means the test didn't find enough evidence against it, which happens easily in short or noisy samples. If you want positive evidence for stationarity, ADF alone can't give it to you cleanly. The KPSS test was built to complement this exact gap: it flips the null hypothesis around, testing "the series is stationary" as the default assumption, so that using both tests together tells you far more than either alone.

An analogy: two different courtroom standards

Think of two ways a court could treat a defendant. ADF is like a court that presumes non-stationarity ("guilty of having a unit root") unless the evidence is strong enough to overturn that presumption — a weak or short trial (small sample) tends to leave the presumption of guilt in place by default, simply from lack of decisive evidence either way. KPSS is like a court with the opposite presumption: stationarity is assumed innocent until proven otherwise. Running both tests is like getting a verdict under both standards — if both agree (ADF rejects a unit root and KPSS fails to reject stationarity), you have strong, well-triangulated evidence. If they disagree, that disagreement itself is informative: it usually means the sample is too short or noisy to say confidently either way.

The test, one piece at a time

KPSS decomposes the series into a random walk component plus stationary noise:

Xt=rt+εt,rt=rt1+ut,uti.i.d.(0,σu2),X_t = r_t + \varepsilon_t, \qquad r_t = r_{t-1} + u_t, \quad u_t \sim \text{i.i.d.}(0, \sigma_u^2),

where rtr_t is a random-walk component with innovation variance σu2\sigma_u^2 and εt\varepsilon_t is stationary noise. The null hypothesis is σu2=0\sigma_u^2 = 0 — if the random-walk component has zero innovation variance, it never actually moves, and XtX_t reduces to pure stationary noise around a constant (or a trend, in the trend-stationary version of the test). The KPSS statistic is built from the partial sums of the regression residuals:

KPSS=1n2t=1nSt2λ^2,St=i=1tε^i,\text{KPSS} = \frac{1}{n^2} \sum_{t=1}^{n} \frac{S_t^2}{\hat\lambda^2}, \qquad S_t = \sum_{i=1}^{t} \hat\varepsilon_i,

where StS_t is the cumulative sum ("running total") of the residuals up to time tt, and λ^2\hat\lambda^2 is a long-run variance estimate that adjusts for autocorrelation in εt\varepsilon_t. In plain English: if the series is truly stationary, its residuals should hover around zero with no persistent drift, so their running total StS_t stays small and doesn't wander off; if there's a hidden random-walk component, the running total accumulates and drifts, growing roughly proportionally to tt, making the statistic large. A large KPSS statistic, exceeding its critical value, rejects the stationarity null.

Worked example 1: agreement between ADF and KPSS

A quant checks a mean-reverting spread between two cointegrated stocks. The ADF test gives a test statistic of −4.1 against a 5% critical value of about −2.9, rejecting the unit-root null (evidence for stationarity). The KPSS test on the same series gives a statistic of 0.18, below its 5% critical value of about 0.463, failing to reject the stationarity null (no evidence against stationarity). Both tests point the same direction — this spread can be treated as stationary with reasonably high confidence, a much stronger conclusion than either test would support alone.

Worked example 2: a disagreement, and what it means

A different series — a commodity futures roll spread over a short 60-day sample — gives an ADF statistic of −2.1 (does not clear the −2.9 critical value, so ADF fails to reject the unit-root null) and a KPSS statistic of 0.31 (below the 0.463 critical value, so KPSS also fails to reject stationarity). Here neither test rejects its own null: ADF can't confirm non-stationarity, and KPSS can't confirm stationarity either, given only 60 observations. This is a classic "can't tell" case, not a contradiction to be argued away — the honest conclusion is that the sample is too short (or too noisy) for either test to have enough power, and a longer sample or an economically motivated prior should guide the modeling choice instead of forcing a verdict from underpowered tests.

time stationary: S_t stays flat unit root: S_t drifts up
The running sum of residuals hovers near zero for a genuinely stationary series but drifts steadily away from zero when a hidden random-walk component is present — this drift is what the KPSS statistic measures.
ADF rejects unit root KPSS fails to reject strong: stationary ADF fails to reject KPSS rejects strong: unit root Both fail to reject (or both reject) inconclusive: sample too short/noisy
Running ADF and KPSS together turns two individually weak verdicts into a much clearer picture — agreement is strong evidence, disagreement (or a double non-rejection) flags an underpowered sample.

What this means in practice

KPSS is almost never used alone in practice — it's run alongside ADF specifically because the two tests have opposite null hypotheses and therefore fail in different situations. Before modeling a spread as mean-reverting for a stat-arb strategy, or treating a macro series as I(1) for a cointegration analysis, checking both tests' agreement is standard due diligence, and disagreement between them is itself a useful (if humbling) signal about how much the sample can actually tell you.

KPSS tests the opposite null hypothesis from ADF — stationarity assumed true until proven otherwise, rather than a unit root assumed true until proven otherwise — so running both together and checking whether they agree gives far more reliable evidence about a series' stationarity than either test alone.

Treating an ADF "fail to reject" as proof of a unit root, or a KPSS "fail to reject" as proof of stationarity, is a basic misreading of what a hypothesis test can say — failing to reject a null only means the data didn't provide strong enough evidence against it, not that the null is true. This mistake is especially common with ADF, which has notoriously low power in short or highly persistent samples, meaning it very often "fails to find" a stationary series that actually is stationary.

Related concepts

Practice in interviews

Further reading

  • Kwiatkowski, Phillips, Schmidt & Shin, Testing the Null Hypothesis of Stationarity, JoE 1992
ShareTwitterLinkedIn