Loading market pulse…
Tools

Is Your Time Series Going Somewhere or Just Wandering? Stationarity Tests Know.

By FatNarwhal·

Before you fit any time series model to financial data, you need to answer a foundational question; is this series stationary? A stationary series has a constant mean, constant variance, and autocorrelation that does not change over time. A non-stationary series is trending, drifting, or wandering in a way that makes the mean and variance meaningless over the whole sample.

Why does this matter? Because most time series forecasting methods, including ARIMA, regression, and cointegration analysis, assume that the series you feed them has some stable statistical properties. If you fit a model to a series that is trending indefinitely upward, the model will confuse the trend for meaningful structure and produce useless forecasts. Getting stationarity right is the boring prerequisite to everything else working correctly.

The FatNarwhal Stationarity tool runs two complementary tests, the Augmented Dickey-Fuller test and the KPSS test, and gives you a clear verdict on whether your series is stationary and what to do if it is not.

How to Use It

Go to fatnarwhal.com/stationarity and enter a ticker or paste in a data series.

The tool runs both the ADF test and the KPSS test and shows you the test statistics, the critical values at different significance levels, and a clear interpretation. It also plots the series so you can visually assess whether it looks like it has a trend, a changing variance, or other non-stationary features.

If the series fails both tests (meaning it is probably non-stationary), the tool suggests transformations; usually taking the first difference (today's value minus yesterday's value) converts a price series to a returns series, which is typically stationary. For stock prices this almost always works; raw prices are non-stationary, but daily returns are stationary.

If you are checking whether two series might be cointegrated, you want to run stationarity tests on each series individually first and confirm they are both non-stationary (integrated of the same order) before proceeding to a cointegration test.

The Math Behind It

The ADF test tests the null hypothesis that a unit root exists (the series is non-stationary). It fits a regression of the form:

Δyt=α+βt+γyt1+δ1Δyt1++εt\Delta y_t = \alpha + \beta t + \gamma y_{t-1} + \delta_1 \Delta y_{t-1} + \dots + \varepsilon_t

And tests whether γ is significantly negative. If γ is 0, you have a unit root and the series is non-stationary. If γ is significantly below 0, the series is stationary. A p-value below 0.05 on the ADF test means you reject the null of a unit root; the series is stationary.

The KPSS test flips the null hypothesis; it tests whether the series is stationary (null) against the alternative of a unit root. Getting a high p-value on KPSS means you cannot reject stationarity.

Running both tests together is informative. ADF non-reject and KPSS reject both indicate non-stationarity. ADF reject and KPSS non-reject both indicate stationarity. When the two tests disagree, it usually suggests a near-unit-root situation that requires more careful judgment.

When to Use It and When Not To

Run stationarity tests as the first step any time you are building a time series model on financial data. It takes less than a minute and prevents the much larger time cost of diagnosing a broken model later. It is particularly important before running cointegration tests, since cointegration is only meaningful for integrated (non-stationary) series that move together.

The main gotcha is that these tests can struggle with short samples or structural breaks in the data. A series that changes its behavior around 2020, for example, might look stationary in one sub-period and non-stationary in another, and a full-sample test may not pick up either clearly. If your series has a known structural break, consider testing each sub-period separately.

Try It

Go to fatnarwhal.com/stationarity and run the test on AAPL's price level and then on AAPL's daily returns. The price level will almost certainly fail (it is non-stationary), and the returns will almost certainly pass. That is the standard result for equity data and it is why every serious time series model in finance works on returns rather than prices.

It is the boring prerequisite. But boring prerequisites are what keep the interesting parts from breaking.