ADF and Johansen Tests for Cointegration in Pairs Trading
Summary
This discussion compares the Engle–Granger approach, which regresses one series on another and tests the residual portfolio for stationarity, with the Johansen method, which can test several series together and identify multiple cointegrating relationships. The two methods need not agree: the regression-based test depends on which asset is treated as the dependent variable, while Johansen’s eigenvector approach is independent of input ordering. Testing both regression directions may reveal different candidate hedge ratios.
The replies also explain why a statistically significant pair can look economically implausible. Screening many pairs increases the chance of false positives, so multiple-testing corrections such as Bonferroni are suggested. The discussion does not provide a worked comparison, detailed test assumptions, or guidance on selecting lag lengths and deterministic terms. A cointegration result alone also does not establish that a pair is suitable for trading or hedges short-term market risk.
Key ideas
- The Engle–Granger residual test estimates a hedge ratio through regression before testing for stationarity.
- Its result can change when the two assets switch regression roles.
- Johansen’s method can handle multiple series and derives candidate relationships through eigenvectors.
- Testing many pairs raises the probability of false statistical discoveries.
- Multiple-testing corrections can reduce false positives, but do not establish trading value.
Tags
Full text
# Need help on cointegration # Need help on cointegration I tried to test stock pairs for pairs trading. There are two questions I am not sure. - I am not using ADF to test the log difference between two stocks. But I also see people using Johansen test. What's the difference? Should they in general output same results? What are the disadvantages for each test? - When using ADF test, I found that some pairs just don't make sense. Like the other post I saw on this site saying they found cointegration significant between hog futures and MSFT. For me, it's more like finding cointegration significant while the correlation is negative and so the hedging ratio is negative. For trading this kind of pairs, the shorted leg essentially don't provide any hedging for market risk at least in short term. So why do I get these results? ## Answer by Simon (score 4) https://quant.stackexchange.com/a/14727 1. There are a few differences between Cointegrated ADF test and Johansen test. First of all, the former is only suitable for a pair of two time series, while the latter is also applicable for cointegration test of any number of series. Secondly, ADF test will suggest different test results when we switch the sequence of the inputs, while Johansen test is order independent as the latter is based on the eigenvector decomposition. Specifically, When performing Cointegrated ADF test, it first determines the optimal hedge ratio by running a linear regression between the two price series, use this hedge ratio to form a portfolio, and then finally run a stationarity test on this portfolio of price series. Therefore, using asset A as independent variable and asset B as dependent variable will likely to yield different results as the opposite case. Usually, only one hedge ratio among the two test cases can lead to a stationary portfolio, and one may need to run ADF test for both cases in order to find all possible hedge ratios. For the case of Johansen test, all the hedge ratios that can potentially lead to stationary portfolio for the $n$ assets are found all at once, which are the eigenvectors of the coefficient matrix. 2. It's normal to find conintegration pairs that are demonstrating false statistical significance. Especially, if you pull out a big universe of assets, and then performing pair-wise conintegration tests. By testing too many hypothesis, we also increase the likelihood of witnessing a rare event, and therefore, the chance to reject the null hypotheses when it's actually true (type I error). Bonferroni correction is an effective way to address this issue. ## Answer by James (score 1) https://quant.stackexchange.com/a/14720 I can answer 2). It's either because you did something wrong with ADF test (it's impossible to say without knowing what exactly you did) or because you tested too many pairs w/o adjusting for multiplicity. The well-known paper of White is a good into into the issue.
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.