# Trouble interpreting cointegration test results

I'm struggling with testing the cointegration of 2 time series (or rather interpreting the test results properly).

So I got 2 time series x and y each containing 36 monthly data points (oil prices).

From looking at those time series, I'd say they are cointegrated.

However when applying different cointegration tests, they don't seem to be:

1) Augmented Dickey-Fuller

 from statsmodels.tsa.stattools import adfuller
from statsmodels.api import OLS

ols_result = OLS(y, x).fit()


returns

 (0.6614451366946532,
0.9890361840444819,
10,
25,
{'1%': -3.7238633119999998, '5%': -2.98648896, '10%': -2.6328004},
84.12263429255607)


i.e. a p-value of 0.98; null hypothesis cannot be rejected, time series are not cointegrated.

2) Engle-Granger

 coint_t, p_value, _ = coint(y, x)
p_value
0.06910078732250052


returns a p-value of 0.069 i.e. not cointegrated.

What am I doing wrong here?

PS: there seems to be Granger-Causality between the 2 time series (tested using statsmodels.tsa.stattools.grangercausalitytests)

• could you show us a plot of OLS_result.resid? – carlo Apr 16 '20 at 17:36
• thanks carlo, I added a plot – movingabout Apr 17 '20 at 9:36
• @movingabout , what makes you think that this series are intgrated in the first place? – Grada Gukovic Apr 18 '20 at 11:28
• informally speaking, they seem to move in similar patterns. a little bit more formally - just from the looks of it - a linear combination of those two series should be easily obtainable. – movingabout Apr 18 '20 at 11:40
• @movingabout In order for two time-series to be cointegrated it is a necessary condition that they both be integrated of the same order. A linear combination with well-behaved residuals can be obtained from variables that are not intergrated and there fore do not cointegrate. "Similar patterns" is certainly not a sufficient arguement. – Grada Gukovic Apr 18 '20 at 12:27