Introduction to Pairs Trading

11 downloads 229 Views 169KB Size Report
Pairs trading, also known as statistical arbitrage is used as a trading strategy to ... The following example is used an illustration for the trading strategy above. 25.
Introduction to Pairs Trading Pairs trading, also known as statistical arbitrage is used as a trading strategy to profit from diverging prices between 2 asset classes, which has similar price movements. When the price movements of 2 asset classes are almost identical, we classify them to be highly correlated. When prices diverge in the short run, prices are highly likely to return to normality to follow the same pattern in the future. This creates trading opportunities for traders to capture with the assumption that the asset classes will revert to a pattern. Such phenomenon is known as “mean reversion”, which I will further explain later. Traders use pairs trading strategies because the idea is simple and the traits to look for are minimal. It may sound fool proof to you but it is crucial to highlight that deviations may be caused by macroeconomic factors, which generally distorts chart patterns and renders the trading strategy invalid. Pairs trading was developed by a quantitative group at Morgan Stanley during the 1980s, who reportedly made over US$50 million for the firm in 1987. In statistics, pairs trading uses the concept of stationarity. When a price movement is stationary, the mean and variance are constant. Therefore, if there are deviations away from the mean, reversion of prices will occur towards the mean. Steps to conduct a pairs trade Choose a pair to trade on Choosing a pair to trade on is, by no means, coincidental as mentioned in the name of this trading strategy. There are various questions you may ask yourself: “Do they need to be in the same industry?” “Should they be only liquid stocks?”. In pairs trading, there is no hard and fuss rule as to how you choose your pairs. Most importantly, traders look for asset classes whose price movements are similar i.e they move together. In addition, traders may want to restrict their pairs to be under the same broad industry categories to minimize risk from macroeconomic influences. Broad industry categories include Utilities, Transportation, Financial and Industrials. In fact, it is often much easier to find pairs within the same industry. These are the common pairs that potentially correlated: Coca Cola & Pepsi, Walmart & Target Corporation and Exxon Mobil & Chevron Corporation. For example, I have identified the following asset class pair, which has similar price movements. This is Coca-Cola (NYSE: KO) and Pepsi (NYSE: PEP) in a 1 year chart. In this case, I took the price of Pepsi and divide it by a factor of 1.5 for better comparison. Sometimes, you do get 2 asset classes which are extremely far in magnitude, i.e $0.01 and $100, therefore, for better comparison of charts, we shift both charts closer to one another for analysis.

55 50 45 40 KO 35

PEP

30 25

The important point here is that the absolute prices do not matter. Here, we are trying to analyse the similarities of price movements. By looking at similar price movements, we are analysing the correlation graphically. To further check if the pair are fit for pairs trading, we have to test statistically if the two asset classes are co-integrated. There are plenty of ways to do this: informal methods (residual analysis) or formal methods (Cointegrating Regression Durbin Watson Test or Cointegrating Regression Dickey Fuller Test). Formal methods require additional add-ons in Excel which may not be feasible for individuals. As a result, residual analysis will suffice if you are interested in exploring this method. With the historical prices of the two asset classes, run a regression between both data. For instance, use KO as a y-variable and PEP as a x-variable in your regression analysis. There is no fixed rule as to which asset class should be used for the x or y variable. More importantly, we want to focus on the residuals. After running the regression, plot the residuals over time and determine if there is a relatively constant mean and constant variance. Ask for yourself the following: “Are the residuals fluctuating around some constant number?” “Are the fluctuations relatively constant?” If the answer to the latter is yes, then the pair is cointegrated and can be used for pairs trading. Pairs Trading with Charts Now that we have established a pair, which has similar price movements, the trading principle is simple – trade against the current trend if both asset classes diverge from each other. The following example is used an illustration for the trading strategy above.

Here, we have asset blue and red, which are assumed to be co-integrated. In general, we can see that the blue asset follows closely to the red asset in terms of price movements. Traders have to be alert and not overlook trading opportunities. We see the blue asset converging too much into the red asset and based on mean reversion theory, we predict that either the blue will increase and/or the red will decrease. This leads us to the following 2 trades: Long blue & Short red, in expecting the gap between to open up. As the future prices unfold, we see that we made a profit off the blue and loss on the red. Close the position once market neutral is established i.e similar price movements return to normal. Technically, if you decide to hold your positions after market neutral is established, you will still be at a profit because you have positions for both sides of the price movements. Pairs Trading with Regression Analysis Many will question on the amount of each asset classes to purchase and seek for the presence of a signal, which can substantiate their trading action. After all, humans are rational and act only if there are grounds to do so. Before you start on regression, you will need the following: 1) historical prices of each asset class 2) excel or similar programs that can run regression. Historical prices are easily found in Google Finance or Yahoo Finance sites. I will illustrate the following example using Stock Y and Stock X. The first step, as mentioned before, is to run a regression between Stock Y and X. You can run Y with X to get an equation Y  b  b X  e or X with T to get X  b  b Y  e . For my explanation, I am using Y with X as an example. The second step is to take the actual Y data minus off b ∗ actual X to get what I call a shifted error term. We are essentially tweaking the regression on top to becomeY  b X  shifted e . The b is insignificant in our analysis as it is a constant number that will only shift the errors up or down. The crucial factor here is that the error must have a constant mean

and variance, which was mentioned in part (a) that the condition has to be fulfilling in choosing a pair. The shifted error can be imagined The third step is to determine the mean and standard deviation of the errors. In excel, the functions are =mean and =stdev. Standard deviation measures the variability of the error term. Based on your risk adversity, you can set then number of standard deviations for the error to reach before taking a trading action. The following example will better illustrate what I have explained previously.

Pairs Trading Example: Y and X 200.00 100.00 0.00 -100.00 -200.00 -300.00 -400.00

Remember, the equation here is Y  b X  shifted e . Here, the pink solid line is the mean and the 2 dotted lines are ±2 standard deviations. Therefore, when shifted e is moving towards +2 standard deviation, the 2 price curves are diverging (moving away from each other). This causes the gap between to widen therefore, a pairs trader will want to take a Short Y and Long X position. To be more specific, we short 1 unit of Y and b units of X. We do this because using the coefficients from the regression equation allows us to profit statistically from shifted e . It is important to note that deciding on your own number of units may result in a loss even though the prices did return to normality. When the shifted e is moving towards the -2 standard deviation region, prices are converging (moving towards each other). This causes the gap to narrow and the appropriate trading strategy is to long 1 unit of Y and short b units of X.

Disadvantages of Pairs Trading The first step in picking a pair is often the hardest because there are too many asset classes to look at. The chance of finding a pair alone is often derived by luck. Pairs trading may not work out as price changes can arise from fundamental changes in the macro economy or the industry. A general rule of thumb is to avoid holding positions for excessive periods of time. What constitutes excess time is dependent on how much you are willing to risk. If the two curves are truly cointegrated, prices will eventually return to

normality. However, traders may not have enough funds to sustain the fluctuations prior to making a profit. Individuals are slightly disadvantaged in pairs trading, as they often do not possess the required technology to gain an edge in the market. Pairs trading require the constant updating of latest closing prices. After which, the statistics have to be recalculated again to manage positions in the market. Also, deviations from normality may occur during the day and the presence of computer macros can relieve the need for constant monitoring of the markets.

Conclusion This is basically how pairs trading work. There are many variations of pairs trading out there, some work based on price ratios eg. Price of Y / Price of X and some of them use mathematical derivatives that you may not have seen in your life. The above-mentioned way provides you with a good overview of how pairs trading work and perhaps, this can be a stepping stone to understand other pairs trading variations out there. Since historical prices are widely available online, traders have made use of computer tools to quantify the similarity between two price curves. If you are interested in this, you can read on Spearman’s rank-order correlation and how it is used in pairs trading.

Zhang Zhihua

This research material has been prepared by NUS Invest. NUS Invest specifically prohibits the redistribution of this material in whole or in part without the written permission of NUS Invest. The research officer(s) primarily responsible for the content of this research material, in whole or in part, certifies that their views are accurately expressed and they will not receive direct or indirect compensation in exchange for expressing specific recommendations or views in this research material. Whilst we have taken all reasonable care to ensure that the information contained in this publication is not untrue or misleading at the time of publication, we cannot guarantee its accuracy or completeness, and you should not act on it without first independently verifying its contents. Any opinion or estimate contained in this report is subject to change without notice. We have not given any consideration to and we have not made any investigation of the investment objectives, financial situation or particular needs of the recipient or any class of persons, and accordingly, no warranty whatsoever is given and no liability whatsoever is accepted for any loss arising whether directly or indirectly as a result of the recipient or any class of persons acting on such information or opinion or estimate. You may wish to seek advice from a financial adviser regarding the suitability of the securities mentioned herein, taking into consideration your investment objectives, financial situation or particular needs, before making a commitment to invest in the securities. This report is published solely for information purposes, it does not constitute an advertisement and is not to be construed as a solicitation or an offer to buy or sell any securities or related financial instruments. No representation or warranty, either expressed or implied, is provided in relation to the accuracy, completeness or reliability of the information contained herein. The research material should not be regarded by recipients as a substitute for the exercise of their own judgement. Any opinions expressed in this research material are subject to change without notice. ©2013 NUS Invest