Using Cointegration for Pairs Trading and Portfolio Forecasting
Summary
The document outlines several ways cointegration can inform trading and portfolio analysis. For two traded securities, a stable long-run relationship can motivate a pairs strategy: estimate the relationship, monitor the spread, and take opposing positions when it moves beyond chosen thresholds, expecting it to move back toward its usual level. Selecting entry and exit thresholds remains a key challenge.
Cointegration alone does not establish that a relationship is tradable. If one series is a macroeconomic indicator or another unavailable asset, the trader cannot directly buy or sell the residual portfolio and may instead trade a security relative to economic conditions, with exposure to macroeconomic trends and jumps. A further proposal fits a vector autoregression in levels, forecasts the joint distribution of future prices, and uses that distribution in portfolio optimization, including cases with an untraded variable. The discussion gives conceptual examples but no performance evidence or implementation details.
Key ideas
- Cointegration describes a long-run relationship among time series and can support spread-based pairs trading when the instruments are tradable.
- A basic pairs approach takes opposite positions when the spread crosses selected thresholds.
- A cointegrated relationship does not by itself guarantee a practical trade, especially when one variable cannot be traded.
- Forecasts from a vector autoregression in levels can inform portfolio optimization using the joint distribution of future prices.
Tags
Full text
# What are the applications of cointegration?
# What are the applications of cointegration?
We have had several posts on cointegration, and I must admit that I have only seen them mentioned here and there but I have no real experience using this concept.
My question is pretty simple: how do you use cointegration to create strategies?
In other words, in what fields are you using this concept?
## Answer by lehalle (score 9, accepted)
https://quant.stackexchange.com/a/3280
Be careful: even if you have two processes $A_t$ and $B_t$ that you find to be cointegrated (ie as explained upper you have a linear combination of $A$ and $B$ that is iid), it does not mean that you can trade it.
It means that if you identified two parameters $\theta_A$ and $\theta_B$ such that $$C_t:=\theta_A A_t + \theta_B B_t \sim {\cal N}(0,v)$$
you can buy the residuals ($\epsilon_t = \theta_A A_t + \theta_B B_t - C_t$) of the regression against $C_t$ when they are cheap and sell them high, but only if you can trade it.
For instance, if $A$ is a stock or a future and $B$ is a macroeconomic indicator, you will not be able to buy and sell $B$. Some people nevertheless try to trade the cointegration just using $A$, because $C_t$ is cheap means cheap with respect to current economic conditions and because the macro variables are changing slower than stock prices, but they are exposed to macro trends or jumps.
## Answer by Piroinno (score 9)
https://quant.stackexchange.com/a/3272
Co-integration is a measure / indicator of the long running relationship between 2 or more time series. A short answer to how you can use it, is the pairs trading strategy or in Econometrics can be used to formulate a regression. using the classic example, you can use 2 stocks like Coke (C) and Pepsi (P) (or commodities such as Gold and Silver) in a pairs trading strategy. Your strategy will involve first finding out if the stocks are co-integrated; if they are then you will need to have a strat like: - If the spread (C - P) > threshold then sell C and buy P - If the spread (C - P) < threshold then buy C and sell P The idea here is that if the spread widens say C increases then eventually P will also increase or C will eventually revert to some long running value. The key challenge here is to determine when the spread is at its optimal value, so that you know when to enter / exit the trade Very quick and basic, there are tons of info on this strat on the web.
## Answer by John (score 3)
https://quant.stackexchange.com/a/3400
If you fit a VAR(p) model to two or more securities in levels, then it will incorporate the cointegration effects. If you project this to the horizon and convert back into security prices, then you will be able to calculate the distribution of profits at the horizon. In this sense you could then perform a traditional optimization. This is useful in the case where one of the variables in the VAR(p) model is not traded. In this case, when the variable is cheap, you would only purchase it if it has favorable properties from perspective of the whole portfolio, rather than just individually.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.