title: how to interpret statsmodels coint results?
body: <p>i am using statsmodels coint but are unsure of what my results are telling me. I am interested in understanding the co-intergration results when i compare a pair of like stocks. I used the below code and i get very different results. Can anyone explain what are considered good/bad results and why?
  I am struggling to get my head around some of the concepts and why do i get very different results when i run the below code - when i use daily adj_close prices compared to using percentage move of adj_close prices? I would expect them to be the same. </p>
  
  <pre><code>from statsmodels.tsa.stattools import coint
  import pandas as pd
  import pandas_datareader.data as web
  import datetime as dt
  
  start = dt.datetime(2013, 1,1)
  end = dt.datetime.today()
  
  intquery1 = web.DataReader(['HEI.DU','HEI.BE'], 'yahoo', start, end) ##&lt;&lt;&lt;&lt;&lt;put start to finish date.
  int1 = intquery1['Adj Close']
  
  print('############THIS cointegration on prices#####################')
  score, pvalue, _ = coint(int1['HEI.DU'], int1['HEI.BE'])
  print ('this is the coint score =',score,'\nthis is the pvalue =', pvalue, 
         '\nthis is the 1% 5% &amp; 10% = ',_)
  
  
  df_normalize = (int1[:] / int1[:].shift(1) - 1).fillna(0)
  
  print('############THIS cointegration on Daily percetage move#####################')
  score, pvalue, _ = coint(df_normalize['HEI.DU'], df_normalize['HEI.BE'])
  print ('this is the coint score =',score,'\nthis is the pvalue =', pvalue, 
         '\nthis is the 1% 5% &amp; 10% = ',_)
  </code></pre>
  
  <p>this is the results i get from the above code using HEI.DU compared to HEI.BE. Why are the results so different and what do they actually mean in the context of these 2 stocks?</p>
  
  <pre><code>############THIS cointegration on prices#####################
  this is the coint score = 0 
  this is the pvalue = 0.985900258026 
  this is the 1% 5% &amp; 10% =  [-3.90485841 -3.34081967 -3.04770405]
  ############THIS cointegration on Daily percetage move#####################
  this is the coint score = -7.88182772484 
  this is the pvalue = 5.97585656581e-11 
  this is the 1% 5% &amp; 10% =  [-3.90485841 -3.34081967 -3.04770405]
  /home/ross/anaconda3/lib/python3.6/site-packages/numpy/linalg/linalg.py:1574: RuntimeWarning: invalid value encountered in greater
    return (S &gt; tol).sum(axis=-1)
  /home/ross/anaconda3/lib/python3.6/site-packages/statsmodels/tsa/stattools.py:1018: UserWarning: y0 and y1 are perfectly colinear.  Cointegration test is not reliable in this case.
    warnings.warn("y0 and y1 are perfectly colinear.  Cointegration test "
  </code></pre>