I have several short (n=12) time series on which I am trying to conduct Augmented Dickey-Fuller tests, but I am getting very different/unexpected results:

import numpy as np
from statsmodels.tsa.stattools import adfuller
import matplotlib.pyplot as plt

series1 = [0.41625778, 0.40488883, 0.43044564, 0.44369687, 0.46613348, 0.44420775, 0.45091315, 0.48484614, 0.40252088, 0.43944978, 0.51613973, 0.49302274]
series2 = [0.35257984, 0.38692909, 0.39669828, 0.36296244,0.42035612,0.39374964, 0.41100085, 0.43182076, 0.40815853, 0.45394297, 0.41584767, 0.47399517]
series3 = [0.43749208, 0.45737407, 0.55615576, 0.48133939, 0.53273292, 0.49173426, 0.52919659, 0.56866738,0.53430795, 0.55901341, 0.54038404, 0.59699887]
series4 = [0.42294083, 0.45716565, 0.4782621, 0.48460774, 0.44784565, 0.41837626, 0.42410506, 0.47462612, 0.53232291, 0.48118058, 0.45748453, 0.54685356]

fig, ax = plt.subplots()
ax.plot(series1, label='series1')
ax.plot(series2, label='series2')
ax.plot(series3, label='series3')
ax.plot(series4, label='series4')

print('#1 p-value: ' + str(adfuller(series1)[1]))
print('#2 p-value: ' + str(adfuller(series2)[1]))
print('#3 p-value: ' + str(adfuller(series3)[1]))
print('#4 p-value: ' + str(adfuller(series4)[1]))

which outputs:


#1 p-value: 0.17255361114708972
#2 p-value: 2.1591294791118934e-11
#3 p-value: 0.974897811933493
#4 p-value: 0.9655183938140642

While in 3 of these 4 cases the test results in p-values above reasonable significance levels (e.g. 0.05), in #2 the p-value is very low, therefore we can reject the existence of a unit root and assume the series is stationary. However, from the plot above all these series are somewhat similar to each other, and in fact #2 has a noticeable increasing trend (therefore suggested non-stationary). What can explain such a discrepancy in the obtained p-values? Is it caused by the limited number of samples/are ADF tests less 'robust' with short time series?


1 Answer 1


This answer would likely be better as a comment but I do not have the reputation.

You say,

in fact #2 has a noticeable increasing trend (therefore suggested non-stationary)

however a time series can have a trend and be stationary (trend-stationary) around that trend. There are three versions of the Dickey-Fuller test, one of which is a test of unit root in the presence of a deterministic trend.

Broadly speaking, 12 data points is likely not sufficient for a reliable ADF test. If you think about what is happening in the Dickey-Fuller test, we are testing for a significant relationship between the value of $$y(t-1)$$ and the change $$ \Delta y(t) = y(t) - y(t-1) .$$ In the ADF test, we also incorporate lagged values of the process $$\Delta y(t) $$ which means that we are using very few data points to test for a unit root.

With regards to the specific series #2, I agree it does appear trend-stationary by sight.

  • $\begingroup$ I thought about trend stationarity, but python's adfuller accounts for that by default (i.e. trend stationary series should still fail the test). $\endgroup$
    – joaocandre
    Jun 6, 2023 at 0:23
  • $\begingroup$ Are there alternative stationarity (and/or serial correlation) tests able to deal with short time series? $\endgroup$
    – joaocandre
    Jun 6, 2023 at 0:25
  • $\begingroup$ > Are there alternative stationarity (and/or serial correlation) tests able to deal with short time series? The difficulty is stationarity is defined by the series statistical properties not depending on the time $t$ but you have so few time points to assess stationarity. $\endgroup$
    – pmxpp88
    Jun 8, 2023 at 5:41
  • $\begingroup$ Is there any rule-of-thumb regarding the minimum number of samples under which these tests aren't reliable? $\endgroup$
    – joaocandre
    Jun 9, 2023 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.