Cointegration and Stationarity in Finance
A series of articles on using cointegration in a pairs trading system - Part 1 of 3
- Martyn Tinsley
- /
-
Abstract:
- Cointegration and stationarity explained within the context of a financial pairs trading strategy. We demystify the process in plain English
Introduction
This article was born out of a deep-dive research phase into pairs trading strategies. While many traders begin by looking for ‘correlated’ instruments, it quickly becomes evident to the quantitative researcher that the true objective is identifying ‘cointegrated’ pairs.
The challenge, however, is that the mathematical foundation required to master cointegration is often presented in an unnecessarily opaque manner. In my own work developing these algorithms, I found the existing literature to be saturated with academic jargon that obscures practical application. After deconstructing these concepts and successfully integrating them into my own trading systems, I realized there was a need for a resource that explains these principles with both technical depth and clarity.
I have written this piece as the definitive guide I wish had existed—a single source that answers the "how" and "why" of cointegration from first principles. While I have distilled the complexity to make it as accessible as possible, the subject remains inherently rigorous; a solid mathematical footing is required to get the most out of this framework. (Note: If you already hold a PhD in Mathematics, you may find this foundational approach too elementary for your needs.)
Cointegration versus Correlation
To establish a firm starting point: when designing a robust pairs trading strategy, filtering your universe based on ‘cointegration’ is significantly more reliable than relying on simple correlation. Here is the technical breakdown of why that is:
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.
It is cointegration, as opposed to correlation that provides the optimal conditions for pairs arbitrage trading. Using the cointegration chart above, it can be seen visually that if the CAC40 (blue line) is above the EuroStoxx50 (orange line), a trading opportunity might be to short the CAC40 at the same time as going long on the EuroStoxx50 until a time that the spread between them reverts back to the mean.
It is cointegration, as opposed to correlation that provides the optimal conditions for pairs arbitrage trading.
In the next article...
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
