A stationary time series is a series in which statistical properties such as mean, variance, and covariance are constant over time. Stationarity is a desired characteristic of time series as it makes modeling and extrapolating (forecasting) into the future more feasible. Some drawbacks of non-stationary data are:
- Variance can be misspecified by the model
- Worse model fit
- Cannot leverage valuable time-dependent patterns in the data
In this recipe, we show you how to test the time series for stationarity. To do so, we employ the following methods:
- The Augmented Dickey-Fuller (ADF) test
- The Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test
- Plots of the (partial) autocorrelation function (PACF/ACF)
We investigate the stationarity of monthly gold prices from the years 2000-2011.