1 Background
The KPSS test is a statistical procedure in time series analysis used to assess whether a series is stationary in level or stationary around a deterministic trend. It is named after the four authors who introduced it: Kwiatkowski, Phillips, Schmidt, and Shin. In applied econometrics, it is often used as a complement to unit root tests, helping analysts distinguish between persistent nonstationarity and simpler stationary behavior.
1.1 Statistical purpose
The main purpose of the KPSS test is to evaluate whether observed fluctuations in a time series can be treated as stable variation around a fixed mean or a fixed trend. This makes it useful when researchers want to decide whether differencing, detrending, or other transformations are necessary before estimation or forecasting.
1.2 Origin and authors
The test was introduced in a 1992 paper by Denis Kwiatkowski, Peter C. B. Phillips, Peter Schmidt, and Yongcheol Shin. Their contribution was notable because they reversed the usual logic of many unit root tests by making stationarity the null hypothesis rather than the alternative.
1.3 Relationship to unit root testing
The KPSS test is commonly paired with tests such as the Augmented Dickey-Fuller test and the Phillips-Perron test. While those procedures typically place the unit root in the null hypothesis, KPSS starts from the opposite assumption. Using both types of tests together can provide a more balanced assessment of a series’ stochastic properties.
2 Theoretical foundation
The theoretical basis of the KPSS test rests on standard stationarity concepts in time series analysis. It examines whether deviations from a deterministic component behave like a stationary process or instead accumulate in a way consistent with nonstationarity.
2.1 Stationarity concepts
Stationarity refers to a time series whose probabilistic properties are stable over time. In practice, this usually means that the mean, variance, and autocovariance structure do not change systematically as the sample progresses.
2.1.1 Level stationarity
A level-stationary series fluctuates around a constant mean. Its departures from that mean are temporary, and shocks do not permanently alter the series’ central tendency.
2.1.2 Trend stationarity
A trend-stationary series follows a deterministic trend, such as a linear upward or downward pattern, with random deviations around that trend. After removing the trend component, the remaining series is stationary.
2.2 Null and alternative hypotheses
In the KPSS framework, the null hypothesis is that the series is stationary either around a level or around a deterministic trend, depending on the specification. The alternative hypothesis is that the series contains a unit root, implying that shocks have persistent effects and that the process is nonstationary.
2.3 Comparison with other tests
The KPSS test differs from many familiar procedures because it treats stationarity as the default condition. This design makes it especially useful as a diagnostic companion to unit root tests, since agreement or disagreement between the two approaches can clarify whether a series is likely stationary, integrated, or ambiguous because of short samples or structural features.
3 Test formulation
The KPSS test is built from a regression representation that separates deterministic components from random disturbances. The test then examines the behavior of the cumulative residuals, with particular attention to the long-run variance of the residual process.
3.1 Regression components
The series is first modeled as a sum of deterministic terms and a stochastic error component. Depending on the version of the test, the deterministic terms may include only an intercept or both an intercept and a time trend. The fitted deterministic part is removed before the stationarity assessment proceeds.
3.2 Residual-based approach
After estimating the deterministic regression, the residuals are accumulated over time. If the underlying process is stationary, these cumulative residuals should not drift too far from zero in a systematic way. Large and persistent departures suggest nonstationarity.
3.3 Long-run variance estimation
A key part of the KPSS test is estimating the long-run variance of the residuals, which accounts for autocorrelation across multiple lags. This variance estimate is needed to scale the test statistic properly and to prevent serial dependence from distorting the results.
3.3.1 Choice of kernel
The long-run variance is often estimated using a kernel-based weighting scheme that downweights higher-order autocovariances. The choice of kernel affects how strongly distant lags influence the estimate, and different software implementations may use different defaults.
3.3.2 Bandwidth selection
Bandwidth selection determines how many autocovariances are included and how rapidly weights decay. A small bandwidth can miss meaningful serial correlation, while a large one may introduce unnecessary noise. In practice, bandwidth choice can have a noticeable effect on the test outcome.
4 Test statistics
The KPSS statistic summarizes the size of the cumulative residual fluctuations relative to the estimated long-run variance. It is designed to be sensitive to deviations from stationarity, particularly when autocorrelation is present.
4.1 Computation of the KPSS statistic
The statistic is computed from the partial sums of the residuals divided by an estimate of their long-run variance. Conceptually, it measures how much the residual process wanders over time. Larger values indicate greater evidence against the null of stationarity.
4.2 Interpretation of values
A small KPSS statistic suggests that the observed series is consistent with the chosen stationary null. A large statistic indicates that the cumulative residuals are too variable to be explained by a stationary process alone, raising concern about a unit root or another source of persistent nonstationarity.
4.3 Critical values and significance
The test is interpreted by comparing the statistic with critical values at conventional significance levels. If the statistic exceeds the relevant threshold, the null hypothesis is rejected. Because critical values differ for level-stationary and trend-stationary versions, the chosen specification matters.
5 Practical implementation
In applied work, the KPSS test is usually one step in a broader exploratory workflow. Analysts typically inspect plots, consider transformations, and run complementary diagnostics before drawing conclusions about the time series.
5.1 Data requirements
The test requires a univariate time series with observations ordered in time. It is most informative when the sample is long enough to reveal persistent patterns, although it can still be applied to moderate-sized datasets. Missing observations and irregular spacing can complicate implementation.
5.2 Step-by-step procedure
A typical procedure begins by choosing whether the null should be level stationarity or trend stationarity. The series is then regressed on the relevant deterministic terms, residuals are obtained, the long-run variance is estimated, and the KPSS statistic is computed. The result is finally compared with critical values or a p-value, if provided by software.
5.3 Software implementations
The KPSS test is available in many statistical packages, often with options for the deterministic specification and lag-selection method. Outputs usually include the test statistic, a significance assessment, and sometimes warnings about bandwidth or sample size.
5.3.1 R
In R, the KPSS test is commonly accessible through time series and econometrics packages. Users can typically choose between level and trend variants and specify how the long-run variance is estimated.
5.3.2 Python
Python implementations are often found in statistical libraries used for time series analysis. These functions generally return the KPSS statistic along with a p-value or interpretive message, making them convenient for exploratory analysis and model checking.
5.3.3 Stata and other packages
Stata and other econometric software packages also provide KPSS-related routines or user-written commands. The interface and defaults vary, so analysts often consult documentation to confirm the null hypothesis and lag treatment.
6 Interpretation of results
Interpreting KPSS results requires attention to the chosen null, the sample context, and any supporting evidence from other tests or visual inspection. The output is most useful when considered alongside the broader behavior of the series.
6.1 Rejecting the null hypothesis
If the null is rejected, the data are inconsistent with the specified stationary model. This may indicate a unit root, a structural change, omitted deterministic terms, or some other form of persistent nonstationarity.
6.2 Failing to reject the null hypothesis
Failing to reject the null does not prove stationarity, but it suggests that the observed evidence is not strong enough to rule it out. This outcome is often interpreted cautiously, especially in small samples where the test may have limited power.
6.3 Implications for modeling
When the series appears nonstationary, analysts may difference it, apply a trend adjustment, or use models designed for integrated processes. If stationarity is supported, modeling can often proceed with the series in levels, which may preserve long-run information.
7 Assumptions and limitations
Like other time series tests, the KPSS procedure depends on assumptions that may not hold perfectly in empirical data. Its conclusions can be affected by serial correlation, sample size, and the presence of features not represented in the basic specification.
7.1 Sensitivity to serial correlation
Because the test relies on long-run variance estimation, it is sensitive to how autocorrelation is handled. Poor lag or bandwidth choices can make the test too liberal or too conservative, altering the likelihood of rejection.
7.2 Finite-sample behavior
In finite samples, the distribution of the KPSS statistic may deviate from its asymptotic approximation. This can make the test less reliable in short series, where apparent departures from stationarity may reflect sampling variability rather than a genuine time-series property.
7.3 Common misuse and pitfalls
A frequent mistake is treating a non-rejection as proof of stationarity or a rejection as definitive evidence of a unit root. Another common problem is applying the test without considering trend specification, seasonal patterns, or breaks that can distort the result.
8 Applications
The KPSS test is widely used in empirical fields where understanding persistence and mean reversion is essential. It helps researchers prepare data, choose models, and assess whether standard stationary methods are appropriate.
8.1 Economic and financial time series
In economics and finance, the test is applied to variables such as prices, interest rates, inflation, output, and exchange-rate series. Its main value lies in helping analysts decide whether to work with levels, differences, growth rates, or detrended data.
8.2 Forecasting workflows
Forecasting exercises often use the KPSS test during preprocessing. By clarifying whether a series is stationary, the test can influence the choice between autoregressive models, differenced models, and more complex approaches that accommodate persistence.
8.3 Model diagnostics
The test also serves as a diagnostic tool after estimation. If residuals from a fitted model fail the stationarity check, the model may be missing a trend, a deterministic component, or a form of dependence that should be incorporated explicitly.
9 Related methods
The KPSS test belongs to a larger family of procedures for assessing time-series persistence. Its main value is often realized when interpreted alongside alternative tests that emphasize different null hypotheses or different treatment of serial correlation.
9.1 Augmented Dickey-Fuller test
The Augmented Dickey-Fuller test is a standard unit root test that places nonstationarity in the null hypothesis. It is commonly used together with KPSS so that the two tests provide complementary evidence rather than a single-sided conclusion.
9.2 Phillips-Perron test
The Phillips-Perron test is another unit root procedure that adjusts for serial correlation and heteroskedasticity using nonparametric methods. It is frequently compared with KPSS because both address persistence, though they differ in hypothesis structure.
9.3 Structural break considerations
Structural breaks can create the appearance of nonstationarity even when a series is stable within subperiods. In such cases, standard KPSS results may be misleading, and analysts may need methods that allow for changes in mean, trend, or variance.