Last update on .

Understanding the difference between correlation and cointegration is critical if you intend to pair trade stocks. Not knowing the difference is a sure fire way to mount up losses in your account.

This article is the second installment of a multi part series covering pair trading. We encourage you to read the first article here before continuing with this one. Each article builds on knowledge learnt in the prior one.

Also, If you aren't already familiar with the concept of stock correlation, please read through this article before continuing with this one. To summarize stock correlation briefly, it is a statistic that quantifies the tendency of two stocks to move in relation to each other.

Pair Trading - What makes a good pair?

In pair trading, we are looking at trading the spread between the prices of two stocks. In other words if one stock has been very strong recently and another has been very weak, that means the spread between the two stocks has widened. A pair trade would involve buying the weaker stock and shorting the stronger one.

It should come as no surprise that you can't simply choose any two stocks for a pair trade. You need to have some level of confidence that if the spread widens between two stocks, it will narrow once again.

There are two requirements that need to be met in order for two stocks to be combined in a pair trade:

  • Fundamental Connection: The stocks need to have a reason to move together that makes logical sense. For example, perhaps there are two companies that operate in the same industry with a large degree of overlap between their businesses. Perhaps there are two ETF's that track similar underlying components. Perhaps a single company has stock listed on more than one exchange or has an A-Class and B-Class of shares listed.
  • Cointegrated: The two stocks have been statistically shown to be cointegrated.

What is Cointegration?

Cointegration can best be described using the common explanation of a drunk man walking home with his dog. As the drunk man leaves the bar he clips a leash onto his dog's collar so they can walk home together. Since the man is drunk, he walks in random directions. During this time the dog is free to walk only so far as the length of the leash will allow. The man and the dog can be said to be cointegrated.

In terms of two stocks, they are said to be cointegrated if some linear combination of the stocks varies around a mean. In simpler terms, the stocks don't wander off in different directions for very long before reverting back to their typical spread. Said one last way, the spread between the stocks does not widen indefinitely, but rather reaches an extreme before narrowing once again.

The below chart illustrates this concept. As you can see the spread tends to hover around the two yellow lines. There are 3 notable times when it widens significantly, but after a short period of time it narrows once again.

How is this different from Correlation?

Correlation measures the extent to which two stocks move in relation to each other:

  • If Stock A always moves up when Stock B moves up then the stocks have a perfectly positive correlation.
  • If Stock A always moves down when Stock B moves up then the stocks have a perfectly negative correlation.

Notice that there is no mention of the spread between the two. It is simply a case of - do the stocks move in the same or different directions simultaneously.

The following chart is of two hypothetical stocks that are perfectly correlated:

Both stocks are always moving in the same direction which means they have a perfect positive correlation. However, notice how the spread between the stocks continues to widen. The stocks never reach a point where their prices narrow back towards each other. This is the key difference between correlation and cointegration.

If we were to use correlation for our pair trading analysis we may think that the above pair would be an excellent choice. We would go ahead and short the stronger stock and buy the weaker stock. Unfortunately, the spread between the two never narrows and we would continue losing money.

The above scenario is why we focus on cointegration when dealing with pair trading. The aim is to trade stocks whose spreads revert to a mean, thus allowing us to short the one and buy the other resulting in a profit.

Common Misperception

It is alarming how often people talk about correlation in the context of pair trading with no reference to cointegration. Many popular financial websites and financial media channels talk about pair trading highly correlated stocks. This is dangerous and misinformed.

Correlation and cointegration are both powerful tools to use in your trading, but it is important that you use them where appropriate and in the right context.

Final Thoughts

Pair trading has long been a popular strategy used in hedge funds, trading firms and quant algorithms. With an understanding of cointegration along with the other topics that will be discussed in this series, you will have the knowledge, strategies and tools required to add pair trading to your arsenal.

Our pair trading tool performs all of the required statistical analysis for you on any pair of stocks, presenting the resulting charts and stats in an intuitive format. After identifying viable pair trading candidates, you can save them to your watch list which will automatically update all the relevant stats on a daily basis. You simply wait until an entry or exit signal occurs before taking action.

Stay Informed

Stay informed by joining our mailing list where you'll receive strategy, diversification and educational articles to help maximize your profit in the stock market while minimizing your risk.


DiversifyPortfolio does not make trading or investing recommendations. This article, as well as all the content and analysis tools on DiversifyPortfolio are published as a research and informational service. Please refer to our Disclaimer.


Comments are closed.