04
CHAPTER 8 New Ideas on Entries, Exits, and Filters
205
Trading Strategy Evaluation (Stocks)
Net Profit:Drawdown:K-ratio:
Portfolio Statistics6,199,323Sharpe ratio:–2,377,389Correlation to breakout:0.15Correlation 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
Jan-90
Equity
Strategy Name: Divergence IndexParameters:10 day and 40 day momentum to calculate Divergence IndexDescription:Enter when Divergence Index falls below –10Run Dates:1/1/1990 – 12/31/2001#Avg.Avg. Avg.Avg.Avg.SharpeofProfitBars Bars%Avg.Market Net Profit K-ratio Ratio Max DD Trades Win hrs (000) Per Con. WinLossWin LossEnergySLB51,3680.06 0.04 –256,145 343816.409253,060 –30,401 5414XOM –443,474 –0.39 –0.66 –468,469 272246.29 –35514,060 –25,135 3517MaterialsAA–488,370 –0.03 –0.26 –633,194 643849.74 –15749,173 –41,963 7828DD–295,009 –0.08 –0.34 –398,076 383420.36 –38128,330 –26,532 3512IP–415,874 –0.21 –0.38 –526,065 443216.29 –59532,398 –29,346 3912IndustrialsBA166,3550.00 0.12 –298,679 413219.1221272,736 –27,829 5715GE217,2690.09 0.18 –243,538 354371.118755,550 –30,799 5615MMM –271,950 –0.09 –0.25 –319,835 363112.59 –60031,714 –24,832 4416ConsumerDIS22,902 –0.01 0.02 –221,771 393137.001459,431 –25,688 50153213.53 –41834,223 –24,799 4920Discretionary GM –201,470 –0.08 –0.17 –271,613 37HD928,0080.08 0.60 –338,473 333655.94503 127,461 –28,644 8413WMT87,6630.00 0.07 –348,214 334541.066548,748 –35,753 5217ConsumerG202,3140.06 0.16 –174,740 374635.2912437,277 –23,619 4819KO–282,288 –0.08 –0.28 –367,034 383425.38 –29331,297 –27,566 3617StaplesMO435,2190.20 0.34 –196,571 314524.6656957,414 –21,681 6119PG–164,772 –0.03 –0.14 –256,831 413919.95 –23028,924 –26,049 3613Healthcare AMGN 629,4820.08 0.39 –170,184 344162.8329580,532 –24,898 5716BMY –234,205 –0.07 –0.23 –258,740 363136.70 –17734,833 –24,695 3717JNJ561,5140.15 0.40 –106,686 384246.2332067,554 –23,607 5410PFE426,2580.15 0.29 –156,378 324773.8218059,355 –27,298 5617FinancialsAIG–62,377 –0.04 –0.06 –220,007 384241.26–4035,394 –28,577 4214FNM 314,2780.12 0.28 –158,375 334226.8535550,742 –20,848 4916MER 234,3890.00 0.17 –383,969 433542.2711769,338 –29,577 5614Information AAPL –54,746 –0.04 –0.04 –323,193 444118.27–7932,728 –25,090 461755575.4472 100,130 –28,671 6819Technology DELL 1,383,436 0.28 0.66 –241,445 33IBM–44,5370.02 –0.03 –375,134 363618.95 –12459,255 –37,181 5621INTC 181,1410.05 0.11 –418,837 3938116.704358,534 –28,390 4216MSFT 796,8380.12 0.48 –471,525 333357.74409 125,115 –27,178 7316SUNW 648,1520.09 0.42 –179,443 3842213.778167,409 –19,022 5319TXN–15,7530.04 –0.01 –383,180 433376.77–551,463 –25,387 4618TelecomVZ63,7490.08 0.05 –205,669 354922.728035,264 –29,763 4815IndicesSPX458,2090.12 0.36 –285,347 3631 2217.62693,451 –22,790 6314NDX 738,5860.28 0.52 –118,447 3557 1735.861255,048 –23,558 5118394,902 –32,655 6317RUT627,0180.17 0.33 –238,292 4436 5142.38Average 182,3330.03 0.09 –294,532 3839324.44556,848 –27,348 521610,000,0008,000,0006,000,0004,000,0002,000,0000–2,000,000
0.400.730.62
© 2002 Lars Kestner – All Rights Reserved
FIGURE
8.13a
Divergence Index Strategy Applied to Stocks.
8.13b
1990
Net Profit–16,3093,129,578150,768–95,390–961,3334,114,823
19911992
Divergence Index Strategy Applied to Stocks.
FIGURE
–2,000,000
–1,000,000
0
1,000,000
2,000,000
3,000,000
4,000,000
5,000,000
Year199019911992199319941995
1993
K-ratio0.090.07–0.33–0.11–0.07–0.52
1994
Year
1995
1996
Net Profit by Year
Performance Breakdown by YearYearNet ProfitK-ratio Sharpe Ratio993,13919960.13–0.01705,83019970.272.04–603,42419980.050.18294,3861999–0.12–0.14–58,4612000–0.49–1.90–1,555,90720011.123.50
AverageWin33,56036,63453,33367,46638,72860,56851,82570,66235,26481,134
Average Avg. Bars Avg. BarsLossWinLoss4516–27,768–32,6145117–27,8205215–28,72159164517–24,729–25,1245115–26,3344915–27,27455184815–29,763–26,3345916Profitability Windows
1997
1998
2000
2001
© 2002 Lars Kestner – All Rights Reserved
1999
Num. ofNumber of Profitable PercentSharpe RatioLengthWindows Windows Profitable720.6250.00%1 Month144680.3647.89%3 Months14213965–0.6846.76%6 Months133670.2050.38%12 Months77–0.0660.63%18 Months1277965.29%–1.5424 Months121
Breakdown Statistics (Stocks)
System Name:Divergence IndexParameters:10 day and 40 day momentum to calculate Divergence IndexDescription:Enter when Divergence Index falls below –10Breakdown by Market SectorRun Dates:1/1/1990 – 12/31/2001AverageAverage Avg. ProfitAverageAverageAverage AverageMarketNet Profit K-ratio Sharpe Ratio Max DD Num Trades % Win Per ContractSectorEnergy–196,0533130–0.17–131–0.31–362,307Materials–519,112–399,75149–0.1135–0.33–378Industrials–287,35137,225370.00350.02–100Discretionary–295,018209,276360.00360.1341Staples3747,618410.04420.02–248,794Healthcare–172,997345,762350.08400.21154Financials–254,117162,097380.03400.13144Info. Tech.–341,822413,504380.08400.2357Telecom3563,749490.08800.05–205,669Indices38607,9387410.190.40–214,029
Net Profit
206
CHAPTER 8 New Ideas on Entries, Exits, and Filters
207
I look at moving average crossovers between one and 20 days, where thelonger average is always four times the length of the shorter average. Each tradingday, I determine if the one-day/four-day, two-day/eight-day, and so on, to the 20day/80-day moving average crossovers are generating long or short trading signals.Any single parameter set generates a long signal if the shorter length average isgreater than the longer length average, and generates a short signal if the shorterlength moving average is less than the longer length moving average. Each day, Icalculate the percentage of the 20 pairs that are signaling long positions in the market. This percentage is plotted as the Moving Average Confluence Statistic(MACS). That is, we start with the one day/four day moving average pair. If the oneday average is greater than the four-day average, then we add +5 to the MACS statistic. This process is continued for the 20 pairs of moving averages and results inan indicator that oscillates between zero and 100. Long signals are generated whenthe MACS is 60 or above, and shorts are initiated when the MACS is 40 or below.The chart in Figure 8.14 depicts signals generated on the S&P 500. From lateFebruary to early April, virtually all the moving average pairs were in agreementto be short. This is indicated by the zero and near zero values of the Moving
FIGURE
8.14
Moving Average Confluence Method Strategy Applied to the S&P 500.
208
PART 2 Harnessing the Power of Quantitative Techniques to Create a Trading Program
Average Confluence Statistic in the bottom half of the chart. As a result, our strategy was short between February and April. As the market rallied toward the end ofApril, many of the moving average pairs began to signal long positions. As aresult, the MACS rose above 60 around the beginning of May and we entered long.The Moving Average Confluence method performs well on both futures andstock data (Figures 8.15a through 8.16b). Futures markets generate profits in 11out of the 12 years tested. Strong sectors include currencies, interest rates, andpetroleum. Stock performance is not as strong, with profits accruing in 8 of the 12years tested. Strong stock sectors include health care, technology, and stockindices.Most moving averages are in agreement when strong trends emerge. TheMACS shows when signals are in confluence by producing values near zero or100. Future research could add some complexity to the strategy by entering oncrosses of the 25 and 75 thresholds, while exiting and maintaining neutral positions between MACS values of 25 and 75, or by using a crossover of the 50 levelas an exit signal.Normalized Envelope IndicatorSome of the oldest trading strategies involved using simple moving averages togenerate buy and sell signals. But as quantitative trading strategies increased inpopularity, traders began to look for more complex methods to capture profits. Asresearch progressed, traders became interested in taking advantage of priceextremes away from the moving average. In order to do this, they needed a methodof judging when prices had wandered too far from their average.Ideally, the moving average would act like a rubber band, drawing pricescloser to the average when stretched either way. As a result, the moving averageenvelope was created. Envelopes are formed by plotting two bands around themoving average—one above and one below. Historically this had been accomplished by multiplying the average by two constants. Typically, the moving average is multiplied by 105 percent to arrive at the upper band and 95 percent to calculate the lower band. The idea of the envelope was that as prices ran far above orbelow the moving average, they would correct themselves and return toward theaverage. This would create a profitable opportunity for traders, as they would buywhen prices touched the lower price band and sell at the upper price band.Traders have used this approach for many years with some success. Oneproblem with these moving average bands is determining optimal displacement.Hours of trial and error had been the trader’s only method of fitting a market witha good envelope. Should 95 and 105 percent be used, or are 90 and 110 percentmore ideal? I figured there had to be a better way other than arbitrarily guessing,so I developed the Normalized Envelope Indicator. The NEI draws two envelopesautomatically, based on the recent optimal displacement.
CHAPTER 8 New Ideas on Entries, Exits, and Filters
209
Trading Strategy Evaluation (Futures)Strategy Name: Moving average confluence methodParameters:1 day/4 day, 2day/8 day, …, to 20 day/80 dayDescription:Enter long when MACS > 60, enter short when MACD < 40Run Dates:1/1/1990 – 12/31/2001
Net Profit:Drawdown:K-ratio:
Portfolio Statistics13,545,716Sharpe ratio:–1,788,611Correlation to breakout:0.18Correlation 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
Jan-90
Equity
#Avg.Avg. Avg.Sharpeof%Avg.ProfitAvg.Avg. Bars BarsMarket Net Profit K-ratio RatioMax DD Trades Win Contracts Per Con. WinLoss Win LossFXAD–127,600 0.00 –0.07 –376,330623525.89–7459,941 –35,927 8428BP–33,788 –0.07 –0.02 –742,963622718.17–3774,260 –28,979 9631CD140,1600.03 0.06 –425,460623947.596573,770 –41,507 8227JY1,632,863 0.42 0.77 –154,638465013.572,39594,096 –29,086 105 24SF1,136,625 0.25 0.62 –229,650454415.521,63095,204 –30,628 114 29RatesED3,383,675 0.22 1.20 –148,050414993.71427 117,724 –34,026 108 28TY932,1090.16 0.43 –282,438523828.60635 103,526 –35,175 105 28US561,5310.08 0.28 –450,156573720.1646189,970 –37,760 9727StockSP–554,988 –0.06 –0.30 –694,02572258.45–94179,418 –37,075 8926MetalsGC857,4800.19 0.35 –227,780514742.7739177,924 –37,676 9030HG–49,0000.03 –0.03 –652,688633730.98267,910 –38,957 8724PL–389,605 –0.14 –0.19 –931,880633348.95–14456,597 –38,842 8628SL–391,445 –0.03 –0.18 –680,895613131.66–21661,210 –37,627 9529EnergyCL1,190,880 0.24 0.51 –309,060574729.1968384,801 –38,440 8125HO618,7480.12 0.25 –313,194574224.5338781,189 –42,644 8825HU418,1980.06 0.19 –374,136653523.5324976,724 –32,930 7828GrainsC1,111,700 0.18 0.46 –323,963504673.2928789,370 –37,184 9231S–500,313 –0.08 –0.27 –996,988623431.59–29648,479 –38,968 7633W887,4000.17 0.40 –373,300534251.8132995,539 –38,682 100 26MeatsFC483,2250.04 0.24 –340,435623740.5219174,095 –31,370 8527LC–34,488 –0.08 –0.02 –534,596613148.00–6673,057 –37,651 9826LH–30,4480.06 –0.01 –413,196593131.88–2286,306 –38,888 9332PB–205,988 –0.08 –0.09 –698,408593121.25–17777,294 –39,341 9830SoftsCC205,2000.00 0.11 –427,850494349.245457,120 –38,224 106 26CT417,9750.00 0.21 –701,855573024.43322 114,048 –37,256 110 28JO–486,480 –0.05 –0.21 –1,191,150 682435.22–20589,746 –37,036 101 26KC1,582,489 0.18 0.53 –345,300454411.932,656 118,394 –37,657 106 30LB563,9200.03 0.18 –692,048643433.20261 112,033 –45,503 9124SB225,6800.06 0.11 –295,030534353.967770,576 –46,770 9625Average 451,5240.06 0.18 –477,582553633.6531180,011 –36,060 912716,000,00014,000,00012,000,00010,000,0008,000,0006,000,0004,000,0002,000,0000
0.870.860.86
© 2002 Lars Kestner – All Rights Reserved
FIGURE
8.15a
Moving Average Confluence Method Strategy Applied to Futures.
Net Profit3,612,6281,670,7301,269,0812,564,749683,2151,568,564
Year199019911992199319941995
8.15b
AverageSharpe Ratio0.270.48–0.30–0.010.310.200.030.16
1991
K-ratio0.910.240.330.400.370.33
1992
Sharpe Ratio2.641.041.031.960.651.69
1993
Year199619971998199920002001
1994
Year
1995
1996
K-ratio–0.020.000.11–0.330.070.34
Net Profit by Year
Net Profit23,015835,068317,949–798,958622,9261,100,376
AverageWin79,45477,80579,41865,91080,90477,79677,68893,653
Average Avg. Bars Avg. BarsLossWinLoss9628–33,2257821–26,7408926–37,075–38,27590288226–38,0059030–38,278–36,813942910226–40,408
1997
1998
2000
2001
© 2002 Lars Kestner – All Rights Reserved
1999
Num. ofNumber of Profitable PercentSharpe RatioLength Windows Windows Profitable860.0159.72%1 Month144142910.7964.08%3 Months1391070.3376.98%6 Months133110–0.3482.71%12 Months1080.6385.04%18 Months1271211070.6888.43%24 Months
Average Avg. ProfitAverageAverageMax DD Num Trades % Win Per Contract5539796–385,8083831381–220,1617225–941–694,025–623,311608376042440–332,1305540107–564,750–496,6596032–185636527–608,872
Performance Breakdown by Year
AverageK-ratio0.130.11–0.060.010.140.09–0.020.04
Moving Average Confluence Method Strategy Applied to Futures.
FIGURE
1990
AverageNet Profit549,6521,219,329–554,9886,858742,609499,59653,075418,131
4,000,0003,500,0003,000,0002,500,0002,000,0001,500,0001,000