# What is the intuition behind cointegration?

What is the intuition behind cointegration? What does the Dickey-Fuller test do to test for it? Ideally, a non-technical explanation would be appreciated.

Say you need to explain it to an investor and justify why your pairs trading strategy should make him rich!

-

## 5 Answers

The standard story (also told by @vonjd) is of "The Drunk and Her Dog". This is based on "A Drunk and Her Dog: An Illustration of Cointegration and Error Correction" (1994). The story is itself based on the standard illustration for a random walk known as the "drunkard's walk".

The Dickey-Fuller test is used to check for a unit root. It can be used as part of the general Engle-Granger two-step method (although it isn't he only option). In this case, while the two assets themselves are not be stationary, you are looking to see if the residuals between a regression of the two assets is stationary. Most people prefer another approach, the Johansen test, which uses a VECM model.

The intuition behind pairs trading is that two cointegrated instruments will follow the same long-run path (since they presumably have some common factor, such as they are both oil companies and are heavily influenced by the price of oil), and any deviations will ultimately return back to the mean. Needless to say, pairs trading (or any other form of statistical arbitrage) is still a risky endeavor, as should be clear by the performance of arbitrage funds.

-

Nice.... What about an intuition for multiple time series and simultaneous cointegration? – user40 Feb 7 '11 at 16:27
+1: I didn't know this article - thank you for the link! – vonjd Feb 7 '11 at 16:32
– RockScience Jan 2 '12 at 7:28

This one is quite easy: Think of a man walking his dog. He will go along and his dog will stroll along running back and forth. Man and dog are mathematically "cointegrated".

As an investor you bet that the dog is coming back to his master or that the leash has only a certain length.

-
Okay... Maybe little bit more technical please! Does it mean that in cointegration one is concerned about the difference between two price time-series? – user40 Feb 7 '11 at 16:23

5
I find it unfair to downvote this answer. It was asked to give a non-technical explanation! This one an investor will understand! The same association came Shane to mind... – vonjd Feb 7 '11 at 16:27

2
I agree completely and gave you a +1. Your answer was spot on for the question. – Shane Feb 7 '11 at 16:29

1
This is really fantastic. – Jase Dec 28 '12 at 16:35

Two time series $X_1$ and $X_2$ are cointegrated if a linear combination $aX_1+bX_2$ is stationary i.e. it has constant mean, standard deviation and autocorrelation function for some $a$ and $b$. In other words, the two series never stray very far from one another. Cointegration might provide a more robust measure of the linkage between two financial quantities than correlation which is very unstable in practice.

I have borrowed the following two examples from Willmot's Frequently Asked Questions in Quantitative Finance, one may be typical for a hedge fund trader and another illustrates the job of a mutual fund manager.

A. Suppose you have two stocks $S_1$ and $S_2$ and you find that $S_1 − 3 S_2$ is stationary, so that this combination never strays too far from its mean. If one day this ‘spread’ is particularly large then you would have sound statistical reasons for thinking the spread might shortly reduce, giving you a possible source of statistical arbitrage profit. This can be the basis for pairs trading.

B. Suppose we find that the S&P500 index is cointegrated with a portfolio of 15 stocks. We can then use these fifteen stocks to track the index. The error in this tracking portfolio will have constant mean and standard deviation, so should not wander too far from its average. This is clearly easier than using all 500 stocks for the tracking (when, of course, the tracking error would be zero).

-

The somewhat tongue-in-cheek blog post http://www.portfolioprobe.com/2010/10/18/american-tv-does-cointegration/ includes the example of two classes of shares on the same company.

In this case you have two assets that are essentially the same but with a few details different. The buying and selling of these assets will make the prices fluctuate from each other. However they are unlikely to stray too far from each other because there will be arbitrageurs that will bring the prices back together. Arbitrage is the leash in the human-canine analogy.

But there is a difference between cointegration and high correlation. I'm guessing that a lot of pairs trading based on "cointegration" is actually based on high correlation. The difference is risk: if two assets are truly cointegrated, then they will eventually snap back towards each other; two assets that have a history of high correlation need not snap back together.

-

Here is an empirical strategy to test for cointegration.

FIRST, check whether both $X_t$ and $Y_t$ contain an unit root.

• If they are both stationary then model $Y_t$ or $X_t$ in levels (and nothing is wrong).
• If one of the two is $I(1)$ (non-stationary for one level), then take differences to ensure stationarity.
• If they are both non-stationary, and hence $I(1)$, then test for co-integration:

1. if the residuals are $I(0)$, then we speak of the presence of cointegration. Estimate then an ECM model ($Y_t = \beta_0 + \beta_1 X_t + \eta_t$ obtaining $\hat{\beta_0}$ and $\hat{\beta_1}$ and using it in: $\Delta Y_t = \Delta X_t'\phi - \psi(Y_{t-1}-\hat{\beta_0} - \hat{\beta_1}X_t) + \varepsilon_t$. When $\varepsilon_t \sim N(0,1)$ then both $\psi$ and $\phi$ are asymptotically valid.
2. if the residuals are $I(1)$ then we speak of spurious regression. In that case you should model both variables by taking the first differences.
-

– chrisaycock♦ Apr 13 '12 at 2:33
that is true, but I think that the strategy is useful in answering (for a part) the two questions right? – JohnAndrews Apr 13 '12 at 2:36
– chrisaycock♦ Apr 13 '12 at 2:49
ok, I will try to customize my answers more in the following... – JohnAndrews Apr 13 '12 at 2:51
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 23, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9477694034576416, "perplexity_flag": "middle"}