Hi there:
I am currently taking the "Mean Reversion Strategies In Python " course, ehere cointegration is discussed… But I wonder… How do I find cointegrated stocks??,
I mean how do you spot a pair of stocks so that one raises whe the other falls and vice-versa??
Thanks
Hi Ghery,
You can check whether two stocks are cointegrated or not using the ADF or Johansen test. These tests are covered in section 3, 7 and 9 of the 'mean reversion strategies in Python' course.
Hope that helps!
thanks a lor
Hi,
You can first do a qualitative analysis of the stocks. One way to go about it is to create buckets based on market capitalization, sector, daily traded volume etc.
For example, you classified stocks as telecom, pharma, IT etc.
Let's say you segregated stocks into 5 groups, each consisting of 20 stocks. The next step would be to check for correlation between the stocks in each group.
You can keep only those stocks that are highly positively correlated, say a correlation of more than 0.8 in each group. It is important to note here that correlation is not the necessary criterion of pairs trading. It is done to make the number of potential pairs manageable. You can then run an ADF or Johansen test to select the stock pairs that are cointegrated with a significance level greater than 90%.
Hope this helps.