Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Can someone write me a script for testing co-integration between two securities?

Hello, I have a stat-arb portfolio which achieves 0.6 sharpe and close to 0 beta, however I believe the sharpe could be >1 if I simply test co-integration before hedging. As Co-Integration systematically fails for periods of time. Thanks!