How to calculate cointegrations of two lists?
Posted
by Damiano
on Stack Overflow
See other posts from Stack Overflow
or by Damiano
Published on 2010-05-24T09:39:09Z
Indexed on
2010/05/24
9:41 UTC
Read the original article
Hit count: 176
Hello everybody!
Thank you in advance for your help!
I have two lists with some stocks prices, example:
a = [10.23, 11.65, 12.36, 12.96]
b = [5.23, 6.10, 8.3, 4.98]
I can calculate the correlation of these two lists, with:
import scipy.stats
scipy.stats.pearsonr(a, b)[0]
But, I didn't found a method to calculate the co-integration of two lists.
Could you give me some advices?
Thank you very much!
© Stack Overflow or respective owner