behaviour of statsmodels.tsa.stattools.coint()

261 views
Skip to first unread message

Stephan

unread,
Jul 21, 2015, 12:45:21 PM7/21/15
to pystat...@googlegroups.com
I run the above function with adjusted Close data from yahoo finance.

First run:

results = sm.tsa.stattools.coint(values1, values2, regression="c")

I obtained results[1] = 1

Second run:

results = sm.tsa.stattools.coint(values2, values1, regression="c")

I obtained results[1] = 0


This is totally unexpected, since I would expect p-values (results[1]) being the same for both runs,
because the data are eigther cointegrated or not.


The data I used:

Adjusted Closes from yahoo finance

symbol1='GLJ.DE'

symbol2='DB1.DE'

startdate = datetime.datetime(1990, 1, 1)

enddate = datetime.datetime(2015, 7, 1)


Is there any explanation for this test - behaviour?

josef...@gmail.com

unread,
Jul 21, 2015, 1:20:29 PM7/21/15
to pystatsmodels
I assume it's a bug.
There is a reason that coint is not in the api and not in the docs. 

I don't trust it at all, but I never figured out whether the pvalues from the tables for the different options are correct or not.


Josef
Reply all
Reply to author
Forward
0 new messages