ter Trade—Playing Gaps
4199_P-01.qxd
12/30/03
3:03 PM
Page 14
14
TRADE LIKE A HEDGE FUND
SYSTEM #5: SHORTING THE GAP UPPreviously we saw a gap up that did not work out on the short side: QLGCon October 10, 2001. Here are the rules for the shorting the gap up system:• Short a stock when the stock is up the day before, the QQQs are gapping up at least one-half percent, and the stock is gapping up greaterthan 5 percent.• Cover when the stock closes the gap (i.e., cover at the closing price ofthe day before); otherwise, close the position at the day before.Result See Table 1.5. The result is not that great, producing an averagereturn per trade of –0.56 percent. Even in a bear market, shorting too muchexuberance (sometimes referred to as “irrational”) has not paid off for thespeculator.
TABLE 1.5
Short Trades
All TradesAverage Profit/Loss %Average Bars Held
752–0.56%1
Winning TradesAverage Profit %Average Bars HeldMaximum Consecutive Winning Trades
371 (49.34%)4.15%116
Losing TradesAverage Loss %Average Bars HeldMaximum Consecutive Losing Trades
381 (50.66%)–5.20%0.9916
SYSTEM #6: SWING TRADING THE GAPThe gap-fill trades do not have to be closed out just because the gap isfilled. In fact, it is better to hold on to them and try to press for as much aspossible. There are many trade-offs between swing trading and day trading.Holding for multiple days allows you to reduce transaction costs and alsoallows the trade to take advantage of gap ups overnight. However, the nightcontains many risks and being in cash allows one to sleep easy.
4199_P-01.qxd
12/30/03
3:03 PM
Page 15
The Bread and Butter Trade—Playing Gaps
15
It can be seen that taking System #4 and adding a simple step that allows us to hold overnight drastically increases the profitability of the system, which becomes System #6 with the following rules:• Buy a stock when the stock is down the day before, QQQ is gappingdown more than half a percent, and the stock is gapping down morethan 5 percent.• Hold the stock at least until the next morning.• Sell when the stock goes lower than the prior day’s close.
Example: CIEN, 4/17/01CIEN closed at 51.51 on April 16, 2001 (Figure 1.8). The next day it gappeddown to 48.11 before reversing and closing at 53.09. The stock thengapped up on April 18 and kept going for two more days before finallystalling on April 20. Since it opened that day lower than the close the daybefore at 67.30, the trade was stopped out at the open at 67.09 for a 38.22percent profit.
SimulationSee Table 1.6. While there were not that many trades in 1999, we can seethat from 2000 to 2002, the worse the market did, the better the equity curveof the swing trade gap system (Figure 1.9, page 18).Drawdown Analysis The drawdown (Figure 1.10, page 19) is relativelymild except in April, 2000, the end of 2000 (right before the first rate cut),and the week immediately following September 11, 2001.Equity High Analysis In every case except two, it took fewer thanthree months to achieve a new equity high in the system. In the two exceptions, it took a maximum of five months to achieve the new equity high.(See Figure 1.11, page 20.)Annual Return of Simulation Gaps create enormous anxiety for theaverage investor. When a stock gaps down because of an earnings warning,for instance, the first reaction often is to panic. Thus, even before the open,investors are trying to sell in a panic, causing the gap even before the newsis properly disseminated and analyzed. This type of behavior is more oftenthan not going to be irrational behavior and can be, over the long run, exploited profitably. (See Figure 1.12, page 21.)
4199_P-01.qxd
12/30/03
3:03 PM
Page 16
16
TRADE LIKE A HEDGE FUND
70.0069.0068.0067.0066.0065.0064.0063.0062.0061.0060.0059.9559.0058.0057.0056.0055.0054.0053.0052.0051.0050.0049.0048.0047.0046.0045.0044.0043.0042.0041.0040.0039.00
Volume
40.00M30.00M20.00M10.00M
FIGURE 1.8
CIEN on April 17, 2001.
4199_P-01.qxd
12/30/03
3:03 PM
Page 17
17
The Bread and Butter Trade—Playing Gaps
TABLE 1.6
Simulation of Swing Trading the GapAll Trades
Starting CapitalEnding CapitalNet ProfitNet Profit %Exposure %Risk-Adjusted Return
$1,000,000.00$4,726,416.00$3,726,416.00372.64%5.68%6560.19%
All TradesAverage Profit/LossAverage Profit/Loss %Average Bars Held
498$7,482.763.64%1.24
Winning TradesGross ProfitAverage ProfitAverage Profit %Average Bars HeldMaximum Consecutive Winning Trades
300 (60.24%)$6,028,952.00$20,096.519.41%1.3724
Losing TradesGross LossAverage LossAverage Loss %Average Bars HeldMaximum Consecutive Losing Trades
198 (39.76%)($2,302,538.00)($11,628.98)–5.26%1.0214
Maximum DrawdownMaximum Drawdown $Maximum Drawdown DateRecovery FactorProfit FactorPayoff RatioStandard ErrorRisk Reward RatioSharpe Ratio of Trades
–11.89%($289,220.50)11/13/200012.882.621.79$452,060.941.815
4199_P-01.qxd
12/30/03
3:03 PM
Page 18
18
FIGURE 1.9
TRADE LIKE A HEDGE FUND
Portfolio equity curve.
4199_P-01.qxd
12/30/03
3:03 PM
Page 19
The Bread and Butter Trade—Playing Gaps
Bars since Last Equity High1,0501,000950900850800
Bars in Simulation
750700650600550500450400350300250200150100500
FIGURE 1.10
Drawdown analysis.
19
3:03 PM
Page 20
TRADE LIKE A HEDGE FUND
Underwater equity curve.
20
12/30/03
FIGURE 1.11
4199_P-01.qxd
4199_P-01.qxd
12/30/03
3:03 PM
Page 21
21
FIGURE 1.12
Annual returns.
The Bread and Butter Trade—Playing Gaps
4199_P-01.qxd
12/30/03
3:03 PM
Page 22
4199_P-02.qxd
12/30/03
3:14 PM
Page 23
TECHNIQUE 2
How to Play theQQQ-SPY SpreadUsing UnilateralPairs Trading
t first glance unilateral pairs trading seems like a contradiction interms. Pairs trading usually implies a market neutral strategy whereyou go long one asset and short another asset. Unilateral means weare going to take just one side of the pair. Many hedge funds use a pairstrading strategy and we discuss one such strategy in Technique 15 on preferred stock arbitrage. While pairs trading at first glance seems safer thandirectional trading where one takes a bias in the market, up or down, andbets on that bias, the reality is that often pairs trading can be much less safethan other forms of trading. A common slogan used to refer to this pairstrading is: “Twice the risk and half the gain,” and that’s largely true.When you trade a pair, although you are usually neutral on the market,you are, in fact, making a very biased bet on the direction of the spread between those two asset classes. As an example, say GM and F normally tradein lockstep with each other, but then F suddenly moves down sharply without GM moving down sharply. One might short GM and go long F with theidea that the spread between the two stocks goes back to its historicalnorm. In other words, we are betting on a mean reversion of the spread.The preferred stock arbitrage strategy we discuss is different from normal pairs trading strategies in that the key to the success of the convertiblearbitrage strategy is not that we were betting on the direction of the spreadbut, rather, on getting an exorbitant yield. If the spread went in our direction that would be great, otherwise, no big deal (although we would notwant it to go too much against us).
A
23
4199_P-02.qxd
12/30/03
3:14 PM
Page 24
24
TRADE LIKE A HEDGE FUND
Pairs trading often involves heavy doses of leverage because spreads ofhighly correlated assets might only need to get a tiny bit out of whack tomake the trade worthwhile. Leverage in these situations is where manyhedge funds get in trouble. In 99 times out of 100, the spread might get backin shape, but if just one or two get way out of line, then that could be the difference between a 20 percent return on the year and a –50 percent returnon the year.The other problem with pairs trading in general is that there are manybillions of dollars in hedge funds doing a variety of pairs trading strategies,merger arbitrage being the most common pairs trading strategy. If Company A is buying Company B in stock, then suddenly those two assetsshould trade in perfect lockstep with each other, and as the deal date getsclose, the price of Company B should converge on the price that CompanyA is paying for it. Because the amount of money involved in playing themerger arbitrage strategy is so great, the only way to really lock in a goodreturn in most cases (particularly when the deal is extremely likely toclose) is to use leverage. If the deal falls through at the last minute, as occasionally happens, look out below.There are other types of pairs trading strategies, for instance, goinglong a basket of low P/E stocks in a sector and short high P/E stocks in thesame sector. Going long and short same duration bonds that expire on different dates (the closer the date, the more likely it is to be accuratelypriced, whereas the further out bond might be mispriced). The most common type of pairs trading strategy, which we focus on in this technique, iswhen the ratio (spread) between two assets that are highly correlatedmoves out of kilter with its historical norm.The key difference in using unilateral pairs trading is that we willnot trade both sides of the spread, but the side that is historically morevolatile. The idea is that the more volatile side is most often the culprit forwhy the spread has gone awry. For this reason we will treat QQQ and SPYas a pair, but we will only trade QQQ.
THE UNILATERAL PAIRS TRADINGSYSTEM FOR QQQ-SPY1. Calculate the ratio of the QQQ price series over the SPY price series.
For example, on May 1, 2003, SPY was 91.92 and QQQ was 27.42. Theratio for that day was 27.42/91.92, or 0.298.2. Calculate the 20-day moving average of that ratio.
4199_P-02.qxd
12/30/03
3:14 PM
Page 25
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading
25
3. For each day, calculate the difference between the ratio and its moving
average.4. Calculate the 20-day moving average of those differences.5. For each day, calculate how many standard deviations the difference in
ratios is for that day from its moving average. Calculate the standarddeviation for each day using its prior 20 days.6. For each day, if the standard deviation calculated is greater than 1.5
and QQQ is 2 percent greater than the prior day, then short QQQ. (Inother words, the spread between QQQ and SPY has become muchgreater than usual. If this is true and QQQ had a big up move, thenQQQ is most likely the culprit and needs to be shorted.)7. For each day, if the standard deviation calculated is less than –1.5 and
QQQ is 2 percent lower than the prior day, then buy QQQ.8. Sell/cover when the standard deviation of the difference in the ratios is
less than 0.5 (in the case of a short) or greater than –0.5 (in the case ofa long).The system is pretty complicated to put together and requires somecoding. The code is presented in the Appendix to this technique.
EXAMPLESQQQ, 5/20/03On May 19, 2003, QQQ fell almost 3.6 percent and SPY fell 2.3 percent. Sureenough, this was larger than the usual ratio of percent changes between thetwo exchange traded funds (ETFs), specifically more than 2 standard deviations away from the average difference between the ratio between thetwo assets and the 20-day moving average of that ratio. In Figure 2.1, the toppane maps out the standard deviations between the ratio for that day andthe 20-day moving average of the ratio. In the second pane, the wavy line isthe ratio and the straighter line is the 20-day moving average of that ratio.Since on May 19 QQQ had fallen over 2 percent, the system buys at theopen the next day at 27.76 and holds until the number of standard deviations between the ratio and its moving average goes back above –0.5 standard deviations, which occurs on May 28. The system sells at 29.16 for a5.04 percent profit.
4199_P-02.qxd
12/30/03
3:14 PM
Page 26
26
TRADE LIKE A HEDGE FUND
no of standard deviations
1.000.50
0.26
0.00
–0.50–1.00–1.50–2.00
Ratio QQQ/SPY and its 20 Period Moving Average
0.310.31
0.310.300.300.300.300.300.3031.5031.2531.0030.7530.5030.2530.00
29.8329.7529.5029.2529.0028.7528.5028.2528.0027.7527.5027.2527.00
FIGURE 2.1
QQQ on May 20, 2003.
4199_P-02.qxd
12/30/03
3:14 PM
Page 27
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading
27
QQQ, 7/8/02On July 5, 2002, people were relieved that July 4 had come and gone with noterrorist attack. Things were not that simple, though, for everyone who hadshorted QQQs in order to hedge their portfolios against the possibility of anattack. Everyone who shorted now had to cover that short and the race wason to see who would cover first. QQQ ended up over 6.4 percent that dayand SPY up 3.9 percent. While the SPY rally was very sharp, the QQQ rallywas its largest one day move of the year and put the ratio for that day 2standard deviations above the 20-day moving average for that ratio. (SeeFigure 2.2, see page 30.)Shorting at the open on July 8 at 26.20 and then covering when thestandard deviation between the ratio and the 20-day moving average of theratio was back down to 0.5 would have had one cover on July 26 at 22.56 fora 13.89 percent profit.In the results (Table 2.1) I ran a simulation on QQQ using the unilateralpairs trading system starting with $1M and using 100 percent of equity pertrade. I came up with 72 percent success with an average return per trade of2.72 percent. The magic of compounding allows for a remarkable returnof 462 percent over the past four years.The annual returns were as shown in Figure 2.3 (see page 31) and Table2.2 (see page 32), for an average annual return of 48 percent. Note that inthe incredible bull market year of 1999, the system did not work as well. In1999 things were basically straight up for tech stocks, with the rest of themarket doing much more poorly. Shorting QQQs in those cases did notwork as well.We can see in Figure 2.4 (see page 33) depicting the drawdown analysis that the bulk of the drawdown occurred during the final part of the bullrun. In general, though the equity curve of the system for QQQ has beenfairly smooth, as shown in Figure 2.5 (see page 34), with most of the profits coming from the long side, but with the short side still holding up its endof the bargain.
31 (77.50%)$3,960,379.50$127,754.185.52%4.587
40$78,910.583.47%5.25
21 (65.63%)$2,943,683.50$140,175.415.70%4.866
32$45,775.981.78%6.66
$1,000,000.00$2,464,831.25$1,464,831.25146.48%9.78%1497.51%
Short Trades
0 (0.00%)$0.00$0.000.00%00
1($416,943.34)–41.65%4,999.00
$1,000,000.00$583,056.63($416,943.34)–41.69%100.11%–41.65%
Buy & Hold
28
52 (72.22%)$6,904,063.00$132,770.445.59%4.698
72$64,184.072.72%5.88
All TradesAverage Profit/LossAverage Profit/Loss %Average Bars Held
$1,000,000.00$4,156,423.00$3,156,423.00315.64%8.80%3588.11%
Long Trades
3:14 PM
Winning TradesGross ProfitAverage ProfitAverage Profit %Average Bars HeldMaximum Consecutive Winning Trades
$1,000,000.00$5,621,253.00$4,621,253.00462.13%15.94%2898.31%
All Trades
Simulation of Unilateral Pairs Using QQQ
12/30/03
Starting CapitalEnding CapitalNet ProfitNet Profit %Exposure %Risk-Adjusted Return
TABLE 2.1
4199_P-02.qxdPage 28
TRADE LIKE A HEDGE FUND
–23.12%($806,246.00)11/23/19995.733.021.18$889,203.000.122.81
–15.11%($406,770.50)4/4/20017.764.931.54$585,986.380.124.4
9 (22.50%)($803,957.25)($89,328.59)–3.59%7.562–27.85%($806,246.00)4/20/20011.821.991$313,635.310.11.48
11 (34.38%)($1,478,852.75)($134,441.16)–5.69%10.093
–83.00%($1,913,161.00)10/9/20020.2200$231,135.34–0.010
1 (100.00%)($416,943.34)($416,943.34)–41.65%4,999.001
3:14 PM
Maximum DrawdownMaximum Drawdown $Maximum Drawdown DateRecovery FactorProfit FactorPayoff RatioStandard ErrorRisk Reward RatioSharpe Ratio of Trades
20 (27.78%)($2,282,810.00)($114,140.50)–4.74%8.953
12/30/03
Losing TradesGross LossAverage LossAverage Loss %Average Bars HeldMaximum Consecutive Losing Trades
4199_P-02.qxdPage 29
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading
29
4199_P-02.qxd
12/30/03
3:14 PM
Page 30
30
TRADE LIKE A HEDGE FUND
no of standard deviations2.001.501.000.500.00–0.50–1.00
–1.26Ratio QQQ/SPY and its 20 Period Moving Average0.280.280.280.270.27
0.2726.5026.2526.0025.7525.5025.2525.0024.7524.5024.2524.00
23.8523.7523.5023.2523.0022.7522.5022.2522.0021.75
FIGURE 2.2
QQQ on July 8, 2002.
4199_P-02.qxd
12/30/03
3:14 PM
Page 31
31
FIGURE 2.3
Annual returns.
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading
3/10/19991/3/20001/2/20011/2/20021/2/2003
Period Starting
–118,052.88889,356.631,698,867.751,626,432.00524,649.50
$ Return
–11.81100.8495.9146.8710.29
% Return
–23.12–12.85–19.62–14.2–4.49
% Max DD
1.539.7238.4241.5826.69
Exposure
102020175
Entries
102019185
Exits
3:14 PM
Annual Returns
12/30/03
TABLE 2.2
4199_P-02.qxdPage 32
32TRADE LIKE A HEDGE FUND
4199_P-02.qxd
12/30/03
3:14 PM
Page 33
FIGURE 2.4
Underwater equity curve (drawdown).
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading
33
4199_P-02.qxd
12/30/03
3:14 PM
Page 34
34
FIGURE 2.5
TRADE LIKE A HEDGE FUND
Portfolio equity curve.
QQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQ
ShortShortLongShortShortLong
LongShortShortLongLongLong
LongShortLongShortLongLong
Symbol
12,28411,95916,22914,52814,42715,306
10,4859,2899,3289,1769,28910,5884/13/20004/28/20005/24/20006/5/20006/30/20007/28/2000
1/12/20002/9/20002/24/20003/3/20003/15/20004/4/200092.8193.567592.2591.8192.19
89102.07104.88108106.5103.62
67.6878.474.3289.199286.88
55.950.553.558.5357.6259.62
EntryPrice
4/18/20005/11/20005/31/20006/23/20007/13/20008/9/2000
1/18/20002/16/20002/29/20003/6/20003/28/20004/10/2000
11/23/199911/30/199912/3/199912/29/19991/5/20001/11/2000
5/14/19995/28/19997/2/19998/2/19999/9/199910/8/1999
Exit Date
89.4882.7584.479597.9493.69
92.0799.9105.75111.75116.98107.62
76.4476.5779.329087.591.75
53.3851.55856.6961.5662.85
ExitPrice
–3.5911.5512.63–2.986.681.63
3.452.13–0.833.479.843.86
–12.942.336.73–0.914.895.61
4.511.98–8.41–3.14–6.845.42
% Change
–40,905.65129,276.76153,688.66–39,952.0088,437.5822,959.00
32,188.9520,157.11–8,115.3934,410.0097,348.7542,352.00
–116,394.1518,345.7754,000.00–7,653.6739,789.0049,581.50
43,157.5319,879.00–83,830.50–29,307.52–61,672.8645,423.48
Net Profit
3941488
353194
1322413
121181710
BarsHeld
How to Play the QQQ-SPY Spread Using Unilateral Pairs Trading(continued)
148,753.34278,030.09431,718.