Skip to content
GetProfitable
Search
Dictionary

Cointegration

Two or more non-stationary series that move together so closely that some linear combination of them is stationary. The statistical basis of pairs trading.

Two stocks can each wander like a random-walk and yet their difference stays in a band, because something economic ties them: the same commodity input, the same index membership, a merger arbitrage relationship. That difference is the tradeable object.

Correlation and cointegration are not the same thing. Two series can be 0.9 correlated in daily returns while drifting apart forever in level, which makes a correlation-based pair trade a slow-motion disaster. Cointegration is about the level relationship, correlation is about the co-movement of changes.

Test with adf-test on the residual spread, or with the Johansen procedure for more than two series. Then be sceptical: cointegration found by scanning thousands of pairs is mostly multiple-testing, and even genuine relationships break when the economic link breaks, which is precisely when the spread is widest and the position largest.

Related: spread, hedge-ratio, adf-test, mean-reversion-half-life

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

Bid-ask spread in an order bookSell orders stacked above buy orders with a gap between the best of each.SELLERS (asks)50.0690050.051,40050.0460050.011,10050.002,30049.99800spread = 0.03BUYERS (bids)
The bid-ask spread. Buy orders sit below, sell orders above, and the gap between the best bid (50.01) and best ask (50.04) is the spread you pay to cross. Bar length shows the size resting at each price.

Educational only, not advice. Spotted an error? Post in Site Feedback.