Pairs trading is a form of mean reversion that has a distinct advantage of always being hedged against market movements. It is generally a high alpha strategy when backed up by some rigorous statistics. This notebook runs through the following concepts
- What is cointegration?
- How to test for cointegration?
- What is pairs trading?
- How to find cointegrated pairs?
- How to generate a tradeable signal?
The notebook is intended to be an introduction to the concept, and whereas this notebook only features one pair, you would probably want your algorithm to consider many pairs at once.
Please find all the lectures here: https://www.quantopian.com/lectures
The notebook was originally created for a presentation at Harvard’s Applied CS department and has since been used at Stanford, Cornell, and several other venues. If you’re interested in learning more about how Quantopian is being used as a teaching tool at top universities, please contact me at [email protected]