# Pairs Trading: What statistics to use for analysis of Cointegration using ADF Test?

I have just begun to study Pairs Trading strategy as a part of my assignment for an internship. My purpose is to analyse any two stocks/commodities for possible co-integration. I made a VBA code where I take the OLS of the data and test the residual of the data for stationarity using the ADF test but I am confused as to what statistics to use for testing the null hypothesis? Till now I am considering the distribution for no drift and no trend since the average of the residual should ideally be zero. The other two options are constant but no trend and constant plus trend. I am using the MacKinnon (1996) one-sided p-values.

Another thing that I would like to know is, how much better is GLS-ADF test against the ADF test, and where can I find the details about the former test, as I couldn't find any resource on this test.

• Are you planning on using cointegration for pairs trading? You don't need cointegration to test for pairs trading. – user46740 Jun 5 '14 at 13:58
• @user46740 if not co-integration then what do I need to identify pairs for this kind of trading? Anyways I would appreciate if you could still help me in figuring out this doubt specific to the ADF test. – shreyans02 Jun 9 '14 at 5:49
• I don't see what the argument of @user46740 is. I think cointegration is the way to go, and pairs trading is a textbook example (e.g. in Tsay "Analysis of Financial Time Series" section 8.8). – Richard Hardy Feb 1 '15 at 12:23

• Choosing the ADF test specification

There are three ADF test specifications:
(1) {no constant, no trend};
(2) {constant, no trend};
(3) {constant, trend}

Which one to choose depends on what you believe the relationship between the two prices should be. For example, if you have the same stock traded on two exchanges using the same currency, you may expect that the two prices should be approximately equal at all times. You would not expect the prices to diverge linearly with time $\rightarrow$ no constant. You would not expect the prices to diverge at a quadratic rate of time $\rightarrow$ no trend. Thus you would choose (1) {no constant, no trend}. There may perhaps be other examples where (2) would be more appropriate, but I cannot think of one right now. I doubt (3) would ever be relevant for pairs trading.

If you do not want to believe in any specification in advance (although (3) really does not seem to fit the pairs trading picture), you could try (3) and see whether the trend component is statistically significant. If it is, stay with (3). If not, try (2). If in (2) the constant is significant, stay with (2). If not, try (1). This and this are related posts with more detailed explanations.