PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By...

17
PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily indicative of future results. You can share this ebook with anyone you want, by email, carrier pigeon, going back in time and printing with on the Steve Gutenburg press, Facebook, The Twitter, etc. Just don’t charge for it and don’t say that you wrote it.

Transcript of PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By...

Page 1: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

PAIRS TRADING (just an introduction)

By Rob Booker

Trading involves substantial risk of loss. Past performance is not necessarily indicative of future results. You can share this ebook with anyone you want, by email, carrier pigeon, going back in time and

printing with on the Steve Gutenburg press, Facebook, The Twitter, etc. Just don’t charge for it and don’t say that you wrote it.

Page 2: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

PAIRS TRADING PART ONE

With pairs trading, you buy one stock and sell another. They’re in the same sector.   They do the same thing. Oil. Car manufacturing. Drugs. Ahhh, drugs. Whoops, lost my train of thought. Gambling. Retail. You get the idea.  Take a look at the chart below.  

 Fig.1: Macys vs. Dicks 

  

Page 3: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

In Fig. 1, I’ve charted two retail stocks. I’ve charted them without the usual price bars or candles. I’m using a histogram.  Dicks has been losing value over the same period of time that Macy’s has been gaining value. This was in October of 2014.  Because these are both retail stocks, we would expect them to “meet in the middle.” Or, if not in the middle, we would expect one of the following to happen:  1. Dicks would begin to rise, and it would do it faster than Macy’s would do it, or Macy’s would just stay in place.  

2. Macy’s would begin to fall, and it would do it faster than Dick’s would do it, or Dick’s would stay in the same place. 

 Either way, you make money if this happens.   Of course, they could continue to diverge away from each other. That would suck.   Does this work? I have no idea. I’ve never traded it. I have no desire to trade this strategy.  

Page 4: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

I can think of a bunch of stuff, however, that you would want to know before you did this:  Stuff you would want to know before you did this:  First:  You would want to know if these stocks are generally correlated. Do they move together almost all the time? Do they have a similar P/E? Are they in the same sector/industry? NOTE: I don’t care if the stocks are priced the same, or even near each other ­ that doesn’t matter.  Second:  You want to pick a time frame to watch the two stocks, and their correlations. You might pick a daily chart ­ this would show you the BIG correlations, the BIG un­correlations. Or you could pick the very short term charts, like a 10 minute chart, showing very small price correlations and divergences.   Some pairs traders will look for a massive “uncorrelation” to begin, on a longer term chart, and then look for a lack of correlation on a shorter time frame chart to take the trade. 

Page 5: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

Now, on that same chart (whichever you pick) you will want to know how far they usually move apart. Do they move apart by 4%? What’s the outer edge of where they move apart?  (That’s where you might want to start taking a trade).  To find this information, you should pull up a chart and add two symbols to the chart. You can do this in TradingView.com by simply right­clicking on a chart and choose “compare or add symbol” right here:  

  We’ll dive into more detail on doing this in a moment. There are a lot of ways to compare two stocks (or any financial instrument) against each other.  Third:  What’s the worst this ever got? How far have these two financial instruments diverged away from each other? Ask, “Am I testing a new 

Page 6: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

correlation that no one ever trades?” For example, if you choose Visa (V) and Mastercard (MA), you are choosing two very similar companies. If you choose Ford (F) and Telsa (TSLA) you are choosing two companies that only seem to be doing the same kind of thing.  What happens if one of the two stocks declares bankruptcy? Has that happened in the past with these stocks? Are these stocks susceptible to wild gyrations in price? Affected by regulations? Ask as many questions as you can.  Fourth:  Can you buy an option on the stock market index to protect yourself if everything goes nuts? Maybe you could buy an option that pays out if market volatility goes way up (which might cause your trade to break down even farther). For instance, what if the stock market just goes nuts in a 10% drop in one day, and the weak stock that you bought falls SUPER FAST, and way farther than your stronger stock, and you start losing tons of money?  We’ll come back to these questions later. For now, look at the example below.  

Page 7: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

 Fig.2: A Pairs trade 

 In June of 2014, Macy’s (M) had climbed 10% (over the a recent period of time).   But over that same period of time, Dick’s (DKS) had fallen 16%. That’s a difference of (please forgive me in advance, I’m not great at math) … 6%. It looks to me, when studying about 10 years of price history on these two stocks, that they don’t like to get more than 6% away from each other.  M was trading at $60. DKS at $44.50. They hovered around these prices, within a range of about $1, for a few days. 

Page 8: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

 We decide to sell short 100 shares of M at $60. We simultaneously buy 136 shares of DKS. (So we’re committing $6,000 in capital to both sides of the trade ­ more on this in a moment).   Then, a month later (WHAT!!?  I have to wait a month for this to pay off??!) … DKS has risen to $46.50 and I close out that buy trade. I’ve made $2.50 per share, times 136 shares, for a credit of $340.   I close out my short position on M, for a .50 gain. That’s a $50 win (100 shares, times .50). I’ve made $390.  But there are all kinds of problems with this strategy.  All kinds of problems with this strategy  What if DKS declares bankruptcy? Lots of traders got margin called when GM declared bankruptcy. They were pairs trading with Ford (F) and they had sold Ford and bought GM. You can look this up on the web. Apparently one guy even committed suicide over the whole deal.  

Page 9: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

How do we know how many shares we’re supposed to buy and sell? In the example above, I just decided to commit the same amount of capital to each side of the trade. I was looking for a PERCENTAGE move, really ­ not a “dollar amount move” … so I wanted to make sure that if both stocks moved 1%, it affected both sides of the trade equally.  What We’ve Learned So Far  To do a pairs trade, you need to do the following:  First, find two correlated financial instruments.  Second, when their correlation breaks down, sell the one that’s moving up (over­performing) and buy the one that’s moving down (under­performing). We want to buy and sell the same dollar amount of each financial instrument. This is called dollar­neutral pairs trading.  That’s easy enough so far. But how do we find out if two financial instruments are REALLY correlated?   Pairs trading with correlations 

Page 10: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

 We can use charts to track the correlations between financial instruments, and we can even use charts to show when those correlations get out of balance.  The “correlation coefficient” is a measurement of the actual correlation between two financial instruments. A reading of 1 means two instruments are exactly correlated (one moves up, so does the other). A reading of 0 means there is no correlation. A reading of ­1 means there is an inverse correlation (one moves up, the other moves down).  You can plot the correlation coefficient as an indicator on your charts. This makes it very easy.  Here’s an example of Visa and Mastercard:  First, plot two symbols on your TradingView.com charts.   Second, add the “CC” or “Correlation Coefficient” indicator to your charts.  

Page 11: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

 Fig.3: The Correlation Coefficient of V and MA 

 The indicator at the bottom (the red mountains and valleys) is the correlation coefficient.  Mountains above 80% are good ­ the more of that you see, the better. That means there is a high enough correlation to do a trade.  Valleys are great places to look to enter trades ­ that is when the correlation is all messed up and it’s inverted ­ it means that Visa has been going up while Mastercard has been going down. (Or the opposite).  

Page 12: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

An easier way to do it  You might think, I don’t have time to do this! I don’t have time to plot all these different pairs.  I’ve got good news for you:  http://www.market­topology.com/correlation/  That’s a search engine that shows you correlated stocks for any stock you want.  Watch out for super­correlations ­ above 90% or 95% ­ if the correlation is that high, you might never get a trade, or there might not be enough profit potential (because they never move far enough apart).  Also, don’t be overly discouraged when you find that your favorite stock doesn’t have a lot of potential matches. I accept a correlation of 70% to be good enough.   Also, it’s ok to pair up a stock with an ETF. Sometimes you can find good trades when you pairs trade a stock with an ETF that “holds” that stock.   

Page 13: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

Here are some of my favorite pairs, while doing my own research:  Macy’s (M) and Dick’s (DKS)  Macy’s (M) and Dillard’s (DDS) Visa (V) and Mastercard (MA) S&P E­Minis (ES) and Dow Minis (YM) SPY and DIA Exxon (XOM) and Chevron (CVX)   Beta­Neutral Pairs Trading  You might be reading, and thinking, “Hey, Rob! Shouldn’t we base our trade size on something more important ­ like how far each stock moves every day? Or on each stock’s “beta”? Or it’s volatility?”  Wow! Good thought. Imagine for a moment that two correlated stocks are affected by a market “event,” such as an interest rate decision.  One stock might have a larger historical volatility ­ or beta (which is similiar volatility exactly)  ­ and it might move UP more than your other stock moves DOWN. And that would be bad for your pairs trade ­ at least, according to some traders. 

Page 14: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

 As a matter of fact, there’s a calculation for that (read this paper here) ­ but in all of my testing I can’t prove that it helps make the strategy more profitable.   There are two reasons I don’t factor in beta, or volatility, when choosing pairs to trade.   First, I absolutely WANT there to be some variation in the beta between the two instruments. The only way the correlation got messed up in the first place is that one of the instruments moved “a little bit more” than the other in the first place!   Second, every time I try to eliminate ALL the risk out of a trade, I screw it up. For example, let’s say I factor in beta to create the “most perfect pairs trade.” Is that a guarantee of success? No. In fact, I might have simply created a trade that looks like it is going to be perfect. What if there is a dramatic change in volatility or beta AFTER I’ve taken the position? Now what?   To summarize, I want there to be a little bit of a difference in how far each stock moves, given 

Page 15: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

any single event. That way the stocks can catch up to each other again more easily.  Updates Coming Soon  This is just the start. I’ll add more pages, and more examples, in coming weeks. I will do a little lesson about pairs trading for fx ­ currency pairs can be pairs traded, too.   Resources and Further Reading  How to Chart Pairs Trading in TradingView: https://www.tradingview.com/stock­charts­support/index.php/Spread_Charts  Pairs Trading: An Introduction: http://www.investopedia.com/university/guide­pairs­trading/  Market­Neutral Pairs Trading https://www.tradestation.com/education/labs/analysis­concepts/market­neutral­pairs­trading  Charting Correlations (I loved this): http://www.investopedia.com/university/guide­pairs­trading/pairs­trading­correlation.asp  

Page 16: PAIRS TRADING (just an introduction) - Amazon S3€¦ · PAIRS TRADING (just an introduction) By Rob Booker Trading involves substantial risk of loss. Past performance is not necessarily

Why I Never Teach People to Pairs Trade: http://www.marketwatch.com/story/why­i­wont­teach­pair­trading­to­my­students­2012­10­01  Pairs Trading the US vs Emerging Markets: http://seekingalpha.com/article/179961­2010­pairs­trade­u­s­vs­emerging­markets  Wikipedia on Pairs Trading: https://en.wikipedia.org/wiki/Pairs_trade  Beginner’s Guide to Pairs Trading http://traderhq.com/trading­strategies/beginners­guide­to­pairs­trading/  How to Pairs Trade, by Tom Sosnoff https://www.tastytrade.com/tt/shows/market­measures/episodes/how­to­pairs­trade­01­08­2015   Academic Papers  Pairs Trading: Performance of a Relative­Value Arbitrage Rule http://www­stat.wharton.upenn.edu/~steele/Courses/434/434Context/PairsTrading/PairsTradingGGR.pdf   Research on Modern Implications in Pairs Trading