Skip to content
All library documents

Testing Time-Series Stationarity with Unit Root and Alternative Methods

Article Quant Q&A · Author: Dam

Summary

The document surveys ways to assess whether a time series is stationary, starting from a question about confirming a KPSS result. Suggested methods include the Augmented Dickey–Fuller, Elliott–Rothenberg–Stock, Phillips–Perron, Schmidt–Phillips, and Zivot–Andrews tests, as well as wavelet-based tests. It also describes comparing empirical distributions across separate sample segments, while noting that a formal comparison would be needed because samples will not match exactly.

The answers emphasize that test choice should reflect the assumed data-generating process: KPSS is framed as appropriate when stationarity is the working hypothesis, while unit-root tests address an I(1) hypothesis. They caution that test implementations can differ in power and p-value calculation, and that no test choice can be specified without context about the series. Model coefficient conditions can also bear on stationarity. The collection is a set of suggestions rather than a controlled comparison, and several proposed approaches are not evaluated in detail.

Key ideas

  • Common stationarity diagnostics include KPSS, ADF, Phillips–Perron, and related unit-root tests.
  • Test selection should reflect whether stationarity or an I(1) process is the working hypothesis.
  • Wavelet-based tests and distribution comparisons are offered as alternatives.
  • Different software implementations may produce different p-values or have different power.
  • The series and model context are needed to choose and interpret a test.

Tags

Full text
# How to check if a timeseries is stationary?


# How to check if a timeseries is stationary?












I'm using KPSS Method to check if the series is stationary, but I would also like to use another test to confirm if the series is stationary or not, what method coudl I use?

## Answer by Shane (score 17)

https://quant.stackexchange.com/a/2378

There are many different methods for this. Most people rely on a unit root test. Rmetrics has collected the most common unit root tests into the fUnitRoots package, which primarily provides a wrapper for Bernhard Pfaff's urca package. These include:

- Augmented Dickey–Fuller (ADF) test

- Elliott–Rothenberg–Stock test

- KPSS unit root test

- Phillips–Perron test

- Schmidt–Phillips test

- Zivot–Andrews

If you want to understand these functions in more detail, I recommend Pfaff's book on "Analysis of Integrated and Cointegrated Time Series with R". "Applied Econometrics with R" also provides a nice short introduction.

Chapter 4 of Eric Zivot's book on time series analysis covers unit root tests and is available on his website. He uses S-Plus, but the urca functions are almost identical.

## Answer by Bob Jansen (score 10)

https://quant.stackexchange.com/a/2373

You can use the (Adjusted) Dickey Fuller Test: http://en.wikipedia.org/wiki/Dickey%E2%80%93Fuller_test

I'm pretty sure your software package has a library or routine you can use to do it.

## Answer by Ryogi (score 6)

https://quant.stackexchange.com/a/2379

Yet another alternative are wavelet based tests. With comparable size, they often have higher power, especially for very near unit root alternatives. An example is here (free pre-print versions of this paper are available, too).

## Answer by Richard Herron (score 3)

https://quant.stackexchange.com/a/2377

The `tseries` package has GARCH models. Here is some simple code:

```
library(quantmod)
library(tseries)
getSymbols("MSFT")
ret <- diff.xts(log(MSFT$MSFT.Adjusted))[-1]
arch_model <- garch(ret, order=c(0, 3))
garch_model <- garch(ret, order=c(3, 3))
plot(arch_model)                                  
plot(garch_model)
```

Also, Eric Zivot has good notes on time-series and R.

## Answer by Pete (score 1)

https://quant.stackexchange.com/a/2396

Divide the time series into two sections (e.g. 1st half and 2nd half) and construct the CDF for each part. The CDFs should be the same if the series is stationary. Since the CDFs will never be exactly the same you can apply Pearson's $\chi^{2}$ test comparing the value of the CDFs through several waypoints. I believe this test was created by the late Cliff Sherry.

## Answer by user1483 (score 1)

https://quant.stackexchange.com/a/40536

If your theory/common sense indicates that your series is stationary the KPSS test is appropriate. It is a test of your theory/common sense.

If your theory/common sense indicates that your series is I(1) then you should use one of the unit root tests already mentioned. I would prefer the Elliott–Rothenberg–Stock test.

I would not recommend doing both tests. If they both confirm your original ideas then you are OK. If you are assuming stationarity and your series passes the KPSS test but the unit root test indicates non stationarity I would still accept that my theory has been confirmed by the KPSS and proceed accordingly. If the KPSS indicates non-stationarity and this is confirmed by the unit root test then my theory/common sense is subject to query. In any of the three cases there is no benefit to be gained from doing both kinds of tests.

Without a knowledge of what you are testing it is not possible to give more specific advice.

If you are estimating an ARMA or GARCH process the estimated coefficients must satisfy certain conditions if the series is to be stationary

## Answer by Ashish Garg (score 1)

https://quant.stackexchange.com/a/43414

You can use ADF test as implemented in R in different packages However, accuracy and power of these implementations would differ, since, these tests refer different papers to generate the p-values. The table below contains the packages, name of the functions and the referenced papers. You can go through the papers to keep an eye on the differences in the implementations.

## Answer by swema (score -2)

https://quant.stackexchange.com/a/9222

To be a stationarity is when the roots of charateristic equation lies outside of the unit circle.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.