ar
PART 2 Harnessing the Power of Quantitative Techniques to Create a Trading Program
134
value volatility of one corn contract. One share of GE trading at $60 may be moreor less volatile than one share of INTC trading at $30. Taken even further, $100worth of CSCO stock is likely more volatile than $100 worth of MRK stock. Weneed to create a method of equalizing the volatility of all markets for our tradingstrategy evaluation, whether they are futures or stocks.I cannot stress the importance of this concept in order to generate meaningful performance evaluation. Numerous tests on futures markets are completed inwhich strategies trade one contract each of the S&P 500, corn, wheat, and cotton.The results of this system will be relatively meaningless. The performance of theS&P 500 will dominate the results of the portfolio due to its overwhelming dollarvolatility compared to the other three markets.To illustrate this example of unbalanced risk, we examine two portfolios: onefor stocks and another for futures. The stock portfolio contains two companies:Yahoo (YHOO) and Phillip Morris (MO). Yahoo is an Internet portal, a veryvolatile business over the past couple of years. Phillip Morris is a large diversifiedfood and tobacco producer and marketer. Our portfolio begins on January 1, 1998,with $50 of each stock. Figure 7.5 presents a graph of our portfolio’s value, withthe value of YHOO and the value of MO.When we compare the portfolio value against the values of the two componentstocks, we notice that the portfolio moves in lockstep with the value of YHOO. It is
Equal Dollar Weighted Portfolio (YHOO and MO)250
Value
200
150Portfolio100YHOO50
MO
Date
FIGURE
7. 5
Equal Dollar Weighted Portfolio (YHOO and MO). Because YHOO is much more volatile than MO, thevalue of the portfolio is dominated by changes in YHOO share prices.
12/31/01
10/31/01
8/31/01
6/30/01
4/30/01
2/28/01
12/31/00
10/31/00
8/31/00
6/30/00
4/30/00
2/29/00
12/31/99
10/31/99
8/31/99
6/30/99
4/30/99
2/28/99
12/31/98
0
CHAPTER 7 Dissecting Strategies Currently Available
135
almost as if the MO portion of the portfolio is irrelevant. Such is life when we dealwith stocks of varying volatility. Over the life of this portfolio, YHOO is almostthree times as volatile as MO when compared using standard deviation of returns. Inorder to rebalance these stocks to have equal importance on the returns of our portfolio, we need to adjust the weightings based on some measure of volatility.Adjusting the amount of money invested in each security at the beginning ofthe portfolio will not be enough to accomplish our desired result. A balanced portfolio one day becomes unbalanced the next, as some stocks outperform while others underperform. In the YHOO and MO example, let’s suppose we invested $25 inYHOO and $75 in MO at the beginning of the portfolio. Because YHOO is roughly three times as volatile as MO, the risk to our portfolio from each stock is approximately the same. But if YHOO doubles and MO falls by 33 percent, then ourYHOO stake will be worth $50 and our MO stake will be worth $50. Our portfoliois unchanged and still worth $100, but our risk has changed. Because YHOO isthree times as volatile as MO, our effective exposure to YHOO is roughly threetimes as large as our exposure to MO. If we want to rebalance our exposure back toour original $75 for MO and $25 for YHOO, we will need to sell YHOO and buyMO. This is exactly how we manage quantitative portfolios using trading systems.Similar problems arise in the futures markets when we trade on a single contract basis. Below is the profit and loss of being long one contract of the S&P 500and one contract of corn since January 1, 1998 (Figure 7.6). It is evident that ourperformance is entirely dependent on the S&P 500. The profit and loss of the portfolio and the S&P 500 are indistinguishable. The profit and loss of the corn contract is virtually meaningless to the portfolio. Within our trading systems, we willwant to treat each market as equal. We need to adjust the contract sizes dependingon each market’s volatility in order to equalize different contracts that we trade.The tests in this book will not suffer the same fate as the examples above.Whether stocks, futures, or other, we will use intelligent weighting schemes thatwill dynamically weight each market based on recent market volatility. For futures,the number of contracts is calculated at the entry of each trade using the following formula:$10,000Number of contracts to trade = ᎏᎏᎏᎏᎏσ100daypricechanges ContractMultiplierWe determine the number of contracts to trade with each entry signal bydividing $10,000 by both the standard deviation of past 100 daily price changes andthe contract multiplier of the futures contract. This formula uses recent marketvolatility to determine the number of contracts to trade on any given day. As volatility increases, measured by the standard deviation of price changes, the number ofcontracts is decreased. As volatility decreases, the number of contracts to trade isincreased. The contract multiplier, found in the denominator of the equation, represents the dollar value of a base unit move for each contract. These numbers varyfrom futures contract to futures contract. For most grain contracts, the contract mul-
PART 2 Harnessing the Power of Quantitative Techniques to Create a Trading Program
136
Profit and Loss of S&P 500 and Corn160,000120,000S&P 500
PortfolioProfit
80,00040,000Corn
12/10/2001
8/3/2001
10/9/2001
6/4/2001
4/2/2001
1//30/2001
9/26/2000
11/27/2000
7/26/2000
5/24/2000
3/23/2000
1/21/2000
9/16/1999
11/16/1999
7/16/1999
5/14/1999
3/15/1999
1/11/1999
9/8/1998
11/6/1998
7/8/1998
5/6/1998
3/5/1998
–40,000
12/31/1997
0
DateFIGURE
7. 6
Profit and Loss of S&P 500 and Corn. Trading one contract of S&P 500 and corn leads to anotherunbalanced portfolio because the dollar volatility of an S&P 500 futures contract is much larger thanthat of a corn futures contract.
tiplier is $50. That is, a one penny increase or decrease is worth $50 per contract.In the S&P 500, the contract multiplier is $250. For T-bonds, this number is $1,000.Using a theoretical example, if the standard deviation of the past 100 price returnsis eight points in the S&P 500, then our system would trade five contracts:$10,000Number of contracts to trade = ᎏᎏᎏ = 5 contracts8pts ⭈ $250percontractAs we see in the graph in Figure 7.7, the number of contracts to trade forS&P 500 futures has decreased over time, commensurate with an increase in boththe price level and percentage volatility of the S&P 500.This dynamically weighted contract size solves the futures market volatilitymismatch. The beauty of this method is that every trade should have equal expectedvolatility as every past and future trade, regardless of the price level or notional sizeof the futures contract. When weighting contracts according to the formula above,the difference between contracts is minimized. Below, in Figure 7.8, we see the profit and loss of being long one S&P 500 future and one corn contract when weightedby our contract size formula. After the contract adjustment, the volatility of returnsis roughly similar for the S&P 500 and corn.
CHAPTER 7 Dissecting Strategies Currently Available
137
S&P 500 Futures Contracts1700
5045
Contracts to trade
403530
700
2520
Contracts
S&P 500 Level
1200
SPX Level
15
200
10
10/30/01
2/7/01
6/18/01
9/28/00
5/22/00
1/12/00
9/3/99
4/28/99
12/16/98
4/1/98
8/10/98
7/15/97
11/19/97
3/6/97
10/25/96
6/19/96
2/9/96
10/3/95
–300
5/25/95
50
Date
FIGURE
7. 7
S&P 500 Futures Contracts. Our dynamically adjusting contract size will trade fewer contracts as pricesand volatility rise.
On the equity side, we perform an analogous calculation to generate thenumber of shares to trade. Similar to the S&P 500 futures example, we trade fewershares of stock as the price and volatility of that stock rises. The reason we weightshare size by volatility instead of share price has to do with varying volatilityamong stocks in differing industries.Technology firms such as Yahoo (YHOO) with risky business prospects andunstable cashflows are much more volatile than established, mature businesseswith very predictable earnings streams such as McDonalds (MCD). Similar to thefutures portfolio example above, trading a stock portfolio consisting of $10,000each of YHOO, MCD, GE, and MRK is very inconsistent. The majority of theportfolio’s performance will be determined by its most volatile component,YHOO. By weighting each stock by its volatility, we equalize the importance ofall stocks in our performance evaluation. We determine the number of shares totrade in each entry signal by dividing $10,000 by the standard deviation of thestock’s past 100 daily price changes.Number of shares to trade =
$10,000ᎏᎏσ100 days price return
In Figure 7.9, below, we examine the number of shares per trade in GeneralElectric (GE). We find that as the stock rallies between 1991 and 2001, we tradefewer shares.
PART 2 Harnessing the Power of Quantitative Techniques to Create a Trading Program
138
Contract Adjusted Profit and Loss400,000S&P 500 P/L
Profit
200,000
Corn P/L
FIGURE
12/19/2001
8/24/2001
10/24/2001
5/4/2001
6/29/2001
3/9/2001
1/11/2001
9/20/2000
Date
11/14/2000
7/26/2000
4/4/2000
5/31/2000
2/8/2000
12/9/1999
8/19/1999
10/14/1999
6/24/1999
3/4/1999
4/29/1999
1/6/1999
11/9/1998
9/15/1998
7/21/1998
–200,000
5/26/1998
0
7. 8
Contract Adjusted Profit and Loss. Once we adjust our portfolio to trade the dynamically adjusted contracts, the profit and loss of the S&P 500 and corn have similar volatility.
GE Stock Price and Shares to Trade70
120000100000
GE Stock PriceShares to Trade
50
6000030
Shares
80000
40
40000
20
10/30/01
6/18/01
2/7/01
9/28/00
5/22/00
1/12/00
9/3/99
4/28/99
12/16/98
8/10/98
4/1/98
11/19/97
7/15/97
3/6/97
10/25/96
0
6/19/96
0
2/9/96
20000
10/3/95
10
5/25/95
GE Stock Price
60
DateFIGURE
7. 9
GE Stock Price and Shares to Trade. Our dynamically adjusting contract size will trade fewer shares asprices and volatility rise.
CHAPTER 7 Dissecting Strategies Currently Available
139
DEALING WITH COMMISSION AND SLIPPAGEPerhaps the most controversial aspect of my approach to performance evaluationis that all trades are transacted without deducting any charges for transaction costsconsisting of commission and slippage.Commission is the fixed cost a trader pays to his broker for executing trades.Typical commission runs between $10 and $20 for round-turn futures trades and $0.02to 0.03 for round-turn stock trades. Slippage is the difference between the price on ascreen and the price at which trades are completed. These costs frequently outweighcommission costs and can run between $50 and $150, depending on the size and liquidity of the futures contract, and $0.05 and $0.15 per share on the stock side. I choosenot to include such costs in order to focus on the pure profitability of each strategy.Although I test without including trading costs, I never become excitedabout performance results until I factor in commission and slippage results. If astrategy is profitable but transaction costs take most of the trading profit, I mayconsider using the strategy as an entry or exit within another system. Anotherreason I do not deduct transaction costs is the chance that a system performs sopoorly that I may consider taking signals exactly opposite of the originalmethodology in order to create a profitable strategy. You might be surprised justhow many promising systems I have created by inverting the rules of unprofitable strategies.
PERFORMANCE OF POPULAR STRATEGIESLet’s examine some popular strategies and see how they perform in the stock andfutures markets. We’ll be looking at:Channel breakout■ Dual moving average crossover■ Momentum■ Volatility breakout■ Stochastics■ Relative Strength Index■ Moving Average Convergence/Divergence■
As noted above, each strategy is tested on 29 futures markets and 34 stocksbetween January 1990 and December 2001. Signals are generated at the close ofeach trading day and executed on the next trading day’s opening price.
Channel BreakoutThe first strategy is a channel breakout that enters long when a market’s close is thehighest close of the past 40 days, and enters short when a market’s close is the lowest
PART 2 Harnessing the Power of Quantitative Techniques to Create a Trading Program
140
close of the past 40 days. Longs are exited if today’s close is the lowest close of thepast 20 days. Shorts are exited if today’s close is the highest close of the past 20 days.The chart in Figure 7.10, below, depicts an example of the channel breakoutstrategy applied to American International Group (AIG). The solid lines representthe highest close and lowest close of the past 40 days. When prices rise above theupper channel, a long entry is generated. When prices fall below the lower channel, a short entry is generated.There’s a reason that the channel breakout is such a popular strategy amongtraders. As we see in the performance numbers (Figures 7.11a through 7.12b), ithas been very profitable over the past 12 years. Ten of the 12 years tested producedprofits on the futures markets, while 6 of the 12 years generated profits on thestock side. We see especially strong performance in the futures arena on currencies, interest rates, petroleum, and softs. On the stock side, the channel breakoutperforms especially well in technology stocks as well as some of the indices.The major concern with the channel breakout is its recent deterioration of performance. If we examine the breakdown statistics for both stocks and futures, wesee that recent performance has been less than stellar. These numbers may indicatethat strategy performance has weakened enough to cause concern and alarm.
FIGURE
7.10
Channel Breakout Strategy Applied to AIG.
CHAPTER 7 Dissecting Strategies Currently Available
141
Trading Strategy Evaluation (Futures)
Net Profit:Drawdown:K-ratio:
Portfolio Statistics5,971,279Sharpe ratio:–1,710,956Correlation to breakout:0.12Correlation to 10-40 MA:
Dec-01
Jan-01
Jan-00
Jan-99
Jan-98
Jan-97
Jan-96
Jan-95
Jan-94
Jan-93
Jan-92
Jan-91
8,000,0007,000,0006,000,0005,000,0004,000,0003,000,0002,000,0001,000,0000
Jan-90
Equity
Strategy Name: 40 day entry/20 day exit channel breakoutParameters:40 day extreme for entry, 20 day extreme for exitDescription:Enter on a 40 day extreme close; exit on a 20 day extreme closeRun Dates:1/1/1990 – 12/31/2001Avg.#Avg. Avg.%Avg.Avg.ProfitAvg. Bars BarsSharpeofMarket Net Profit K-ratio Ratio Max DD Trades Win Contracts Per Con. WinLoss Win LossFXAD–272,840 –0.12 –0.18 –483,650 723625.14–151 47,395 –32,720 4820BP37,388 –0.04 0.02 –517,463 673117.283259,261 –26,241 5222CD–113,320 –0.03 –0.06 –479,190 703446.63–3561,018 –34,299 4719JY1,269,550 0.29 0.67 –179,038 604013.981,389 86,159 –25,074 6220SF852,8380.29 0.51 –139,288 634815.4790158,208 –26,317 5419RatesED2,563,050 0.29 1.13 –168,925 555389.82519 115,653 –30,419 6418TY864,5940.21 0.42 –173,953 634329.4145771,770 –30,326 5818US456,8440.10 0.26 –293,500 644420.2634157,934 –32,771 5618StockSP–525,075 –0.09 –0.32 –785,188 76369.01–767 44,358 –35,158 4519MetalsGC56,740 –0.01 0.03 –468,870 683546.001862,783 –32,956 5420HG–297,838 –0.01 –0.18 –687,413 733732.16–127 43,378 –31,936 4817PL–1,080,215 –0.25 –0.66 –1,302,355 762649.39–300 44,647 –36,083 5018SL–629,135 –0.23 –0.40 –760,910 733434.62–267 32,762 –31,111 4519EnergyCL888,7600.17 0.42 –277,090 644527.7850062,883 –26,710 4921HO486,0030.12 0.21 –247,771 673723.6330772,454 –31,556 5122HU–172,965 –0.02 –0.08 –491,480 793822.21–9950,636 –34,531 4419GrainsC925,1630.19 0.45 –206,975 664777.2418168,253 –34,019 5119S–92,275 –0.06 –0.05 –577,663 704132.28–4838,934 –30,171 4623W162,7250.07 0.08 –383,525 723851.884565,889 –35,773 5219MeatsFC50,5900.00 0.03 –438,020 673940.011748,903 –29,908 4921LC–154,676 –0.03 –0.09 –410,484 713150.01–4453,697 –27,265 5322LH–134,704 0.03 –0.08 –360,008 713031.44–6062,486 –28,938 5621PB–213,340 –0.07 –0.12 –565,640 683720.49–164 53,159 –36,233 5120SoftsCC–465,190 –0.15 –0.27 –829,330 702350.06–152 62,602 –28,417 6022CT235,830 –0.01 0.13 –488,225 703324.8913577,555 –32,935 5819JO–828,480 –0.14 –0.38 –1,264,553 732535.88–316 61,604 –35,225 5221KC1,022,948 0.12 0.32 –338,738 664112.101,291 79,143 –28,350 5319LB1,398,328 0.13 0.49 –295,208 585233.7371084,842 –41,297 5319SB–320,018 –0.11 –0.18 –622,171 723153.41–8357,164 –31,553 5020Average 199,0430.02 0.07 –474,554 663633.8714159,518 –30,610 5019
0.411.000.90
© 2002 Lars Kestner – All Rights Reserved
FIGURE
7.11 a
Results of Channel Breakout Strategy Applied to Futures.
Net Profit2,307,8661,291,201150,845681,499442,7131,075,741
Year199019911992199319941995
7.11 b
1991
K-ratio0.560.190.080.070.200.20
1992
Sharpe Ratio1.610.940.150.720.331.20
1993
Year199619971998199920002001
1994
1995
Year
1997
Sharpe Ratio0.120.20–0.21–0.480.410.11
Avg. ProfitPer Contract427329–767–16923660–63264
1996
Net Profit by Year
Net Profit202,431245,540–216,622–857,497445,200132,049K-ratio0.11–0.15–0.03–0.390.030.08
AverageAverageAverageMax DD Num Trades % Win6638–359,7264635–159,095–785,18876367333–804,887–338,7807040–389,38869426934–443,538–639,7046834
Performance Breakdown by Year
AverageAverageK-ratio Sharpe Ratio0.080.190.150.45–0.09–0.32–0.13–0.300.090.180.070.16–0.02–0.06–0.030.02
Results of Channel Breakout Strategy Applied to Futures.
FIGURE
1990
AverageNet Profit354,723971,122–525,075–487,612400,600331,871–113,033173,903
3,000,0002,500,0002,000,0001,500,0001,000,000500,0000–500,000–1,000,000–1,500,000
Breakdown Statistic (Futures)40 day entry/20 day exit channel breakout40 day extreme for entry, 20 day extreme for exitEnter on 40 day extreme close; exit on a 20 day extreme close1/1/1990 – 12/31/2001Breakdown by Market Sector
MarketSectorFXRatesStockMetalsEnergyGrainsMeatsSofts
System Name:Parameters:Description:Run Dates:
Net Profit
142Average Avg. Bars Avg. BarsLossWinLoss5220–28,9304514–23,379–35,15845194919–33,021–30,9324821–33,32150205221–30,586–32,9635420
1998
2000
2001
© 2002 Lars Kestner – All Rights Reserved
1999
Num. ofNumber of Profitable PercentLengthWindows Windows Profitable7149.31%1 Month1447653.52%3 Months1421398460.43%6 Months1339772.93%12 Months1279474.02%18 Months8872.73%24 Months121
AverageWin62,40861,33944,35845,89361,99157,69254,56170,485
CHAPTER 7 Dissecting Strategies Currently Available
143
Trading Strategy Evaluation (Stocks)40 day entry/20 day exit channel breakout40 day extreme for entry, 20 day extreme for exitEnter on a 40 day extreme close; exit on a 20 day extreme close1/1/1990 – 12/31/2001#Avg.Avg. Avg.Sharpe%Avg.Avg.Avg. Bars BarsofProfitMarket Net Profit K-ratio Ratio Max DD