I am trying to find cointegrated stocks in S&P 500. I have data on all the 500 S&P stocks from 2000 to 2021 which includes multiple structural breaks.
I am doing the analysis in R.
Currently I use "strucchange" package to find breakpoints and then Johansen Test to find cointegrated pairs during the last stable period(ie. period after the last structural break). I tested the cointegrated pairs for relationship during other stable periods and couldn't find most of the pairs.
This lead me to think
- The approach I used may not be appropriate
- Or the approach is appropriate and the pairs are not cointegrated.
I want to know which of the above is true.
I also wanted to check if there is any other testing method in R which I can use to check for cointegrated relationship that factors in multiple structural breaks.
P.S I am not sure if this question must be posted here or in stackoverflow. Apologies if I posted it in the wrong place.