Tutorials › Econometrics (Graduate) › KPSS Tests With A Stationarity Null

Unit Roots and Cointegration · Tutorial 398 of 952

KPSS Tests With A Stationarity Null

Learn how KPSS tests use residual partial sums and a long-run variance estimate to assess level or trend stationarity.

Advanced 10 min read

What You'll Learn

  • Distinguish the KPSS level-stationarity null from its trend-stationarity null.
  • Construct residuals after removing an intercept or an intercept and linear trend.
  • Calculate the KPSS statistic from cumulative residuals and a long-run variance estimate.
  • Explain why the long-run variance accounts for serial correlation and depends on a bandwidth choice.
  • Interpret KPSS results alongside unit-root-null tests without treating failure to reject as proof of stationarity.

Why Test Stationarity Directly?

Unit-root tests such as the augmented Dickey–Fuller and Phillips–Perron tests use a unit root as their null hypothesis. The KPSS test reverses the testing perspective: its null is that the series is stationary around specified deterministic terms. This distinction matters because a failure to reject a unit-root null and a rejection of a stationarity null provide different evidence than either result alone.

KPSS is not a test of whether the sample looks smooth or whether its estimated trend is statistically significant. It asks whether deviations from a chosen deterministic component are consistent with a stationary process, allowing for short-run serial dependence. The choice between removing only a level and removing a level plus a linear trend is part of the test specification.

Definition: In the level-stationarity version, the null is that \(y_t\) is stationary around a constant. In the trend-stationarity version, the null is that \(y_t\) is stationary around a deterministic linear trend. The KPSS statistic measures the size of cumulative sums of residuals relative to an estimate of their long-run variance.

Model, Null, and Statistic

A standard representation for the KPSS null and alternative is

$$ y_t = d_t + r_t + u_t,\qquad r_t = r_{t-1}+\eta_t . $$

Here \(d_t\) is the deterministic component: \(d_t=\mu\) for the level version, or \(d_t=\mu+\beta t\) for the trend version. The component \(u_t\) is a zero-mean, weakly stationary disturbance with a finite, positive long-run variance. The component \(r_t\) is a random walk, with innovations \(\eta_t\) of mean zero and variance \(\sigma_\eta^2\), independent of \(u_t\) under the standard setup. The null is \(H_0:\sigma_\eta^2=0\), so there is no stochastic trend; the alternative is \(H_a:\sigma_\eta^2>0\).

For the chosen deterministic specification, estimate \(d_t\) by ordinary least squares and let \(\hat{u}_t\) be the residual for observation \(t\). Define the partial sum \(S_t=\sum_{j=1}^{t}\hat{u}_j\). The KPSS statistic is

$$ \mathrm{KPSS} = \frac{1}{n^2\hat{\omega}^{\,2}} \sum_{t=1}^{n} S_t^2, $$

where \(\hat{\omega}^{\,2}\) estimates the long-run variance of the stationary disturbance. Under the null, the statistic has a nonstandard limiting distribution, and its critical values differ between the level and trend versions. It is not compared with the usual \(t\), \(F\), or chi-square critical values.

Estimating the Long-Run Variance

The long-run variance is the sum of the disturbance’s autocovariances across all lags. It accounts for serial dependence that would be missed by using only the variance at lag zero. A practical estimate truncates and weights the sample autocovariances. One common choice is the Bartlett, or Newey–West, estimate:

$$ \hat{\gamma}_j = \frac{1}{n}\sum_{t=j+1}^{n}\hat{u}_t\hat{u}_{t-j}, \qquad \hat{\omega}^{\,2} = \hat{\gamma}_0+ 2\sum_{j=1}^{\ell} \left(1-\frac{j}{\ell+1}\right)\hat{\gamma}_j . $$

The nonnegative integer \(\ell\) is the bandwidth, or maximum included lag. The Bartlett weights decline to zero at the truncation point. Setting \(\ell=0\) gives \(\hat{\omega}^{\,2}=\hat{\gamma}_0\), which is useful for hand calculations but may be inadequate when the residuals are serially correlated. In asymptotic use, bandwidth rules are chosen so that the bandwidth grows with the sample while remaining small relative to it; in practice, software defaults and finite-sample choices can affect the result.

Interpretation: Large cumulative residual sums relative to the estimated long-run variance produce a large KPSS statistic and evidence against the stationarity null. A small statistic means the test does not reject that null at the chosen significance level; it does not establish that the series is stationary.

Worked Calculations

Worked Example: Level Stationarity With a Zero-Lag Estimate

Suppose a hypothetical four-period series is \(10,12,11,13\). Test the level-stationarity null using the illustrative choice \(\ell=0\), so the long-run variance estimate is the residual variance defined with divisor \(n\). The fitted constant is the sample mean, \(\bar{x}=11.5\), and the residuals are \(-1.5,\,0.5,\,-0.5,\,1.5\). They sum to zero, as required after fitting an intercept.

The partial sums are \(S_1=-1.5\), \(S_2=-1.0\), \(S_3=-1.5\), and \(S_4=0\). Thus,

$$ \sum_{t=1}^{4} S_t^2 =(-1.5)^2+(-1.0)^2+(-1.5)^2+0^2 =2.25+1+2.25=5.50. $$

The lag-zero estimate is

$$ \hat{\omega}^{\,2}=\hat{\gamma}_0 =\frac{(-1.5)^2+(0.5)^2+(-0.5)^2+(1.5)^2}{4} =\frac{5}{4}=1.25. $$

Therefore,

$$ \mathrm{KPSS} =\frac{5.50}{4^2(1.25)} =\frac{5.50}{20} =0.275. $$

For orientation, the commonly reported asymptotic 5% critical value for the level version is about \(0.463\). The calculated statistic is below it, so this calculation does not reject level stationarity at 5%. The sample is extremely small, and \(\ell=0\) is a simplifying choice; this comparison illustrates the arithmetic rather than supporting a reliable empirical conclusion.

Worked Example: Removing a Linear Trend

Consider the hypothetical observations \(y_t=13,12,17\) at times \(t=1,2,3\). For the trend-stationarity version, regress \(y_t\) on an intercept and time. The sample means are \(\bar{t}=2\) and \(\bar{y}=14\). The OLS slope is

$$ \hat{\beta} = \frac{(-1)(-1)+0(-2)+1(3)} {(-1)^2+0^2+1^2} = \frac{4}{2}=2, \qquad \hat{\mu}=14-2(2)=10. $$

The fitted values at times \(1,2,3\) are therefore \(12,14,16\), and the residuals are \(1,-2,1\). Their partial sums are \(S_1=1\), \(S_2=-1\), and \(S_3=0\), giving \(\sum_{t=1}^{3}S_t^2=1+1+0=2\). With \(\ell=0\),

$$ \hat{\omega}^{\,2} =\frac{1^2+(-2)^2+1^2}{3} =\frac{6}{3}=2, \qquad \mathrm{KPSS} =\frac{2}{3^2(2)} =\frac{2}{18} \approx 0.1111. $$

The common asymptotic 5% critical value for the trend version is about \(0.146\). The statistic is below this reference value, so the trend-stationarity null is not rejected at 5% in this illustrative calculation. With only three observations, the asymptotic comparison is especially unreliable. The example also shows why the trend version uses residuals after fitting both an intercept and a slope, rather than residuals after subtracting the sample mean alone.

Worked Example: How the Bandwidth Can Change the Statistic

Consider the hypothetical residual sequence \(1,-1,1,-1\), which sums to zero and could arise after fitting an intercept. Its partial sums are \(1,0,1,0\), so \(\sum_{t=1}^{4}S_t^2=2\). With \(\ell=0\), \(\hat{\omega}^{\,2}=\hat{\gamma}_0=4/4=1\), and the statistic is \(2/[4^2(1)]=0.125\).

Now use \(\ell=1\). The lag-one sample autocovariance and its Bartlett weight are

$$ \hat{\gamma}_1 = \frac{(-1)(1)+(1)(-1)+(-1)(1)}{4} =-\frac{3}{4}, \qquad 1-\frac{1}{1+1}=\frac{1}{2}. $$

The long-run variance estimate becomes

$$ \hat{\omega}^{\,2} =1+2\left(\frac{1}{2}\right)\left(-\frac{3}{4}\right) =0.25, \qquad \mathrm{KPSS} =\frac{2}{16(0.25)} =0.500. $$

The statistic changes from \(0.125\) to \(0.500\) because the estimated serial dependence changes the denominator. The latter exceeds the common level-version 5% reference value of about \(0.463\), whereas the former does not. This four-point example is not a basis for a dependable test decision; it demonstrates why the bandwidth and the resulting long-run variance estimate must be reported and considered.

Why the Partial Sums Matter

The KPSS construction accumulates residuals over time. Under the stationarity null, residual partial sums fluctuate, but their scale is governed by the long-run variance. The factor \(n^2\) in the denominator and the estimate \(\hat{\omega}^{\,2}\) put the sum of squared partial sums on a scale with a nonstandard limiting distribution. If the series instead contains a stochastic trend, detrending does not generally remove its persistent movements: cumulative residuals tend to become large relative to the stationary-noise benchmark, pushing the statistic upward.

This explains both the direction of the test and its sensitivity to specification. A suitable deterministic component must be chosen before forming residuals. Omitting a genuine linear trend can make trend-stationary data look nonstationary; adding a trend when the intended null is level stationarity changes the test and its critical values. Serial dependence also matters: the lag-zero variance estimate alone can misrepresent the scale of cumulative fluctuations.

Using KPSS Alongside Unit-Root-Null Tests

KPSS is most informative when read alongside tests such as ADF or Phillips–Perron, which use a unit-root null. The tests have different null hypotheses, so their results are complementary rather than interchangeable. A common summary is:

Unit-root-null testKPSS stationarity-null testCareful reading
Rejects unit rootDoes not reject stationarityResults are compatible with stationarity under the specified deterministic terms.
Does not reject unit rootRejects stationarityResults are compatible with persistent, nonstationary behavior.
Rejects unit rootRejects stationarityThe tests disagree; specification, bandwidth, breaks, or finite-sample behavior may matter.
Does not reject unit rootDoes not reject stationarityEvidence is inconclusive; neither failure to reject establishes its null.

This comparison does not create a mechanical decision rule. The tests may use different deterministic terms, lag or bandwidth choices, and finite-sample approximations. Results should be interpreted in light of those choices and the economic context. In particular, neither a KPSS rejection nor a unit-root-test nonrejection alone establishes the data-generating process.

Common Mistakes and Practical Checks

  • Reversing the null. KPSS has a stationarity null, not a unit-root null. A large statistic is evidence against stationarity.
  • Using the wrong deterministic specification. The level and trend versions use different residuals and different critical values. Do not compare a trend-version statistic with level-version critical values.
  • Ignoring serial correlation. The long-run variance estimate is not automatically just the residual variance at lag zero. State the kernel and bandwidth or lag choice used.
  • Calling nonrejection proof. Not rejecting stationarity means the test did not find sufficient evidence against it at the selected level; it does not prove the null true.
  • Combining tests as if they had one null. ADF or Phillips–Perron nonrejection and KPSS rejection are statements about distinct null hypotheses. Report each result separately before drawing a qualified overall conclusion.
Key takeaway: Choose the level or trend specification, estimate its residuals, form their partial sums, and scale the squared partial sums by \(n^2\) times a long-run variance estimate. Reject the KPSS stationarity null only when the statistic is large relative to the appropriate critical value.

Check Your Understanding

Answer each question using the specified null and estimation choices.

  1. What is the null hypothesis of the level KPSS test, and how does it differ from the null of an ADF test?
  2. For residuals \(2,-1,-1\), calculate the partial sums and their sum of squares.
  3. Why can the KPSS statistic change when the bandwidth changes, even if the residuals stay the same?
  4. Which critical values should be used after residualizing on an intercept and linear time trend: level-version or trend-version values?
  5. If a unit-root-null test fails to reject and KPSS rejects stationarity, what is a careful interpretation of the combined evidence?
Clinical Biostats