I'm testing stock prices for cointegration by checking their spreads for mean reversion.
For this I used
statsmodels.tsa.stattools.adfuller(spreadseries).
I tested with
spreadseries = numpy.log10(numpy.cumsum(numpy.random.randn(50000))+1000),
-which is a nonstationary series-
and
results = statsmodels.tsa.stattools.adfuller(p, maxlag=None, regression='c', autolag='AIC')
I obtained p value= 0.06, which does almost mean the series is stationary.
Why is that?
When I use adfuller like this:
results = statsmodels.tsa.stattools.adfuller(spreadseries, maxlag=None, regression='ct', autolag='AIC')
I get a p-value of 0,2, which indicates nonstationarity more clearly.
So-I'm unsure how to properly use the test in my case.
Any help and ideas?