All Articles
Quantitative Finance
Advanced
5 min readDecember 28, 2024

Beyond Stationarity Assumptions: Understanding the KPSS Test for Time Series

#TimeSeries#Stationarity#KPSS#Econometrics#StatisticalTests#ModelValidation#Forecasting#QuantitativeFinance#RiskModels#ADF

In time series analysis, the assumption of stationarity underpins most econometric modeling—from ARIMA forecasts to risk models. While the Augmented Dickey-Fuller (ADF) test is widely used to reject non-stationarity, there's an often-overlooked complement: the KPSS test, which flips the question on its head.

This article explores how the Kwiatkowski–Phillips–Schmidt–Shin (KPSS) test works, how to compute it, and how to interpret its results—especially in models where the cost of assuming stationarity is high.


What Is the KPSS Test?

While the ADF test assumes the null hypothesis of non-stationarity, the KPSS test does the opposite:

Null Hypothesis (H₀): The time series is stationary (trend-stationary or level-stationary).

Alternative Hypothesis (H₁): The time series is non-stationary (contains a unit root).

This makes the KPSS test a powerful complement to the ADF test, giving modelers a two-lens approach to assessing stationarity.


How Is the KPSS Test Computed?

The KPSS statistic is based on the residuals from the regression of the time series on a constant (level stationarity) or a constant + trend (trend stationarity).

Test Statistic

LM = (1/T²) Σ S(t)² / σ̂²

Where S(t) is the partial sum of residuals and σ̂² is an estimate of the long-run variance.

Critical values are not standard normal—they are derived from simulations and depend on the test type (level or trend).


How to Interpret KPSS Test Results

  • p-value < 0.05 → Reject stationarity (series is non-stationary)
  • p-value ≥ 0.05 → Fail to reject stationarity (series appears stationary)

So if ADF fails to reject non-stationarity and KPSS rejects stationarity, it's a strong signal the series is indeed non-stationary.


Why It Matters in Risk and Forecasting

In finance, macroeconomics, and actuarial modeling, misidentifying stationarity can corrupt models:

  • Overstated R² and misestimated risk premiums
  • Misleading impulse response functions
  • Spurious regressions and volatile forecasts

The KPSS test adds statistical due diligence to time series preprocessing and model design.


Implementation in Python

from statsmodels.tsa.stattools import kpss
statistic, p_value, _, _ = kpss(series, regression='c')  # 'c' for level, 'ct' for trend
print(f'KPSS Statistic: {statistic}, p-value: {p_value}')

In R:

library(tseries)
kpss.test(time_series, null = "Level")

Final Insight

"Assuming stationarity without testing is like building on sand without checking the ground."

The KPSS test provides a counterbalance to the unit root-focused mindset—crucial for high-stakes models in risk, economics, and finance. It's not just about detecting drift, but ensuring the foundation of your model is stable.


Let's Discuss

  • Do you regularly use KPSS alongside ADF?
  • Have you encountered false stationarity in your modeling experience?

Share your insights or critiques in the comments.


Originally published on LinkedIn.