This post came about as a result of my own experience and frustration over the past couple of months while I have been developing a pairs trading strategy. After some initial research, I realised that I shouldn’t be looking for ‘correlated’ pairs of instruments to trade, but rather pairs that are ‘cointegrated’.
However the problem I then experienced was that the rationale and knowledge of mathematics that is required to measure cointegration was a very complex subject. Each article I read was filled with words and concepts I was not familiar with and so I was forced to do a significant amount of background reading before I finally felt I understood. Eventually after many late nights of reading, I was finally able to put my new-found knowledge to work in the algorithms of my trading system. I am sure I am not alone with this frustration...
By the way, if you are already a Maths PhD then you might find this article too basic for your purposes, so might want to look elsewhere.
I want to start by being clear about a statement in my introduction. The fact that when pairs trading, it is more important that pairs are selected based on ‘cointegration’ rather than just ‘correlation’. Here is an explanation:
Correlated instruments tend to move in a similar way. If one has an up day, the other will probably have an up day, and vice-versa. However, over time, the price ratio (or spread) between the two instruments might diverge considerably. See the chart of AUDUSD vs NZDUSD below. Clearly these are correlated but notice how the final ratio between the prices is almost 5% different at the end compared with the start.
Cointegrated instruments, don’t necessarily always move in the same direction, although they often will. The spread between the two instruments can on some days increase (and therefore the ratio of prices changes), but the fact that they are cointegrated means that the spread mean reverts and the prices usually find themselves being ‘pulled back together’ to the mean. See the chart of CAC40 vs EuroStoxx50. Although there are also signs of correlation here, pay particular attention to the fact that when the prices do diverge, it is not long before they are pulled back together. These are the visual characteristics of cointegration.
So far we have relied purely on visual identification of cointegration. It is very important that you do not take this approach as part of your trading system. Visual identification is unreliable and cannot provide you with a measure of statistical significance. Rather you must base your pairs trading strategy on statistical methods of calculating the level of cointegration between a pair of instruments. We start to look at how you can do this is Part 2