PAIRS TRADING USING THE RATIO AND CO-INTEGRATION METHOD
What is pairs trading?
A pair’s trade is a trading strategy that involves matching a long position with a short position in two stocks with a high correlation. It is the trading of two stocks as a basket. [Long position -> buying and short position -> selling]
What is co-integration?
Co-integration is a statistical property possessed by two or more time series where they may trend individually but in a particular combination will mean revert.
Objective
To discover if co-integration is useful in determining pairs of stocks for pairs trading.
Data at Hand
Vintages:
- V1: Jan 2017 — May 2018
- V2: Apr 2008 — Mar 2008
Granularity:
Daily closing prices
Data preparation:
- Data was prepared as a time series, with dates as rows and columns as closing prices.
- Stock prices were adjusted for bonuses and stock splits.
Methodology
1. Compute the summary statistics of the data.
▹Minimum price
▹Maximum value
▹Mean value
▹Standard deviation value
2. Correlations among the stocks.
Identify the two highly correlated stocks in the pharmaceutical industry and we found Abbott and Pfizer were highly correlated with a value of 0.917442.
Pairs trading using the ratio method
Steps involved:
▹ Identify two stocks of same industry with high correlation. (Abbott and Pfizer)
▹Calculate the ratio of Abbott/Pfizer. [as a practice numerator should have the higher price stock]
▹ Compute the mean and standard deviation of the ratio over the vintage.
▹ Compute mean ± 2 standard deviation and call it signal.
▹ If signal is, lower than mean make the first purchase of 10 Abbott and 25 Pfizer. This is to ensure that money is, equally split between two stocks.
▹ Continue purchasing stocks in the ratio 2A:5P for every drop in the signal below the previous purchase date. This ensures that you are accumulating stocks of Pfizer and Abbott in the ratio of 2:5.
▹ When the signal crosses mean + 2*standard deviation, sell all the stocks that you have accumulated to date. [Liquidation]
▹ Compute returns [holding period return] and annualized return. Compare these returns with best possible return.
▹ Compute maximum draw-down. [Maximum draw-down is the difference between the highest peak and the lowest trough]
Graphical representation between the closing prices of Abbott and Pfizer
Note: Both stock prices have dropped drastically during the 2008–2009 financial crisis. [Bearish phase]
Note: Both the stocks are trending upwards. [Bull phase]
Scenario 1
★ Method: Ratio method -> Trading on the ratio of Abbott/Pfizer
★ Vintage: Jan 2017 to May 2018
★ Granularity: Daily closing price
Abbott and Pfizer chosen as they have highest correlation.
Scenario 2
★ Method: Ratio method -> Trading on the ratio of Abbott/Pfizer
★ Vintage: Apr 2008 to Mar 2009
★ Granularity: Daily closing price
Abbott and Pfizer chosen as they have highest correlation.
Trading has lost more than buy and hold method.
Pairs trading using the Co-integration method
▹Co-integration identifies Pfizer and Glaxo to be the pair rather than Pfizer and Abbott. It informs that Pfizer and Glaxo are co-integrated.
▹The co-integration equation was given by the analytics team was 1Glaxo+2.65613Pfizer=Signal
Steps involved:
▹Identify the two stocks by the co-integration method. (Glaxo and Pfizer)
▹Using the co-integration equation compute the signal by plugging in prices.
▹Compute the mean and standard deviation for the signal.
▹Find the intervals for mean ± standard deviations. (Std.deviation values 1, 1.5, 2)[Preferable to use the 1.5 and 2 standard deviation intervals.]
▹If signal is, lower than mean make the first purchase of 3 Glaxo and 8 Pfizer. This is to ensure that money is, equally split between two stocks.
▹If the signal touches the value above the maximum range then sell all the stocks.[Liquidation]
Graphical representation between the closing prices of Glaxo and Pfizer
Note: Both stock prices have dropped drastically during the 2008–2009 financial crisis.
Note: Pfizer has remained consistent and Glaxo has increased and dropped at certain periods.
Scenario 3
★ Method: Co-integration method
★ Vintage: Jan 2017 to May 2018
★ Granularity: Daily closing price
Glaxo and Pfizer are identified to have more correlation by the co-integration method.
Scenario 4
★ Method: Ratio method -> Trading on the ratio of Glaxo/Pfizer
★ Vintage: Jan 2017 to May 2018
★ Granularity: Daily closing price
Glaxo and Pfizer chosen as they have highest correlation.
Scenario 5
★ Method: Co-integration method
★ Vintage: Apr 2008 to Mar 2009
★ Granularity: Daily closing price
Glaxo and Pfizer are identified to have more correlation by the co-integration method.
Scenario 6
★ Method: Ratio method -> Trading on the ratio of Glaxo/Pfizer
★ Vintage: Apr 2008 to Mar 2009
★ Granularity: Daily closing price
Glaxo and Pfizer chosen as they have highest correlation.
Conclusion
★ Co-integration was able to identify the pairs other than the more correlated than Abbott and Pfizer.
★ By the above results, we can conclude that the ratio method provided a superior return.
★ Even in the presence of the global financial crisis, where the stocks fell more than 30% in value pairs trading has returned a profit.