# Need help on cointegration

I tried to test stock pairs for pairs trading. There are two questions I am not sure.

1. 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?

2. 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?

-
Number 2: it's just a result of spurious correlation. – Clark Henry Sep 14 '14 at 3:45

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 true (type I error). Bonferroni correction is an effective way to address this issue.

-

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.

-