You are on page 1of 69

" Technical tool insight: Price breakout" BY ACTIVE TRADER STAFF (Active Trader, March 2001)

Breakout Trading Technique article collections: BASIC and ADVANCED ..............................

2 5 9

"More bang for your buck: Patterns within patterns" BY ACTIVE TRADER STAFF (Active Trader, October 2000) "Anticipating breakouts and beating slippage" BY STEVE WENDLANDT (Active Trader, August 2000)

.............................

............................... .......................... ......................

"Trading System Lab: 100-20 channel breakout system" BY DION KURCZEK (Active Trader, June 2003) . . . . . . .

13 16 18 20 23 28 32 35 39 41 42 47 53 58 60 62 64 66
1

"Futures Trading System Lab: 100-20 channel breakout system" BY DION KURCZEK (Active Trader, June 2003) . . . . . . . . . . . "Futures Trading System Lab: 60-minute breakout system" BY VOLKER KNAPP (Active Trader, January 2004) . . . . . . .

.........................

"Futures Trading System Lab: Four-percent breakout system" BY VOLKER KNAPP (Active Trader, September 2004) . . . . . . . "Broadening patterns: Clues to breakout direction" BY THOMAS N. BULKOWSKI (Active Trader, April 2004)

.......................

.............................

"High, tight flag helps squeeze out profits" BY THOMAS N. BULKOWSKI (Active Trader, December 2004) "Mastering two-minute breakouts" BY KEN CALHOUN (Active Trader, September 2001) "Swing trading 10-day channel breakouts" BY KEN CALHOUN (Active Trader, March 2002)

..........................

..............................

.................................

"Trading System Lab: Volatility breakout system" BY THOMAS STRIDSMAN (Active Trader, October 2002)

............................. .....................

"Futures Trading System Lab: Futures volatility breakout system" BY THOMAS STRIDSMAN (Active Trader, October 2002) . . . . . . . . "Better breakout trading: The noise channel system" BY DENNIS MEYERS, PH.D. (Active Trader, September 2001)

.......................... ......................

"The long and short of it: The noise channel breakout system 2" BY DENNIS MEYERS, PH.D (Active Trader, October 2001) . . . . . . "The multibar range breakout system" BY DENNIS MEYERS, PH.D (Active Trader, January 2004) "Trading System Lab: DeMark variation" BY THOMAS STRIDSMAN (Active Trader, September 2001) "Trading System Lab: Dynamic breakout system" BY THOMAS STRIDSMAN (Active Trader, February 2003)

............................

........................... ............................ ..........................

"Futures Trading System Lab: Dynamic breakout system" BY THOMAS STRIDSMAN (Active Trader, February 2003) . . "Futures Trading System Lab: Experimenting with exits" By VOLKER KNAPP (Active Trader, June 2004) . . . . . .

...........................

"Futures Trading System Lab: Monthly breakout" BY DION KURCZEK AND VOLKER KNAPP (Active Trader, March 2004) . . . . . . . . . . . . . . . . . . . . . . . . . . "Trading System Lab: 60-minute breakout system" BY VOLKER KNAPP (Active Trader, January 2004) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ACTIVE TRADER www.activetradermag.com

68

TRADING Basics

Technical tool insight:

Price breakout
ished its effectiveness to the point that many traders look for false breakouts (when price pushes through a breakout level, only to reverse back through it) at these levels, to take positions against the direction of the initial breakout (referred to as fading the breakout). Breakouts are not limited strictly to moves to new highs of a certain number of bars (i.e., 10-bar, 20-bar or 40-bar breakouts). As mentioned, price can also break out through the support and resistance levels of trading ranges, or other past technical milestones such as long-standing highs or lows. Figure 1 shows 40-day breakout levels on a daily chart. Figure 2 shows 20-bar breakout levels on a 10-minute chart. Figure 3 shows a breakout above the resistance level defined by a past significant high.

Price breakouts are the basis of many of the most successful trading approaches. We explain the basics of this trading technique.

he price breakout is one of the simplest and most powerful concepts in trading. It occurs when price moves forcefully out of a consolidation or trading range (a period of relatively narrow, sideways price movement) or pushes above or below an established price level (support or resistance), initiating either temporary followthrough or a sustained trend. The act of pushing to new highs or lows (especially if the price level in question has been repeatedly tested in the past) is evidence of strong momentum and suggests the market has the potential to continue in that direction. In other words, the basic logic behind price breakouts is that a market making new highs (and with potential for further price gain) is exhibiting strength and should be bought, while a market making new lows (and with potential for further price decline) is exhibiting weakness and should be sold. For example, the reason new 52-week highs or lows in stocks are so commonly referenced is because of the implied significance of price breaking through these levels. This concept of price movement is valid on intraday time frames as well as daily or monthly ones.

The four-week highs or lows simply represent natural resistance and support levels. This kind of trading system is often referred to as stop-and-reverse (SAR), because when a trade signal is generated, the existing position is liquidated (stopped out) and a new position (a reverse of the previous one) is established. This basic trading rule which gained widespread popularity as the 20-day breakout was integral to many popular mechanized trading strategies, most famously those of futures trader Richard Dennis group of trend-followers known as the Turtles. Trend-following traders (especially in the futures markets) used this simple technique, or a variation of it, to exploit strong trends in the 1970s and 80s. However, the widespread popularity of the 20-day breakout level has dimin-

FIGURE 1 DONCHIAN BREAKOUT CHANNELS, DAILY 40-day Donchian breakout levels, both high and low. A basic breakout approach is to buy when price exceeds the n-bar (in this case, the 40-day) high and sell when it falls below the n-bar low.
Highest price of last 40 bars Oracle Corporation (ORCL), daily
45

40 37.00 35

Donchian breakout levels


The term breakout is often associated with Richard Donchian, the first person to popularize the systematic use of breakout levels. His basic approach was called the Donchian four-week rule, which consisted of the following: 1. Go long (and cover short positions) when the market makes a new fourweek high (that is, when price exceeds the highest price of the previous four weeks). 2. Go short (and cover long positions) when the market makes a new fourweek low (that is, when price drops below the lowest price of the previous four weeks).
2

30 26 916 25

Lowest price of last 40 bars

21.50 20

15

27 3 10 24 31 7 14 28 6 13 20 27 3 10 24 1 8 15 22 30 5 12 19 26 3 10 17 24 31 7 14 21 28 5 11 18 25 2 9 16 23 30 6 13 27 4 Jan. 2000 Feb. Mar. Apr. May June July Aug. Sept. Oct. Nov. Dec.

Source: QCharts by Quote.com

www.activetradermag.com March 2001 ACTIVE TRADER

Glossary
FIGURE 2 DONCHIAN BREAKOUT CHANNELS, INTRADAY The breakout concept is applicable to any time frame. Here, the highest 20-bar highs and lowest 20-bar lows are shown by the channel lines.
Oracle Corporation (ORCL), 10-minute
27.25 27 26 916 26

Highest price of last 20 bars

25

24 23.81 23

A false breakout occurs when price pushes through a support or resistance level in the anticipated direction, suggesting a new price thrust or trend, only to (relatively) quickly reverse direction when no real followthrough materializes. Because traders who bought or sold on the initial breakout may all scramble at once to get out of their trades when the market fails to follow through, the reversal can be quite forceful. For this reason, contrarian traders sometimes fade initial breakouts to capitalize on these short-term reversals. Stop-and-reverse (SAR) refers to a trading approach that is always in the market, long or short. The existing position is liquidated (stopped out) and a new position (a reverse of the previous one) is established, using the same signal in the opposite direction. For example, a simple 40-day SAR breakout system would buy when price exceeds the highest high of the last 40 days and sell when price falls below the lowest low of the last 40 days. Support and resistance. Support is a price level that acts as a floor, preventing prices from dropping below that level. Resistance is the opposite: a price level that acts as a ceiling; a barrier that prevents prices from rising higher.

Lowest price of last 20 bars


14 15 10 11 12 11/28 Tuesday 13 14 15 10 11 12 11/29 Wednesday 13 14 15 10 11 12 11/30 Thursday 13 14 15

22

10 12/1 Friday

Source: QCharts by Quote.com

The Donchian-type breakout is also commonly referred to as a price channel breakout.

Application
Traders using breakouts are basing their trades on the following principle: If price momentum is strong enough (either up or down) to push through a significant technical level, there is a good chance price will continue in that direction for at least a while. As a result, these price levels represent logical trade entry and exit levels with well-defined risk, both for traders who expect follow through in the direction of the breakout and, as will be described shortly, traders who are looking to fade breakouts.

ing range, traders who go long on the breakout can place protective stops in a number of technically logical places, in relation to the range. First, the stop could be placed below the low of the trading range. Second, a more conservative stop placement would be in the middle of the trading range (or in the upper 25 percent of the trading range, etc.). Finally, the most conservative alternative is a stop just below the original breakout level, which might be used by

FIGURE 3 BREAKOUT ABOVE PRIOR HIGH A prior high creates a resistance level that is tested multiple times before price breaks out to the upside. A significant trending move follows.
Sun Microsystems Inc. (SUNW), Weekly
28 25 5964 24

Key points
Price breakouts are typically used as trend-following signals. The greater the number of days (or price bars) used to determine the breakout, the longer-term trend the trading system will reflect and attempt to exploit. For example, a 20-day (or 20-bar) breakout would capture shorter trends than a 40-day breakout, which in turn would reflect shorter trends than an 80-day breakout. Generally, in terms of trend-following approaches, the longerterm the breakout, the more significant the price move and the greater the likelihood of sustained follow through. Breakout trading can also simplify risk control because stop-loss levels are often easy to identify. For example, if price breaks out of the upside of a trad-

Breakout above previously tested high

20

16

12

Jan. 1997

Apr.

July

Oct.

Jan. 1998

Apr.

July

Oct.

Jan. 1999

Source: QCharts by Quote.com

ACTIVE TRADER March 2001 www.activetradermag.com

FIGURE 4 TRADING RANGE BREAKOUT WITH STOP LEVELS The boundaries of a trading range provide logical stop levels for a breakout trade. After a downside breakout of the range, a trader, depending on how conservative he was, could place a stop-loss order at the original breakout level, the midpoint of the range (or some other point within the range) or the upper level of the range.
American Express Inc. (AXP), 2-minute Far side of trading range (stop 1) Midpoint (stop 2)
54 55

53

Trading range

Breakout level (stop 3)

51 1516

51

10:00 10:30

11:00 11:30 12:00 12:30 13:00 13:30 14:00 14:30 15:00 15:30

9:30 10:00 10:30 11:00 11/21 Tuesday

trading range and possible stop points. Figure 5 shows the reverse situation. The stock first breaks out to the downside of the trading range, but this turns out to be a false breakout. The stock reverses back into the trading range and eventually breaks out through the upside of the trading range. Again, the boundaries (and the midpoint) of the trading range provide logical stop levels both for the initial downside breakout and the subsequent upside breakout. Because of the possibility of false moves at popular breakout levels, traders looking to capture trending moves sometimes use confirming signals to improve the likelihood of success. For example, after an initial upside breakout, the trader may wait for the market to stay above the breakout level (or close above it) for a certain number of bars, or penetrate it by a certain percentage. Such techniques delay entry and limit profit potential (and will result in some missed trades), but they can also cut down on false signals.

Source: QCharts by Quote.com

Bottom line
The breakout concept is one of the most important in technical trading. Buying markets showing strength (upside breakouts) with further potential for upside movement, and selling markets showing weakness (downside breakouts) with further potential for downside movement is the basis of many trading plans and systems on many time frames. Similarly, false breakouts are the foundation of some counter-trend trading techniques. The breakout concept is also easily mechanized for traders interested in a systematic approach.

a very short-term trader. All these choices have one thing in common: The placement of the stop corresponds to a price move that negates the validity (to varying degrees) of the original breakout. Whenever the original

reason for a trade is nullified, that position should be eliminated. (Note also, the second and third options would be likely short entry points for traders looking to fade the upside breakout.) Figure 4 shows a downside breakout out of a

FIGURE 5 FALSE BREAKOUT AND REVERSAL In this case, the stock first breaks out below the bottom of the trading range, only to reverse back into the trading range and eventually break out through the top of the range. In either case, the stop-loss levels are again easily identified.
Microsoft Corporation (MSFT), daily
38 36 35 2364 34 32

Additional research:
Trading for a Living by Alexander Elder John Wiley & Sons, 1993 Trading Systems and Methods by Perry Kaufman 3rd edition, John Wiley & Sons, 1998 Technical Analysis of the Financial Markets by John Murphy New York Institute of Finance, 1999 Street Smarts by Linda Raschke and Laurence A. Connors M. Gordon Publishing Group, 1995 Schwager on Futures: Technical Analysis by Jack Schwager John Wiley & Sons, 1996

Far side of trading range Trading range

30 28 26

Midpoint

24 22 20

False breakout

Original breakout level

25 2 9 16 23 30 6 13 20 27 3 10 18 24 3 10 17 24 31 7 14 21 28 5 12 19 27 2 9 16 23 30 7 14 21 Dec. Jan. 1997 Feb. Mar. Apr. May June July

Source: QCharts by Quote.com 4

www.activetradermag.com March 2001 ACTIVE TRADER

TRADING Strategies

More bang for your buck:

PATTERNS WITHIN PATTERNS


hat makes a good trade? Well, in retrospect, most traders would say a nice profit makes a good trade. But when youre putting a position on, the outcome is unpredictable. Wed all like to know a trade will be good in advance, but alas, the markets are not so accommodating. What you look for when youre getting in a trade is an entry point where the odds of a move in your favor are better than average. Then, by having a plan FIGURE 1 FALSE BREAKOUT A trading range develops in the aftermath of a sharp rally. After an initial upside breakout, the stock reverses to the downside, stopping out the long position.
Microsoft Corporation (MSFT), daily Upside breakout
82 80 78 76

Support level used as initial stop

Stopped out

74 72 58 72 70 68

12

19

26

3 July

10

17

24

31 Aug.

Source: Qcharts by Quote.com

that determines when and where youll exit with either a loss or a profit, you try to structure a trade where the potential reward is greater than the known risk. The advantage of trading breakouts of congestion patterns such as trading ranges, triangles, flags and pennants is that these formations allow you to clearly define the risk on your trades. For example, if a stock moves into a trading range after a rally, you may look to buy an upside breakout of the range in anticipation of a continuation of the uptrend. The logical place to put an initial protective stop is below the low of the trading range, because a downside reversal through the support of the range would be a bearish development. Figure 1 provides an example. In late June, Microsoft (MSFT) established a relatively narrow trading range after approximately a 16-point rally. The stock broke out of the upside of the range (around 80 18) on July 6. The initial protective stop would have been placed just below the support level of the trading range, around 76 12. A move back below this level would suggest the upside thrust was actually a false breakout and that the trade should be exited. Thats exactly what happened. Two days after entry the stock had pulled back into the trading range. It moved sideways to lower over the next several days before, on July 19, penetrating the downside of the range and stopping out the long trade. The risk on this trade was a moderate 3 58 points. But what do you do when a trading range is much wider and a stop based on either the support or resistance level represents too large a risk? Figure 2

www.activetradermag.com October 2000 ACTIVE TRADER

How to create trade opportunities with increased reward and decreased risk by trading patterns within patterns.
FIGURE 2 RANGE RISK Using the opposite side of a trading range as a stop for a breakout trade can result in large initial risk if the trading range is wide.
International Business Machine Corp. (IBM), daily
130 125 120 1516 120 115

shows a much more volatile trading range than that in Figure 1. Using the same approach as in the previous example buying on an upside breakout of the trading range and placing an initial protective stop below the low of the range would represent considerable risk. As a result, some traders place the initial stop in the middle of the trading range. This more conservative method is based on the idea that a strong breakout move should follow through immediately and not reverse back into the trading

110 105 100 95 90


4 11 18 25 1 8 15 29 6 13 27 3 10 24 31 7 14 28 6 13 20 27 3 10 24 1 8 15 22 30 5 12 19 26 3 10 17 24 31 7 14

Nov.

Dec. Jan. 2000 Feb. Mar.

Apr.

May

June

July

Aug.

Source: Qcharts by Quote.com

FIGURE 3 CONGESTION WITHIN CONGESTION A shorter, narrower trading range forms just at the resistance level of a larger range. Using the support level of the smaller range as a protective level for an upside breakout substantially reduces the trades initial risk.
Oracle Corporation (ORCL), daily
90

range. Another way to reduce risk on breakout trades is to look for shorterterm patterns within larger patterns that allow you to place your initial stop-loss closer to your entry point.

Patterns within patterns


When the risk implied by a particular trading range is exceptionally large, you can look for smaller congestion patterns near the support or resistance levels of the range. Basing entry and stop points on the levels defined by the smaller pattern can reduce the risk on the trade as well as provide the opportunity for early entry into the position. Figure 3 shows the formation of a wide trading range in Oracle (ORCL) at the beginning of this year. A trader looking to enter long on an upside breakout of this range would have to accept a risk of more than 16 points, assuming the bottom of the range was used for the initial stop-loss. However, a much narrower trading range developed in February. Using this range as the basis of an upside breakout trade would have offered the same entry
6

80 77

Wider trading range


70

{
Oct. Nov. Dec. Jan. 2000 Feb. Source: Qcharts by Quote.com

{
Narrow range

60

50

40

30

4 11 18 25 1 8 15 22 29 6 13 20 27 3 10 18 24 31 7 14 22 29 6 13 20 27 3 10 17 24 1 8 15

Mar.

Apr.

May

ACTIVE TRADER October 2000 www.activetradermag.com

FIGURE 4 FLAG NEAR RESISTANCE A small flag forms just below a well-defined resistance level, offering early entry into the upside thrust move.
EMC Corporation (EMC), daily
90 12

Resistance
80

Flag

70

60

50

40

The advantage of trading breakouts of congestion patterns such as trading ranges, triangles, flags and pennants is that these formations allow you to clearly define the risk on your trades.
point but a much closer stop. In this case, placing a stop one tick below the low of the narrower trading range would have reduced the risk to 6 34 points. For a short-term trader, this represents a large stop, but its still a dramatic improvement and the profit potential for the move out of the larger trading range is still intact. (Later, well look at the practical risk-reward impact this can have on a trade.) Figure 4 provides another example. In this case, EMC Corp. (EMC) repeatedly pulled back from resistance around 72 12. Because a well-defined horizontal trading range did not develop (the stock swung back and forth in an increasingly wider range), the most recent swing low around 51 would be the reference point for the initial stop-loss a risk of more than 20 points. However, as the stock bounced off that low and made another run at the resistance level, it formed a flag consolidation from June 7 to June 12 with a high around 69 78 (the highs of the bars in the flags were within 116 of each other) and a low around 66 1316. The upside breakout of this flag provided an early entry to the subsequent surge that pushed the stock past the 72 12 resistance level to new highs. Figure 5 shows a 15-minute chart of the Nasdaq 100 tracking stock (QQQ). The stock formed a large bottoming pat-

30
27 4 11 18 25 1 8 15 29 6 13 27 3 10 24 31 7 14 28 6 13 20 27 3 10 24 1 8 15 22 30 5 12 19 26 3 10 17 24 31 7

Oct. Nov. Dec. Jan. 2000 Feb. Mar. Source: Qcharts by Quote.com

Apr.

May

June

July

Aug.

FIGURE 5 NARROW FLAG A narrow flag consolidation forms near the resistance level of an intraday head-and-shoulders bottom pattern. The low of the flag provides a lower-risk stop level than the most recent swing low.
Nasdaq 100 Index (QQQ), 15-minute
93 38 92

Resistance
88

84

Narrow flag

80

S H 19 May 22 23 24 25

76

26

30

31

1 June

Source: Qcharts by Quote.com

www.activetradermag.com October 2000 ACTIVE TRADER

FIGURE 6 EARLY ENTRY tern (a head-and-shoulders bottom pattern; the preceding sell-off is not shown) with resistance around 82 58. As the stock approached the resistance level for the second time, on May 30, it consolidated in a narrow flag pattern with resistance around 82 732 and support around 81 58. Playing an upside breakout of this pattern and using its support level for the initial stop (rather than the most recent swing low around 76) reduced the risk on a long trade to less than a point. A final example is shown in Figure 6. Here, in the middle of a larger trading range with resistance around 32 38, Motorola (MOT) formed a flag consolidation in late-October 1999 that offered the opportunity to trade an upside move with lower risk. The stock gapped out of the flag (a bullish sign) above 31 12 and continued to run past the resistance of the larger trading range. Placing a stop just below the flag support at 29 1516 would have reduced the initial risk on the trade to less than two points. As was the case with Figure 4, the smaller pattern allowed you to both use a tighter stop and get in earlier on an upside breakout. A flag forms in the middle of a larger trading range. Even though price gapped above the flag, playing the upside of this smaller pattern offered early entry and a tighter stop on a long-side trade.
Motorola, Inc. (MOT), daily
52 49 171256 48

44

Trading range
40

36

32

Flag
28

3 10 17 24 1 7 14 21 28 6 12 19 26 2 9 16 23 30 7 13 20 27 4 11 18 26 1 8 15 22 29 6 13 20 27 3

May

June

July

Aug.

Sept.

Oct.

Nov.

Dec.

Jan. 2000

Source: Qcharts by Quote.com

Structuring a trade
Figure 3 provides a good example of how this approach can work in the context of a complete trade plan. The rally from the late-October 1999 low to the early-

Using the measured move approach on the smaller price swing from Jan. 28 low of 46 58 to the Feb. 14 high of 64 34 (18 18 points) sets up a shorter-term price target of 77 716. This level would mark a good spot to take at least partial profits on the position and raise the stop on the balance of the position. The stock actually formed

When the risk implied by a particular trading range is exceptionally large, you can look for smaller congestion patterns near the support or resistance levels of the range.
January 2000 high was 41 732. The stock then moved sideways, forming the larger trading range. A trader looking to buy on an upside breakout of the range could use the measured move approach, whereby the size of the previous price move is added to the current price, to project a price target. Adding the size of the price move preceding the trading range to the low of the larger trading range (around 46 58) results in an upside target of 87 2732. another flag after hitting a high of 76 12 on Feb. 28. This consolidation marked an opportunity to exit part of the position with a profit; the stop on the remainder of the position could then be moved up to the breakeven point, locking in a profit on the trade. (For more information on taking profits and moving stops, see Opening day opportunities, p. 42.) The bottom line: The development of the smaller trading range allowed the estab-

lishment of a trade with a price target based on the larger, longer-term price pattern with a risk based on the smaller, shorter-term price pattern. Another general advantage of this approach is that it increases your flexibility. Even if you are stopped out on a move through the support of the smaller congestion pattern, you can still re-enter a long position if the market reverses again and breaks out above resistance a second time. For example, a trader who went long on the intraday upside thrust above resistance (say, at 62 58) on Feb. 14 and used the low of the smaller trading range (around 58 58) as the stop level, would have been stopped out on the intraday downside thrust on Feb. 22. However, as mentioned earlier, this loss is much smaller than the one that would have occurred had the stop been placed below the low of the larger trading range, which was nearly 12 points lower. These patterns may develop relatively infrequently, but they fulfill the primary goals of smart trading: They allow you to establish trades with shorter-term risk and longer-term profit potential. In future articles well expand on these ideas by looking at additional measuring objectives and ways to put breakouts into context in relation to underlying trends of different magnitudes.
8

ACTIVE TRADER October 2000 www.activetradermag.com

TRADING Strategies

Anticipating BREAKOUTS and beating SLIPPAGE


Trading breakouts is a tried-and-true approach on all time frames. But intraday and other short-term traders can sometimes give up precious points because of slippage.

Heres one traders take on finding setups that allow you to enter early and beat the breakout crowd.

www.activetradermag.com August 2000 ACTIVE TRADER

BY STEVE WENDLANDT

ne of the most important aspects of short-term stock trading is something you almost never hear about: Slippage. Slippage is the difference between where you expect, or want, to be filled on a trade and where your order is actually executed. If you dont understand this concept, try to enter a market order with a browser-based online broker the first day of a hot IPO and see what happens. Thats slippage! Slippage can be caused by a number of factors: Poor execution by a broker, communication failure or other technical problems, or fast market conditions. While its true that we all try to keep our costs down to the bare minimum without sacrificing service or technology, slippage is probably the most overlooked and significant cost in trading. But through a little-known tendency, you can make slippage work for you instead of bleeding you dry. In fact, if most of your trading techniques are breakout related, you can use this trick on almost every trade you enter. But first, lets look at why it works.

more a particular level is tested, the weaker it becomes. In laymans terms, if a stock continually prints or finds support or resistance at a certain price, the odds are extremely good that price level will be broken shortly. That is invaluable information for any trader who uses breakouts as part of his or her strategy. Figure 1 is a five-minute chart of CMGI. The stock bounced off support at 50 six times (and who knows how many prints actually occurred at that level). Every time a stock tests a support or resistance level, that level gets weaker and weaker, as if a hammer and chisel were chipping away at it. Fortunately, most people view support levels as opportunities to go long, while breakout traders view tests of support as fuel to propel an eventual breakout. In this example, not only are traders establishing new long positions with their stops just below the support level at 50, there are also many traders waiting to short the stock once it does break down. Dont forget that all the people FIGURE 1 CHISELING AT SUPPORT

who bought the stock around $50 will either be stopped out or will wait for an opportunity to breakeven on their trades. The bottom line is that when support at 50 is penetrated it quickly turns into significant resistance. Heres the question: If, because of repeated tests of the support level, the odds are very good the 50 level will be broken (and the broader market indices support this view), why wait for the breakout? Doing so increases the odds of having to chase the market or missing the trade. In this case, if you wait for the stock to trade at 49 1516 and then try to establish a short position, youll probably end up missing the trade waiting for an uptick. Lets look at a second example. In Figure 2, Netro Corp. (NTRO) was bouncing off the 82 12 level for about two weeks. The day it finally broke that support level (March 30, 2000) was a very weak day in the broader market indices, which helped the stock to finally break down. A good opportunity to short NTRO came at the prior days close when NTRO closed right at the support

One tick at a time


Tom DeMark, a highly regarded trading system developer who has worked with such top traders as George Soros, Paul Tudor Jones and Steve Cohen, wrote a book (his second) called New Market Timing Techniques: Innovative Studies in Market Rhythm and Price Exhaustion (1997, John Wiley & Sons, New York). In it, he explained what probably is one of the most significant discoveries in the markets: the TD One-Tick, One-Time Rule. This rule states if a market makes a new high or low just once (a single print) and backs off from that point, that new high or low should hold for a significant period of time. In fact, most significant highs and lows only print one time at the extreme price. It makes sense that the opposite also is true: If a price prints more than once at a certain high or low, then that high or low will be broken in short order almost every time. From that, it follows the

Repeated tests of a support level increase the odds of a downside breakout. A short position can be established in anticipation, with a stop just above the most recent swing high to protect against an upside reversal.
CMGI (CMGI), 5-minute
10:00 11:00 12:00 13:00 14:00 15:00 16:0010:00 11:00 12:00 13:00 14:00 15:00 16:00

61 59 Stop placed at most recent swing high (50 34) 57 55 53

CMGI repeatedly tests support at 50 in a weak market

51 18 51 49 47

350,500

Source: CyberTrader by CyberCorp.

ACTIVE TRADER August 2000 www.activetradermag.com

10

FIGURE 2 EARLY OPPORTUNITIES A close at the low of the bar preceding the downside breakout, just at the support level, offers an early entry opportunity for a short position.
Netro Corp. (NTRO), daily
Jan. Feb. Mar. Apr. May 122 109 12

Stock tests support in weak market. Short trade entered at 82 916

97 8412 72 5912 47 3412 25 1116 5,820,000

Source: CyberTrader by CyberCorp.

level for the second day in a row. The next morning NTRO gapped lower and continued to drop dramatically. It would have been difficult to get short after the

market opened for trading on the day of the breakdown (although, there were some upticks in the pre-market). All breakout traders know its very

FIGURE 3 GOING WITH THE MARKET Pre-breakout entry should be confirmed by the broader market indices. In this case, establishing a position in advance of a breakout above the trendline was supported by strength in the S&P 500 and Nasdaq indices.
Warner Lambert (WLA), daily
Jan. Feb. Mar. Apr. May 130 125 964 12312

Stock tests trendline resistance in strong overall market. Entered long at 122 14 (before the breakout).

117 11012 104 9712 91 8412

8,434,900

Source: CyberTrader by CyberCorp.

difficult to get short once a stock breaks through support, if the trade is any good. You must either wait for an uptick (which may not happen) or offer it short 1 16 higher than the inside bid (for Nasdaq stocks). But if the stock is dropping like a rock, who is going to hit your offer? The bottom line is that if you want to trade a stock when the overall market is trending in the direction of your potential trade, and the stock repeatedly tests a support or resistance level, you should enter before the breakout. Most times, you even can avoid paying the spread because the stock will be whipsawing back and forth between the bid and offer. If you wait until the stock breaks out you are almost always forced to pay the spread if you can get it at all. But, you may ask, what if the stock never breaks out? Should you hold the position until it does, or should you exit the position on the close? One approach to reduce risk is to use the last swing low or high as your initial stop-loss point. In the CMGI example, you could have placed an initial stop loss at 50 34 which was the last swing high on the fiveminute chart. With a stop in place, you can simply wait for the breakout to materialize. The only reason not to hold the position is if the overall market begins to move counter to the trade (i.e., youre long, waiting for the breakout, and the market begins to drop precipitously). But you must use caution when entering breakout trades early; you never want to enter a trade that is counter to the overall market momentum. For example, before entering the CMGI trade on the short side, you should have checked to make sure the Nasdaq and S&P 500 were both weak on the day and trending lower. The weakness of these indices would help pull the stock below the support level. Figure 3 shows one last example. On May 25, Warner Lambert (WLA) opened for trading at 121 12, just under the down trendline of a nice triangle pattern. The pre-opening call was for the Nasdaq and S&P 500 to go higher that morning, and they both began to rally from the open. This created a setup to go long before the actual breakout above the trendline. As soon as WLA began to move toward the trendline, a buy order was entered at

11

www.activetradermag.com August 2000 ACTIVE TRADER

FIGURE 4 BREAKOUT PATTERNS A sampling of the breakout patterns short-term traders can use on any time frame. They provide well-defined support or resistance levels you can use to anticipate breakouts.

Cup and handle breakout

Trendline breakout

Spike and ledge breakout

Triangle breakout

122 14, well before the 123 116 breakout point. Not long after, the overall market strength helped pull WLA through the trendline; it continued to rally for the rest of the day. Had you waited for WLA to print at 123 116, you would have been filled at a minimum of 1316 worse than the early entry price. Those extra fractions add up quickly. You can usually gain an extra 18 (sometimes as much as a point) simply by realizing that support and resistance almost always get broken. Try the following experiment: Multiply 50 percent of all the shares you have traded over a given time period by 18 and see what you come up with. Thats being conservative. You can use this entry technique on any breakout-related trade in any timeframe, including breakouts from daily and intraday cup-and-handle patterns, triangles, trendline breakouts and spike and ledge patterns (see Figure 4). Very rarely should you wait for the actual

breakouts to materialize on any of these patterns. Remember, slippage affects you whether or not you make a profit on the trade. Most traders dont even think about the effect of slippage on their winning trades; they only think about the losers. And dont forget about the trades you missed completely because the stock just ripped through the support or resistance level and you couldnt even get a partial fill. We tend to forget about those missed opportunities completely, but those are usually the most potentially profitable trades because the stock is moving so forcefully. This approach will also help you on the breakout trades that dont materialize because youll have a better entry price and may even be able to still garner a small profit or, at worst, scratch a trade from these false breakouts. No approach is without risk, but in certain situations entering early can yield excellent trading results.
12

ACTIVE TRADER August 2000 www.activetradermag.com

100-20 channel breakout system


System concept: This is a classic trend-following system that buys when price moves above the highest high of the last x days and sells when price falls below the lowest low of the last y days. The number of days used to calculate the breakout level is called the channel length. Breakout systems are based on the logic that by making a new price high (or low), a market is demonstrating it has the momentum to establish a trend, and price will likely continue in that direction. In this test, one long channel length (100 days) was used for entries, and a short channel length (20 days) was used for exits. The exit strategy allows the system to follow large moves until price makes a significant reversal. We will also examine the results of using a range of channel lengths and how a walk-forward optimization could improve the results of the system for the most recent year. Rules: 1. Enter long on the next bar at the highest 100-day high. 2. Exit long on the next bar at the lowest 20-day low. 3. Enter short on the next bar at the lowest 100-day low. FIGURE 2 SAMPLE TRADES

FIGURE 1 EQUITY CURVE


The long- and short-only equity curves, along with the overall equity curve, are shown here. The long side of the system substantially outperformed the short side during the 10-year test period
190,000 180,000 170,000 160,000 150,000 140,000 130,000 120,000 110,000 100,000 90,000 80,000 70,000 60,000 50,000 40,000 30,000 20,000 10,000 0 3/3/93 3/2/94 Equity

Account balance ($)

3/1/95 2/6/96 Cash

2/3/97

2/2/98 1/7/99 1/3/00 Linear reg Long

1/2/01

1/2/02 Short

1/2/03

4. Exit short on the next bar at the highest 20-day high. Money management: Risk a maximum of 2 percent of total account equity per trade. The position size is based on the difference between the entry price and the initial stop level. Trade the number of shares that would result in a 2-percent loss of account equity if the stop level were hit. Starting equity: $100,000. Deduct $10 slippage and commission per trade. Test data: The system was tested on the Active Trader Standard Stock Portfolio, which contains the following 18 stocks: Apple Computer (AAPL), Boeing (BA), Citibank (C), Caterpillar (CAT), Cisco (CSCO), Disney (DIS), General Motors (GM), Hewlett Packard (HPQ), International Business Machines (IBM), Intel (INTC), International Paper (IP), JP Morgan Chase (JPM), Coke (KO), Microsoft (MSFT), Sears (S), Starbucks (SBUX), AT&T (T) and Wal-Mart (WMT). Test period: January 1993 through February 2003. System results: The systems performance was mediocre, at best: It returned only 12.61 percent over 10 years, while buy and hold would have returned more than 253 percent. Furthermore, the system was exposed to the market nearly 75 perwww.activetradermag.com June 2003 ACTIVE TRADER

This short trade was triggered when price crossed below the 100-day low. The exit occurred when price crossed above the 20-bar high. The 100- and 20-day high/low channels are plotted as gray lines.
50.00

Boeing (BA), daily


48.00 46.00 44.00 42.00 40.00 38.00 36.00 34.00 32.00

Short

Cover
Volume

30.00 10.00 M 5.00 M

August 2002 September Source for all figures: Wealth-Lab Inc. (www.wealth-lab.com)

October

November

13

cent of the time, which means we are squeezing just about as much performance out of this system as possible, short of using margin or some other form of leverage. It is interesting to note, however, that the long side of the system performed much better than the short side. The net return for long trades was 56 percent, with only 38-percent market exposure. Maximum drawdown for the long side of the system was only 18 percent, while buy and hold experienced a devastating 66 percent maximum drawdown. These results confirm short trading in equities can be tricky. We measured the results of the short side of the system after the broad marSTRATEGY SUMMARY
Profitability Net profit ($): Net profit (%): Exposure (%): Profit factor: Payoff ratio: Recovery factor: Drawdown
Max. DD (%): Longest flat days: 35.29 1,766 12,608 12.61 73.36 1.05 0.25 0.35

TABLE 1 BEST PARAMETER VALUES FOR EACH STOCK


Symbol AAPL BA C CAT CSCO DIS GM HPQ IBM INTC IP JPM KO MSFT S SBUX T WMT Long period 70 70 130 130 80 70 80 90 90 70 130 130 130 120 70 120 90 110 Short period 16 14 26 14 24 18 18 24 18 16 14 26 16 18 14 16 26 14

FIGURE 3 DRAWDOWN CURVE


0% -5% -10% -15% -20% -25% -30% -35% 3/3/93 3/3/94 3/1/95 2/9/96 2/3/97 2/2/98 1/8/99 1/3/00 1/2/01 1/2/02 1/2/03

The system was never able to overcome the drawdown that began in mid-1995.

ket began to fall in the year 2000, and although this period did produce a small profit, it was also accompanied by extreme volatility. System parameters: One way many traders attempt to improve a system is to optimize its parameters (in this case, the number of days used to determine the channel lengths). This involves testing various parameter combinations to find a range of values that result in the greatest profit over a given period. Although this technique can result in a system that shows tremendous profit over a historical testing period, the odds that you would have known to use those specific parameter values PERIODIC RETURNS
Avg. Sharpe Best Worst Percentage Max. Max. return ratio return return profitable consec. consec. periods profitable unprofitable Weekly 0.04% 0.15 11.49% -8.47% 49.42% 11 9 Monthly 0.19% 0.15 13.53% -8.31% 50.83% 6 6 Quarterly 0.51% 0.15 22.09% -13.63% 48.78% 5 4 Annually 2.19% 0.17 33.91% -10.28% 50.00% 3 2 LEGEND: Avg. return the average percentage for the period Sharpe ratio average return divided by standard deviation of returns (annualized) Best return best return for the period Worst return worst return for the period % Profitable periods the percentage of periods that were profitable Max. consec. profitable the largest number of consecutive profitable periods Max. consec. unprofitable the largest number of consecutive unprofitable periods Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

Trade statistics No. trades: Win/loss (%): Avg. gain/loss (%): Avg. holding time: Avg. profit (winners): Avg. hold time (winners): Avg. loss (losers) %:
Avg. hold time (losers): Max. consec. win/loss:

330 38.79 0.09 34.09 12.67 53.33 -7.88 21.91 6/14

LEGEND: Net profit profit at end of test period, less commission Exposure the area of the equity curve exposed to long or short positions, as opposed to cash Profit factor gross profit divided by gross loss Payoff ratio average profit of winning trades divided by average loss of losing trades Recovery factor net profit divided by max. drawdown Max DD (%) largest percentage decline in equity Longest flat days longest period, in days, the system is between two equity highs No. trades number of trades generated by the system Win/Loss (%) the percentage of trades that were profitable Avg. profit the average profit for all trades Avg. hold time the average holding period for all trades Avg. profit (winners) the average profit for winning trades Avg. hold time (winners) the average holding time for winning trades Avg. loss (losers) the average loss for losing trades Avg. hold time (losers) the average holding time for losing trades Max. consec. win/loss the maximum number of consecutive winning and losing trades

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER June 2003 www.activetradermag.com

14

at the start of the period are about the same as picking the winning lottery numbers for tomorrow. The parameters that worked best in the past years are unlikely to be those that work best in the future. However, there are ways to use optimization effectively. One technique is called walk-forward optimization. First, system parameters are optimized on an initial (sample) data period. Second, the best-performing parameters are used to execute the system on a new, historical (out-of-sample) data period after the sample period. This allows you to find out if the optimized parameters would have improved the results going forward, without cheating by using hindsight. We performed a walk-forward optimization on the 100-20 channel breakout system by first optimizing the long and the short channel periods for the first nine years of historical price data. We then used the best-performing parameter values for each stock in the portfolio (see Table 1) and applied them to the last year of historical price data. Figure 4 is the equity curve for this optimized system. The walk-forward optimized system lost 1.54 percent during the one-year period, but buy and hold lost 30.57 percent. (The system lost nearly 9 percent during this same year using the default parameter values of 100 and 20.) The walk-forward optimization was effective in this case. The 100-20 channel breakout performs much better on the long side than on the short side in stocks. Although it may be possible to improve the systems performance by optimizing the channel periods for each stock, optimization must be used

FIGURE 4 WALK-FORWARD OPTIMIZATION RESULTS


After finding the optimal long and short channel lengths for each stock over the first nine years of historical data, we tested the parameters on the most recent year of data. The system outperformed buy and hold (as well as the un-optimized parameters).
120,000 115,000 110,000 105,000 100,000 95,000 90,000 85,000 80,000 75,000 70,000 65,000 60,000 55,000 50,000 45,000 40,000 35,000 30,000 25,000 20,000 15,000 10,000 5,000 0 3/1/02 4/3/02
Equity

Account balance ($)

5/7/02
Cash

6/12/02

7/22/02 8/28/02
Long

10/7/02

11/15/02
Short

1/2/03

2/6/03

Linear reg

Buy & holds

with caution. The walk-forward technique described here can help you find more realistic optimized parameters that have a better chance of performing well in real trading. Compiled by Dion Kurczek of Wealth-Lab Inc.

15

www.activetradermag.com June 2003 ACTIVE TRADER

FUTURES

Trading System Lab


FIGURE 1 EQUITY CURVE: 2 PERCENT MAXIMUM RISK The system equity curve with the 2-percent maximum loss setting has a relatively stable uptrend.
220,000 210,000 200,000 190,000 180,000 170,000 160,000 150,000 Account balance ($) 140,000 130,000 120,000 110,000 100,000 90,000 80,000 70,000 60,000 50,000 40,000 30,000 20,000 10,000 0 3/25/93 Equity 3/1/94 2/1/95 Cash 1/4/96 1/2/97 1/2/98 1/4/99 Long 1/3/00 1/2/01 1/2/02

100-20 channel breakout system


System concept: The channel breakout is probably one of the oldest trend-following systems around (see the stock Trading System Lab on p. 46), and one that has been especially popular in futures markets over the years, for better or worse. The system results published here are based on a 100-day channel length for trade entries and a 20day channel length for exits. The channel lengths are relatively long, because the system is intended to catch long-term moves. This system goes long and short. The stop levels for both long trades and short trades play an important role, because they are used to calculate the position sizes in the different contracts. Rules 1. Enter long on the next bar at the highest 100-day high. 2. Exit long on the next bar at the lowest 20-day low. 3. Enter short on the next bar at the lowest 100-day low. 4. Exit short on the next bar at the highest 20-day high. (All trades are executed as stop orders.) Money management 1. Risk a maximum of 2 percent of account equity

Linear reg

Short

Source for all figures: Wealth-Lab Inc. (www.wealth-lab.com)

FIGURE 2 EQUITY CURVE: 6 PERCENT MAXIMUM RISK The equity curve using a 6-percent maximum per-trade loss highlights large returns accompanied by high volatility and large drawdowns.
3,400,000 3,200,000 3,000,000 2,800,000 2,600,000 2,400,000 Account balance ($) 2,200,000 2,000,000 1,800,000 1,600,000 1,400,000 1,200,000 1,000,000 800,000 600,000 400,000 200,000 0 3/25/93 Equity 3/1/94 2/2/95 Cash 2/1/96 1/8/97 1/2/98 1/4/99 Long 1/3/00 1/2/01 1/2/02

per trade. (Results will also be discussed for a 6percent maximum risk version of the system.) 2. To determine the position size (number of contracts to trade), multiply the difference between the entry price and the stop-loss price by the dollar value of a one-point move in the contract, and divide the result by the contracts minimum margin. For example, assume the contract being traded has a point value of $250 and a $1,000 margin requirement. Next, assume the initial entry buy stop is at $100 (the value of the 100-day high) and the initial stop-loss level is at 80 (the lowest 20day low). In this case, you would buy five [{(100 80)* $250}/$1000 = 5] contracts. The $5,000 maximum loss this five-contract trade represents should not be more than 2 percent of the current portfolio equity. As a result, unless the account equity is in excess of $250,000, the system would not be able to take this position. Starting equity: $100,000. Deduct $10 slippage/commission per trade. Test data: The system was tested on the Active Trader standard futures portfolio, which contains the following 20 futures: DAX30 (AX), corn (C), crude oil (CL), German bund (DT), Eurodollar (ED), Euro Forex (FX), gold (GC), copper (HG), Japanese yen (JY), coffee (KC), live cattle (LC), lean hogs (LH), Nasdaq 100 (ND), natural gas (NG), soybeans (S), sugar (SB), silver (SI), S&P 500
16

Linear reg

Short

ACTIVE TRADER June 2003 www.activetradermag.com

FIGURE 3 DRAWDOWN CURVE: 2 PERCENT MAXIMUM RISK The maximum drawdown was about 18 percent.
0.00% -2.00% -4.00% -6.00% -8.00% -10.00% -12.00% -14.00% -16.00% -18.00%
3/25/93 3/1/94 2/1/95 1/9/96 1/2/97 1/2/98 1/4/99 1/3/00 1/2/01 1/2/02

cent. The system results on the futures portfolio were fairly good when the maximum risk was set to 2 percent per trade. The system returned an average profit of 8.42 percent per year, with the largest losing year being -8.91 percent. The systems market exposure was low on average, about 30 percent. Based on this information, the idea of increasing the risk and taking more contracts for each signal might sound like a good idea, especially because there is still plenty of margin available. Even though the system reached an account value of more than $3 million (refer

(SP) and10 year T-Notes (TY). The test used Ratio Adjusted data from Pinnacle Data Corp

FIGURE 4 DRAWDOWN CURVE: 6 PERCENT MAXIMUM RISK


The drawdown increased both in depth and length in this version of the system.
0.00%

Test period: August 1993 to November 2002. -5.00% System results: Both the long and short sides of the sys-10.00% tem were profitable, and the ratio of winning to losing -15.00% trades was fairly balanced. The equity curve (Figure 1) using the 2-percent maximum loss setting shows a rela-20.00% tively smooth, steady uptrend. The 6-percent maximum -25.00% loss version (Figure 2) posts a much larger gain, with -30.00% much higher volatility. -35.00% The position-sizing method keeps the system out of -40.00% many risky positions, although it resulted in no trade sig-45.00% nals in some markets because the risk was too high throughout the entire test period. -50.00% To show the effect of the amount of risk taken, compare 3/25/93 the drawdown curves in Figures 3 and 4. Figure 3 is the drawdown curve using a maximum risk of 2 percent. The maximum drawdown during this period was approximately 18 percent. Figure 4 shows the result of increasing the maximum per-trade risk to 6 percent. The effect is dramatic: The drawdown increased to 50 per-

3/1/94

2/1/95

1/9/96

1/2/97

1/2/98

1/4/99

1/3/00

1/2/01

1/2/02

STRATEGY SUMMARY
Profitability Net profit ($): 99,997.48 Net profit (%): 100.00 Exposure (%): 29.99 Profit factor: 1.50 Payoff ratio: 1.64 Recovery factor: 3.21 Drawdown
Max. DD (%): Longest flat days: 19.59 685

Trade statistics No. trades: 292 Win/loss (%): 45.21 Avg. gain/loss (%): 0.73 Avg. holding time: 37.60 Avg. gain (winners) %: 6.22 Avg. hold time (winners): 56.30 Avg. loss (losers) %:
Avg. hold time (losers): Max. consec. win/loss: -3.80 22.17 5/7

to Figure 2), the accompanying drawdown would have been nearly impossible to stomach. Exposure climbed near 70 percent, and the longest wait between new equity highs was more than 750 trading days. The 100-20 channel breakout performed fairly well in this test. As discussed in the stock Trading System Lab, you can experiment with the system by optimizing the channel periods for each market. Compiled by Dion Kurczek of Wealth-Lab Inc.

PERIODIC RETURNS
Avg. Sharpe Best Worst Percentage Max. Max. return ratio return return profitable consec. consec. periods profitable unprofitable Weekly Monthly Annually 0.15% 0.66% 8.58% 0.64 0.61 0.55 0.58 7.29% -6.14% 12.32% -9.25% 24.09% -8.25% 29.99% -8.91% 52.07% 55.08% 40.00% 66.67% 6 6 4 3 9 6 6 2

Quarterly 1.99%

LEGEND: Net profit profit at end of test period, less commission Exposure the area of the equity curve exposed to long or short positions, as opposed to cash Profit factor gross profit divided by gross loss Payoff ratio average profit of winning trades divided by average loss of losing trades Recovery factor net profit divided by max. drawdown Max DD (%) largest percentage decline in equity Longest flat days longest period, in days, the system is between two equity highs No. trades number of trades generated by the system Win/Loss (%) the percentage of trades that were profitable Avg. gain the average profit for all trades Avg. hold time the average holding period for all trades Avg. gain (winners) the average profit for winning trades Avg. hold time (winners) the average holding time for winning trades Avg. loss (losers) the average loss for losing trades Avg. hold time (losers) the average holding time for losing trades Max. consec. win/loss the maximum number of consecutive winning and losing trades

LEGEND: Avg. return the average percentage for the period Sharpe ratio average return divided by standard deviation of returns (annualized) Best return best return for the period Worst return worst return for the period % Profitable periods the percentage of periods that were profitable Max. consec. profitable the largest number of consecutive profitable periods Max. consec. unprofitable the largest number of consecutive unprofitable periods Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

17

www.activetradermag.com June 2003 ACTIVE TRADER

FUTURES

Trading System Lab


FIGURE 1 EQUITY CURVE
The system produced a modest profit, with long trades outperforming shorts.
24,000 22,000 20,000 18,000
Account balance ($)

60-minute breakout system


Market: Futures (indices). System concept: This is an intraday system that trades on breakouts of the range established in the first hour of trading. For a detailed explanation of the strategy please read the stock Trading System Lab on p. 50. The intention was to see how the system performed on stock index futures as opposed to individual stocks. In this test the S&P 500 (SPY) and Nasdaq 100 (QQQ) index-tracking stocks were used as proxies for the S&P 500 and Nasdaq 100 futures. Entry rules: Long trades: Buy if the closing price of the third 30-minute bar is above the high of the first 60 minutes of the day. Short trades: Sell short if the closing price of the third 30-minute bar is below the low of the first 60 minutes of the day. Exit: Exit all positions on signals in the opposite direction or at the end of the day. Money management: To equalize the weight of both markets, 49 percent of the current portfolio capital is allocated for every trade. For example, if the total equity moves up to $22,000 and our strategy generates a new signal, we would invest $10,780 for the next signal. We use 49 percent to give us some leeway for commission. Please keep in mind that we use the portfolio result and not the individual result. This is very important and should always be used since only this method reflects what you would actually experience later in your trading. Starting equity: $20,000 (nominal). Deduct $0.01 per share slippage and commissions. Test period: October 2001 until October 2003.

16,000 14,000 12,000 10,000 8,000 6,000 4,000 2,000 0 10/15/01


Equity

1/8/02

4/1/02
Cash

6/24/02

9/23/02
Long

12/30/02
Short

4/2/03

6/26/03

9/25/03

Buy & hold

Source for all figures: Wealth-Lab Inc. (www.wealth-lab.com)

FIGURE 2 DRAWDOWN CURVE


The largest drawdown occurred early in the test period. The systems biggest string of losing trades was seven.
0% -1% -2% -3% -4% -5% -6% -7% -8% -9% -10% -11% -12% -13% 3/14/02 5/30/02 8/9/02 10/28/02 1/21/03 4/2/03 6/13/03 8/29/03

10/15/01 1/2/02 Test data: SPY and QQQ. The SPY is designed to trade at one-tenth the level of the S&P 500; the QQQ is designed to trade at one-fortieth of the Nasdaq 100. Like futures, the uptick rule to enter short positions does not apply to these instruments. QQQ and SPY can be traded intraday but have the advantage that no rollover occurs every three months. We downloaded more than two years of 30-minute bars from the QCharts historical intraday database for SPY and QQQ. There are a few interesting things to note. For the first hour range we take the prices from 9:30 a.m. to 10:30 a.m. and for the closing time we use 4:15 p.m. This is important because we will

close all positions not triggered by an opposite signal at the close of the day. Test results: The results for the two years are very encouraging: a profit of 19.88 percent on the starting capital in two years, compared to an unchanged result for the combined equities of the two indices (see Figure 1). The system generated its largest drawdown (-13.52 percent) on Feb. 21, 2002 (see Figure 2). Buy and holds largest drawdown (on Oct. 9, 2002) was -44.87 percent.
www.activetradermag.com January 2004 ACTIVE TRADER

18

FIGURE 3 SAMPLE TRADES


The average hold time for both winning and losing trades was around seven days.

On the downside, the average profit per trade was just 0.05 percent, or $4.46. This may be too little to really trade the system. Looking at the statistics it is interesting to note that out of the 892 trades over the last two years, only 102 were stopped out by the opposite signal while the rest stayed with the initial direction. It seems that in most cases, once the market begins an intraday trend, it continues in that direction throughout the day. Figure 3 shows a short trade on Sept. 10, 2003, that was exited at the close of the day. On the following day it appeared the market was continuing its down move. We received a short signal but got stopped out after the market bounced back.

Nasdaq 100 index-tracking stock (QQQ), 30-minute

34.10 34.00 33.90 33.80

Sell

33.70 33.60 33.50 Buy 33.40 33.30 Sell 33.20 33.10 Buy 9/11/03 33.00

Bottom line: There is a big difference between indices and stocks in regard to this system. Individual stocks tend to be much more volatile than an index; also, 9/10/03 with an index you hardly see large overnight gaps. This might be one reason the 60-minute breakout system performs much better on the ETFs than it does on the individual stocks.

Because of the low average profit per trade, the system requires more fine tuning. Nevertheless, the ratio of trades that kept their original position for the whole day makes this strategy worthy of further investigation. Volker Knapp of Wealth-Lab Inc.

STRATEGY SUMMARY
Profitability Net profit ($): Net profit (%): Exposure (%): Profit factor: Payoff ratio: Recovery factor: Drawdown Max. DD (%): Longest flat days: 3,976.80 19.88 44.95 1.11 0.93 1.38 -13.52 1,742 Trade statistics No. trades: Win/loss (%): Avg. gain/loss (%): Avg. hold time: Avg. profit (winners) %: Avg. hold time (winners): Avg. loss (losers) %: Avg. hold time (losers): Max. consec. win/loss: 892 54.60 0.05 7.21 0.80 7.35 -0.86 7.04 10/7

PERIODIC RETURNS
Avg. Sharpe Best Worst Percentage Max. Max. return ratio return return profitable consec. consec. periods profitable unprofitable Weekly Monthly 0.19% 0.77% 0.80 0.88 1.39 7.31% -3.36% 6.97% -3.17% 6.19% -2.19% 53.85% 52.00% 66.67% 7 2 6 8 4 2

Quarterly 2.07%

LEGEND: Net profit Profit at end of test period, less commission Exposure The area of the equity curve exposed to long or short positions, as opposed to cash Profit factor Gross profit divided by gross loss Payoff ratio Average profit of winning trades divided by average loss of losing trades Recovery factor Net profit divided by max. drawdown Max. DD (%) Largest percentage decline in equity Longest flat days Longest period, in days, the system is between two equity highs No. trades Number of trades generated by the system Win/Loss (%) The percentage of trades that were profitable Avg. gain The average profit for all trades Avg. hold time The average holding period for all trades Avg. gain (winners) The average profit for winning trades Avg. hold time (winners) The average holding time for winning trades Avg. loss (losers) The average loss for losing trades Avg. hold time (losers) The average holding time for losing trades Max. consec. win/loss The maximum number of consecutive winning and losing trades

LEGEND: Avg. return The average percentage for the period Sharpe ratio Average return divided by standard deviation of returns (annualized) Best return Best return for the period Worst return Worst return for the period Percentage profitable periods The percentage of periods that were profitable Max. consec. profitable The largest number of consecutive profitable periods Max. consec. unprofitable The largest number of consecutive unprofitable periods Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER January 2004 www.activetradermag.com

19

Four-percent breakout system


Market: Nasdaq 100 index-tracking stock (QQQ). System concept: This system is from the book Trade like a Hedge Fund (John Wiley & Sons, 2004) by James Altucher. Both day traders and hedge-fund managers love to fade (i.e., trade in the opposite direction of) sharp intraday moves. The thought behind this type of trading is price is unlikely to go much higher after an extreme up move. Traders take short positions anticipating a reversal. In some situations, however, the market ignores the contrarians and continues to rise. Traders who fade the up move must cover their short positions, which leads to panic buying and further upward momentum. The four-percent breakout system is an attempt to quantify and profit from this market scenario. The system goes long when price rises four percent from the previous close in this case, assumed to be the point at which short sellers must concede they were wrong and cover their positions, driving prices even higher during the trading day. The system is long only; no short trades are made. Rules: Entry Buy today if price gains four percent from the previous trading days closing price. Exit Exit on the open of the next trading day. Figure 1 shows sample trades in QQQ from March and April 2003. Risk control and money management: This system tests only one market, and enters only one position at a time, so 100 percent of equity should be tied up on each trade. Starting equity: $100,000. Deduct $20 per round-turn trade for slippage and commissions. Test data: The system was initially tested only on the QQQ. It was also tested on the Active Trader Standard Stock Portfolio, which contains the following 18 stocks: Apple Computers (AAPL), Boeing (BA), Citigroup (C), Caterpillar (CAT), Cisco Systems (CSCO), Disney (DIS), General Motors (GM), HewlettPackard (HPQ), International Business Machines (IBM), Intel (INTC), International Paper (IP), J.P. Morgan Chase (JPM), Coca-Cola (KO), Microsoft (MSFT), Sears (S), Starbucks (SBUX), AT&T (T) and Wal-Mart (WMT). Test period: March 1999 through June 2004 for the QQQ test; July 1994 to June 2004 for the Active Trader portfolio.
20

FIGURE 1 SAMPLE TRADES March and April 2003 were very active months for the four-percent breakout system. There was one large winner, two mid-size winners and one large losing trade.
Nasdaq 100 index-tracking stock (QQQ), daily Sell Sell Sell Sell Buy Buy 27.40 27.20 27.00 26.80 26.60 26.40 26.20 26.00 25.80 25.60 25.40 25.20 25.00 24.80 24.60 24.40 24.20 24.00 23.80 23.60 23.40 100M 50M
April 2003 Source for all figures: Wealth-Lab Inc. (www.wealth-lab.com)

Buy

Buy

Volume

FIGURE 2 EQUITY CURVE The equity grew steadily from 2000 through 2002, but the system has been stagnating since mid-2002.
250,000 240,000 230,000 220,000 210,000 200,000 190,000 180,000 170,000 160,000 150,000 140,000 130,000 120,000 110,000 100,000 90,000 80,000 70,000 60,000 50,000 40,000 30,000 20,000 10,000 0 3/10/99 9/1/99 3/1/00 9/1/00 3/1/01 9/4/01 3/8/02 9/5/02 3/6/03 9/3/03 3/3/04 Equity Cash

Account balance ($)

www.activetradermag.com September 2004 ACTIVE TRADER

FIGURE 3 DRAWDOWN CURVE The drawdown phase from mid-2002 to the present dominates the drawdown curve.
0% -1% -2% -3% -4% -5% -6% -7% -8% -9% -10% -11% 3/10/99 9/1/99 3/2/00 9/1/00 3/5/01 9/4/01 3/8/02 9/6/02 3/7/03 9/5/03 3/5/04

Test results: Figure 1 shows the first trade was a success. Price rose 40 cents after entry and the market made a small gap open the following day for a twopercent profit. The next two trades, which occurred only a few days later, were not as successful but nonetheless booked modest profit. However, the next trade wiped out the previous profit and then some. Price gapped up at the market open, beyond the four-percent threshold, and the entry order was filled (this particular trade would have probably been subject to negative slippage because of the volatility at the open). Price then suddenly reversed, and the result was a large loss upon the exit the following day. The fact that the initial losing trade occurred on a day when prices gapped above the entry level on the open suggests the system might benefit from a filter that ignores the signal if price opens with a greater than four-percent gain. The equity curve (Figure 2) provides a better indication of the systems overall performance. After a small loss in 1999, profits began in early 2000 and lasted until mid- to late 2002. The drawdown curve (Figure 3) confirms this, as the 12-percent drawdown began in late 2002. The system is more or less flat from April 2003 forward. The only trade after that was in July 2003, resulting in a loss of 0.08 percent.

Drawdown

the designers knew of previous QQQ price movement), it was tested on other markets in an attempt to determine its validity. Our starting equity for the Active Trader portfolio test was also $100,000, although only 10 percent of equity was committed per trade. This equity curve (Figure 4, p. 60) shows fairly steady growth from the beginning of the test period through mid2002. From that point, there is a slight decline in capital and a general stagnation as fewer trades take place. This equity curve mirrors the QQQ equity curve. However, the fact that the system was profitable on a portfolio of stocks (8.95 percent annualized gain) and not just one stock is evidence the system is based on a valid core assumption. System variation: James Altucher publishes a variation of the system that adds one additional entry rule: Price must be down two percent on the day before entering a trade. This rule is intended to avoid entering when a price move is nearly exhausted, and allows the system to capture solid rebound PERIODIC RETURNS

Portfolio test results: While it is still too early to tell if this system is worth trading on the QQQ (because its possible the system was subconsciously designed to take advantage of what STRATEGY SUMMARY
Profitability Net profit ($): Net profit (%): Exposure (%): Profit factor: Payoff ratio: Recovery factor: Drawdown ($): Max. DD (%): Longest flat days:
121,023 121.09 7.81 1.82 1.13 4.05

Trade statistics No. trades: Win/loss (%): Avg. trade (%): Avg. winner (%): Avg. loser (%): Avg. hold time:
Avg. hold time (winners): Avg. hold time (losers): Max. consec. win/loss:

105 64.76 0.80 2.38 -7.55 1.00 1.00 1.00 11/5

Avg. Sharpe Best return ratio return Weekly Monthly 0.30% 1.30% 1.18 1.35 1.03 0.56 11.89% 13.34% 25.74% 75.51%

Worst Percentage Max. Max. return profitable consec. consec. periods* profitable unprofitable -9.23% 22.10% 4 63 -6.40% -6.98% -2.52% 50.00% 59.09% 66.67% 10 8 4 15 5 2

Quarterly 3.93% Annually 16.71%

29,900 -11.93 420

*The system remains flat much of the time. A flat period is considered unprofitable for purposes of this report.

LEGEND: Net profit Profit at end of test period, less commission Exposure The area of the equity curve exposed to long or short positions, as opposed to cash Profit factor Gross profit divided by gross loss Payoff ratio Average profit of winning trades divided by average loss of losing trades Recovery factor Net profit divided by max. drawdown Max. DD (%) Largest percentage decline in equity Longest flat days Longest period, in days, the system is between two equity highs No. trades Number of trades generated by the system Win/Loss (%) the percentage of trades that were profitable Avg. trade The average profit/loss for all trades Avg. winner The average profit for winning trades Avg. loser The average loss for losing trades Avg. hold time The average holding period for all trades Avg. hold time (winners) The average holding time for winning trades Avg. hold time (losers) The average holding time for losing trades Max. consec. win/loss The maximum number of consecutive winning and losing trades

LEGEND: Avg. return The average percentage for the period Sharpe ratio Average return divided by standard deviation of returns (annualized) Best return Best return for the period Worst return Worst return for the period Percentage profitable periods The percentage of periods that were profitable Max. consec. profitable The largest number of consecutive profitable periods Max. consec. unprofitable The largest number of consecutive unprofitable periods

Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER September 2004 www.activetradermag.com

21

Account balance ($)

moves. This generally increases the efficiency of the system while reducing the number of actual trades. The bottom equity curve in Figure 4 shows the results of the system variation on the Active Trader portfolio. Since the new filter reduces the number of trades, the position size was changed to 25 percent for each trade. The shape of the equity curve is similar to the previous run, but actual profit is higher and the system does not enter as many losing trades during the stagnation period of mid2002 to present. Bottom line: The four-percent breakout system could not be much simpler. Simpler systems are often the most effective, and this one is no exception. However, there needs to be sufficient post-publication data to provide a reliable test for the QQQs. This system is from James Altuchers Trade like a Hedge Fund. Compiled by Volker Knapp of Wealth-Lab

FIGURE 4 EQUITY CURVE: ACTIVE TRADER PORTFOLIO The upper equity curve shows the results of the four-percent breakout system on the Active Trader standard stock portfolio using 10 percent of equity per trade. The lower equity curve is a system variation that enters after a down move and uses 25 percent of equity per trade.
200,000 150,000 100,000 50,000 0 250,000 200,000 150,000 100,000 50,000 0 7/15/94 7/31/95 6/7/96 6/2/97 6/1/98 5/6/99 5/1/00 5/1/01 5/1/02 5/1/03 4/5/04 Equity Cash

22

www.activetradermag.com September 2004 ACTIVE TRADER

TRADING Strategies

BROADENING PATTERNS:

Clues to breakout direction


A partial rise or decline can predict the direction of a breakout. Learn to use these signals to increase profits when trading broadening patterns.
BY THOMAS N. BULKOWSKI

rying to determine when a breakout will occur in broadening chart patterns, which are expanding rather than contracting price formations, can be difficult. However, partial rises (PRs) or FIGURE 1 PARTIAL RISE

partial declines (PDs) can improve the odds of making a correct decision. These signals predict immediate breakouts and indicate their direction, too, allowing you to increase your profits and reduce your losses. However,

because a PR or PD often slows overall momentum, the size of the eventual breakout is not as large as when a PR or PD does not appear.

Broadening tops and bottoms


Figure 1 shows two broadening bottom patterns. These are different from broadening tops because price enters the pattern from the top. In both patterns, price touches each trendline at least two times and swings in a progressively wider range. That is, the minor highs get higher and the minor lows get lower. The July pattern shows a PR, which occurs after the pattern is established that is, there were at least two touches of each trendline before the PR. Price makes a partial rise when it leaves the bottom trendline and works its way higher but fails to touch or come too close to the top trendline before turning away. How close is close? Use the figures in this article and your common sense as guides. For example, the July broadening bottom has three top trendline touch-

The July broadening bottom pattern appeared midway through the down move. A partial rise accurately signaled a downside breakout from the pattern.
Milacron Inc. (MZ), daily 34 32 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 1998 Mar. Apr. May June July Source: Proprietary software (Thomas Bulkowski) Aug. Sept. Oct. Nov. Dec.

Partial rise

12

34

ACTIVE TRADER April 2004 www.activetradermag.com

23

even better 80 percent (see Table 1, top right, for more statistics). The percentages reflect how often partial rises and partial declines predicted Notice how the July pattern is midbreakout direction. way between the price at the start of the downtrend (around 32) and its low Chart pattern Partial decline Partial rise (around 14). The middle of the pattern is Broadening bottom 80% 67% around 23, the center of the 32-14 range. Although broadening patterns someBroadening top 65% 86% times act as half-staff patterns that Broadening wedge, ascending Not measured 84% form in the middle of moves, broadenBroadening wedge, descending 76% Not measured ing bottoms usually function as reversals in a downtrend, not as continuation patRight-angled and ascending Not measured Not measured terns within those trends, as they do in Right-angled and descending 78% 58% Figure 1. Figure 2 includes two broadening tops with PDs. In a partial decline, price es, not two or four: The second minor 500 stocks from mid-1991 to mid-1996, a leaves the top trendline and descends high (point 2) comes close enough to call bull market, showed that a PR correctly but does not come close to or touch the it a touch, but the third (point 3) does predicted a downward breakout 67 per- bottom trendline. An upward breakout cent of the time. The accuracy rate of usually follows immediately. Again, the not. Analysis of 77 broadening bottoms on PDs predicting upside breakouts was broadening top pattern must touch each trendline at least two times before a PD signal can occur. FIGURE 2 BROADENING TOPS Table 1 shows PDs in broadening tops correctly Both of these broadening tops included partial declines, which predicts an upward breakpredicted an upward breakout of the pattern. out 65 percent of the time, Newport Corporation (NEWP), daily while partial rises were 86percent accurate in predict7 ing downside breakouts. In a larger combined study of broadening tops 6 and bottoms, PDs worked 77 percent of the time. When a 5 PD occurred, the post-breakPartial decline out up move was 32 percent; without a PD, the rise measured 36 percent. Thus, the 4 PD affected momentum by reducing the eventual rally. PDs not resulting in breakouts occurred just nine perPartial decline cent of the time, which 3 means false signals are comparatively rare. For PRs, the post-breakout decline measured 15 percent; without a PR, the declines averaged 17 percent, indicat2 ing a partial rise steals ener1997 June July Aug. Sept. Oct. Nov. Dec. 1998 Feb. Mar. Apr. May June gy from the resulting down Source: Proprietary software (Thomas Bulkowski) move.
24 www.activetradermag.com April 2004 ACTIVE TRADER

TABLE 1 PARTIAL RISES AND DECLINES: SUCCESS RATES

FIGURE 3 TRENDLINE TOUCHES Look for a partial rise or decline only after price touches each trendline of the broadening pattern at least twice. Here, a partial rise formed in this ascending, right-angled broadening formation.
Tommy Hilfiger (TOM), daily Partial rise 37 35 33 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 1998 Feb. Mar. Apr. May Source: Proprietary software (Thomas Bulkowski) June July Aug. Sept. Oct.

False breakout signals for PRs (i.e., when a partial rise occurred inside a broadening top pattern after price touched each trendline twice without triggering a breakout) occurred just 11 percent of the time in the 350 patterns examined. A broadening top usually acts as a continuation pattern within the prevailing price trend, as shown in Figure 2.

2
Not a partial decline

Right-angled broadening formations


Figure 3 shows a rightangled, ascending broadening formation. The top trendline slopes upward (ascends) and the bottom trendline is horizontal or nearly so. Like other broadening patterns, the breakout can occur in any direction, but this pattern usually reverses the trend. The figure shows this, as prices rise into the pattern and exit out the bottom. After two touches of each trendline occur, look for a partial rise or decline. The late-May decline in Figure 3 does not show a partial decline. Why? Because the pattern at that point did not have at least two minor touches of each trendline. Price touches at point 1 but it is not a minor high or low, so it does not count as a touch. Point 2 is valid, as is point 3. Only after price touches point 3 can you draw the horizontal trendline. By that time, the three touches on the top connect an up-sloping trendline. The partial rise that follows correctly predicts a downward breakout. Figure 4 shows a descending right-angled broadening

FIGURE 4 REVERSAL PATTERN Although broadening formations are often continuation patterns, descending, right-angled broadening formations like the one shown here usually act as reversal patterns.
CDI Corp. (CDI), daily Partial rise

26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 Sept.

1994 Nov. Dec. 1995 Feb. Mar. Source: Proprietary software (Thomas Bulkowski)

Apr.

May

June

July

Aug.

ACTIVE TRADER April 2004 www.activetradermag.com

25

FIGURE 5 DESCENDING BROADENING WEDGE The August pattern did not produce a valid partial decline because price must drop from the top trendline and curl around. Here, price rose from the bottom trendline. The first partial decline in the October pattern fails to predict an immediate upward breakout, but is correct in the longer term.
Transocean Inc. (RIG), daily 52 50 48 46 44 42 40 38 36 34 32 31 30 29 28 27 26 25 24 23 22 21 Dec. 2000 Feb. Mar. 20

Not a partial decline

pattern. The top trendline is horizontal and the bottom one slopes down. Price touches the bottom trendline, bounces up but does not come close to or touch the top trendline before retracing its gains. This PR predicted a downward breakout. As is the case with this example, the descending, right-angled broadening pattern usually acts as a price reversal. In the descending pattern, partial rises worked just 58 percent of the time and partial declines worked 78 percent of the time in descending, right-angled broadening patterns.

Broadening wedges
Figure 5 shows a descending broadening wedge, which consists of two down-sloping trendlines (think of a downward-tilting megaphone). The rules for wedges are the same as other broadening patterns: There must be at least two minor high touches of the top trendline and at least two minor low touches of the bottom trendline. Only then is the pattern valid and only then should you look for a partial rise or decline. The pattern usually acts as a continuation, rather than a reversal, of the prevailing price trend. However, the two wedges shown in Figure 5 are reversal patterns. In the August pattern, prices climbed into the pattern and broke out to the upside, but the overall trend (except for a few days after the breakout) was downward after the pattern. Prices in the October wedge were trending downward into the pattern and exited out its top. The trend after the pattern ends is predominantly upward. In the August pattern example, the slight dip in

Partial declines

1999 June July Aug. Sept. Oct. Source: Proprietary software (Thomas Bulkowski)

Nov.

FIGURE 6 ASCENDING BROADENING WEDGE After the pattern is established, a partial decline fails to correctly predict an upward breakout. Later, a partial rise precedes a downside breakout.
WPS Resources Corp. (WPS), daily 32 31 30 Partial rise 29 28 27 26 25 24 23 Failed partial decline 22 21 20 June

1999 Aug. Sept. Oct. Nov. Dec. Source: Proprietary software (Thomas Bulkowski)

2002

Feb.

Mar.

Apr.

May

26

www.activetradermag.com April 2004 ACTIVE TRADER

early September was not a partial decline. Price in a PD must start from the top trendline, bow downward (without coming close to or touching the bottom trendline) and rejoin the top trendline. In this case, price leaves the bottom trendline, not the top one. In the October pattern, the first partial decline is a failure because price does not breakout upward immediately after touching the top trendline. Instead, price drops down again and finally shoots out the top. A partial decline correctly predicts an upward breakout 76 percent of the time. Not enough samples were found for partial rises in descending broadening wedges. Figure 6 (p. 28) shows an ascending broadening wedge. Both trendlines slope upward and minor highs and minor lows touch each trendline at least twice. The January partial decline failed because price did not break out to the upside it touched the top trendline, then reversed. The partial rise does better when it leaves the bottom trendline, bounces up and then plunges through the bottom trendline. A PR correctly predicts a downward breakout 84 percent of the time.

Additional research
Books by Thomas Bulkowski:
Encyclopedia of Chart Patterns (John Wiley & Sons, 2000) Trading Classic Chart Patterns (John Wiley & Sons, 2002)

Active Trader articles:


Technicals meet fundamentals in the earnings flag, February 2004, p. 30 A different breed of scallop, January 2004, p. 32 The three rising valleys pattern, December 2003, p. 28 Pipe bottom reversals, November 2003, p. 28 Grabbing the bull by the horns, September 2003, p. 46 Head-and-shoulders bottoms: More than meets the eye, August 2003, p. 32 The high-low game, July 2003, p. 28 Tom Bulkowskis scientific approach, September 2002, p. 32

ACTIVE TRADER April 2004 www.activetradermag.com

27

TRADING Strategies

HIGH, TIGHT FLAG


helps squeeze out profits
This bullish formation boasts excellent post-breakout performance and a low failure rate exactly the type of pattern traders should look for in bull markets.

BY THOMAS N. BULKOWSKI

high, tight flag (HTF) is a consolidation pattern that forms after a stocks price doubles. When price breaks out above the pattern, it signals the rise is not over. Figure 1 shows an example of an HTF that formed in January-February 2000. The uptrend started in October at a low of 5.50 and reached a high of 11.35 at the HTFs starting point a doubling of price in less than a month. Although many HTFs have irregular shapes, you can usually draw a trendline along the top of the pattern to signal a breakout. In this example, parallel trendlines mark the flags upper and lower boundaries. Volume slopes downward over the course of the flag, as it did in 90 percent of HTFs in a recent study. The basic HTF trade strategy is to buy at the close of the day after price breaks out above the patterns upper trendline. In Figure 1, the stock rallied 52 percent from the closing price the day after price pierced the HTFs upper trendline to the ultimate high. Although it is sometimes difficult to buy high and sell higher, the price

moves following HTFs show how such an approach can work.

Flag criteria
What should you look for when selecting HTFs? That depends on whom you ask. William ONeil, who popularized the pattern, has several selection criteria (see Additional reading, p. 33). He has written the rally preceding the pattern should measure 100 to 120 percent and take less than two months; the flag should move sideways for three to five weeks. Finally, the flag should retrace no more than 20 percent of the preceding rally. Applying these rules to 252 patterns found in price data of approximately 500 stocks between mid-1991 and early 2004 filtered out all of them! (An earlier study found only six of 81 patterns met his criteria; these patterns did, however, produce average gains of 69 percent.) The flag shown in Figure 1 actually does not meet ONeils criteria because it retraced 52 percent of the prior rise (most flags failed ONeils filter because they retraced more than 20 percent) and the flag duration lasted more than seven weeks .

28

www.activetradermag.com December 2004 ACTIVE TRADER

FIGURE 1 A LARGE HIGH, TIGHT FLAG This pattern does not meet William ONeils HTF criteria, but the post-breakout rise was 52 percent. Such a well-defined flag shape is unusual.
Alkermes (ALKS), daily Ultimate high 17 16 15 14 13 12 11 10 High, tight flag 9 8 7 6 Trend start 5

Another study that used different selection criteria for HTFs also showed an average post-breakout gain of 69 percent. The criteria for this study was simply a near doubling (a rise of 90 percent or more in less than two months) of the stock price, which is easy to find by looking for stocks that have moved up sharply in less than two months, then searching for a nearby consolidation region. The study placed no limit on flag length, although HTFs equal to or shorter than the 14-day median length performed better (71 percent) than those that were longer (66 percent). The study also ignored the size of the retracement.

1998

Aug.

Sept.

Oct.

Nov.

Dec.

1999

Feb.

Mar.

Apr.

May

June

Source: Proprietary software (Thomas Bulkowski)

FIGURE 2 TWO HTFS The first flag looks like a descending, broadening wedge and the second like a falling wedge. Both HTFs show good gains after the breakout with the first pattern hitting overhead resistance at the ultimate high.
National Semiconductor Corp. (NSM), daily Ultimate high 84 76 68 62 56 50 44 40 36 32 28 24 22 20 18 16 14 12 10 Trend start 8 6 1999 May June July Aug. Sept. Oct. Source: Proprietary software (Thomas Bulkowski) Nov. Dec. 2000 Feb. Mar.

HTF examples
Figure 2 shows two HTFs identified in the study. The trend start point was determined by finding a 20-percent reversal of the existing trend, measured from a prior low to the most recent close. The ultimate high was identified by finding a subsequent 20-percent trend change, measured from a prior high to the recent close. HTF 1 was preceded by a 156-percent rally that lasted 40 days. The flag retraced 38 percent of the rally and lasted 15 days. After the breakout, price climbed 54 percent to the ultimate high, which occurred at a resistance area established by price peaks as far back as mid-1995 (not shown). Price rose 121 percent leading up to HTF 2, taking 51 days to make the climb.

HTF 2 Ultimate high Trend start

HTF 1

ACTIVE TRADER December 2004 www.activetradermag.com

29

FIGURE 3 TWO MORE HTFS The first HTF launches from a flat base and price soars to the ultimate high. The second trade is more typical with the rise to the ultimate high about half the distance, on a percentage basis, from the trend start to the flag.
Vertex Pharmaceuticals (VRTX), daily 93 85 77 71 65 59 53 49 45 41 37 33 29 25 23 21 19 17 15 13 Trend start 11 May June July Aug. Sept. 9

Ultimate high

Ultimate high HTF 2

HTF 1

Trend start

1999 Dec. 2000 Feb. Mar. Apr. Source: Proprietary software (Thomas Bulkowski)

FIGURE 4 HTF FAILURE This HTF fails to travel far due to overhead resistance and a change in company fundamentals. The stock tumbles on an earnings warning.
Noven Pharmaceuticals (NOVN), daily Resistance Ultimate high 44 42 40 38 36 34 32 30 Dead-cat bounce 28 26 24 23 22 21 20 19 18 17 16 15 14 13 2000 Feb. Mar. Apr. May June July Aug. Sept. Oct. 12 Nov.

The flag retraced 45 percent of the rally and was 29 days long. After the breakout, price rallied 92 percent. This pattern did not have overhead resistance to overcome on its way to the ultimate high. That may explain why price nearly doubled before trending downward. Notice the irregular shapes of these two HTFs. The first looks like a small broadening wedge and the second looks like a regular falling wedge. Volume trends downward in both. Figure 3 shows two more examples. Starting from a flat base in late 1999, price climbs 116 percent leading to HTF 1 and soars 129 percent afterward. The stock did not perform as well after HTF 2 because the market changed from bull to bear between the two patterns (the bear market started in March 2000, near HTF 1s ultimate high). The second HTF pattern was preceded by a 136-percent price rise and followed by a 61-percent rally after the breakout.

HTF

The measure rule


The second pattern in Figure 3 is typical of the rise you can expect after an HTF in a bull market. For all 252 patterns in the study, the climb leading to the pattern averaged 124 percent, but the post-breakout gain was just 69 percent. To determine an approximate target, compute the percentage change from the low of the trend start point to the high at the top of the flag. After the breakout, the move from the flags lowest low should measure approximately half this

Trend start

Source: Proprietary software (Thomas Bulkowski)

30

www.activetradermag.com December 2004 ACTIVE TRADER

An HTF triggers a buy signal after a stock has made a significant up move and, thus, will appear overbought to many traders.
amount. This measure rule works 90 percent of the time in a bull market. close above the highest high in the pattern as the buy signal. This is important: If you buy before the breakout, price might drop instead. Only 10 percent of the 252 patterns in the study failed to climb at least 20 percent, and none failed to climb less than 5 percent. Those are very low failure rates. For protection, use progressive stops. For example, once price makes a new

Pattern failures
Figure 4 illustrates two types of pattern failures. The first is a rise blocked by overhead resistance. Underlying support or overhead resistance (look for a solid mass of horizontal price movement or peaks and valleys stopping near the same price area) spells death to most chart-pattern breakout trades. In this example, price climbed 31 percent (the pre-pattern rally was 128 percent) after the HTF breakout. That is a significant rally by most standards, but it fails to come close to the 64-percent gain using the measure rule. The second failure comes from the fundamentals. The company issued an earnings warning for the quarter and said fullyear earnings would suffer as well. The stock tumbled 43 percent in one session. Price bounced up during the next month before rounding over and making a lower low in a classic dead-cat bounce (DCB) pattern. Three months later, the stock dropped another 32 percent on a warning about flat annual revenues. Problems cannot always be fixed in one quarter. Avoid a stock showing a DCB for at least six months preferably a year. That will give the company time to get its act together.

high, raise the stop to just below the prior minor low, provided it is not too far away; otherwise use 1.5 times the daily volatility, which is 1.5 times the average intraday trading range over the prior month. Keep raising the stop as price climbs. Use the measure rule to find a target price (half the price rise leading to the HTF, projected upward from the flag low). Most of the gains (35 percent, on average) will come in the first week, so enter as soon as you get the signal. Also, the time from the trend start to the flag start will be slightly less (by six days on average) than the time from the flags end to the ultimate high.

Additional reading
Books: How to Make Money in Stocks (McGraw-Hill, 1988) by William ONeil Books by Thomas Bulkowski: Encyclopedia of Chart Patterns (John Wiley & Sons, 2000) Trading Classic Chart Patterns (John Wiley & Sons, 2002) Active Trader articles: Trading busted patterns, November 2004, p. 42 Half-staff patterns: Profiting from flags and pennants, September 2004, p. 48 Three falling peaks: Bearish trend change pattern, August 2004, p. 32 Chart patterns: Does size matter, June 2004, p. 44 Trading disaster: the dead-cat bounce, May 2004, p. 44 Broadening patterns: Clues to breakout direction, April 2004, p. 36 Technicals meet fundamentals in the earnings flag, February 2004, p. 30 A different breed of scallop, January 2004, p. 32 The three rising valleys pattern, December 2003, p. 28 Pipe bottom reversals, November 2003, p. 28 Grabbing the bull by the horns, September 2003, p. 46 Head-and-shoulders bottoms: More than meets the eye, August 2003, p. 32 Tom Bulkowskis scientific approach, September 2002, p. 32 You can purchase past articles at www.activetradermag.com/purchase_articles.htm and download them to your computer.

Trading the pattern


An HTF triggers a buy signal after a stock has made a significant up move and, thus, will appear overbought to many traders. This is a momentum play, buying high and selling higher. Trading an HTF is like standing on the edge of the cliff and jumping off, hoping the water at the bottom is deep enough. You need a good dose of courage to take the plunge. To trade the pattern, wait for price to either close above the flag trendline or, if the HTF has an irregular shape, use a

ACTIVE TRADER December 2004 www.activetradermag.com

31

TRADING Strategies

Mastering

TWO-MINUTE breakouts
How can you find consistent trade opportunities? One way is to trade breakouts through yesterdays high and low but only after the stock has shown its true colors.

trade is to buy upside or downside breakouts of the previous days high or low, respectively, avoiding trades in the middle of the days range. Well show how to apply this technique using twominute charts.

The tools
For this approach, use a two-minute candlestick chart encompassing a two-day time horizon (today and yesterday). For a long trade, buy the stock once it has cleared the whole number closest to the previous days high. For example, assume a stock made a high of 47.9 yesterday. In this case, you would enter a buy order when the stock hits 48.5 (having cleared 48, the nearest whole number) and when time and sales shows that most trades are being executed at the ask price, which would suggest strong demand for the stock. Reverse the logic for short trades. The reason for placing the entry a certain amount above the previous days high in this case, 48.5 is to make sure the trade safely clears the hurdle of the previous days trading range, accounting for any market noise that may be present. We dont want to buy a double top, we want to buy a breakout above the previous days high. Entering 0.3 to 0.5 above the whole number helps avoid false breakouts. This approach works because many professional traders and institutional buyers buy such breakouts. In addition, some institutional buy programs also factor in the open, high, low and closing prices. When such programs trigger buy signals and money starts flowing into a

BY KEN CALHOUN

t is often a struggle to find the most appropriate indicator for a given trading situation. A tool that works in one environment may not be appropriate in another. Momentum oscillators or the Nasdaq and S&P 500 futures may provide early signals of shifts in the stock market, but these tools also are often unreliable. Moving average crossovers provide trend confirmation but generally lag price action, and you cannot count on sustained trends in consolidating markets. Further, market makers frequently disguise their intentions via Electronic Communications Networks (ECNs) or Level II head fakes, which render the Level II screen more or less useless. So, whats a trader to do? Watch price action. Trading breakouts and breakdowns of chart patterns is a reliable and simple trading technique that can help you limit risk. A relatively consistent short-term, pattern-based
32

stock, you can ride the coattails of the large money on the way up. To make sure, however, dont enter the trade until the stock also has cleared the required noise level. We also use the time and sales window to confirm that any large block trades are going our way and that most trades are executed at the ask price for long trades, or the bid price for short sales. It also is good if a directional chart pattern i.e., one that implies a move either up or down confirms the breakout. A simple example is successive closes at the high (or low) of the price bars leading up to, or coinciding with, the breakout. Also, many traders use specific candlestick chart patterns to indicate likely price direction.

The rules
The best time to use this method is the profitable and volatile 9:40 a.m. to 11 a.m. (EST) time period. Trades typically last several to 20 minutes. Here are stepby-step guidelines for applying this

Strategy snapshot
Strategy: Two-day breakout Market: Stocks Entry: Go long (short) on move .3 to .5-points above (below) whole number closest to previous days high (low). Exit: Exit with trailing stop or on close. Risk control: Stop-loss of no more than 0.4 points. Trail stop at this interval if market moves in direction of trade.

www.activetradermag.com September 2001 ACTIVE TRADER

technique. 1. Define the days breakout and breakdown entry levels before each market open. Set up one of your trading screens to plot a single, large two-minute candlestick chart covering two days (today and the previous trading day) of trading activity, as shown in Figure 1. Make sure you start charting by 8:30 a.m. so you can spot any pre-market top or bottom formations, price gaps and trends. Identify the previous days high and low. 2. Enter 0.3 to 0.5 points above the previous days high (for long trades) or low (for short trades). 3. All intraday trades should have a maximum stop-loss of 0.4 points. Combined with entering 0.3 to 0.5 points above the previous days high, this provides an excellent risk management tool. In effect, we will exit if the reason for the trade is negated, i.e., the stock moves FIGURE 1 BUY SIGNAL

back into the trading range near the whole number and the entry price level is violated. 4. Trail the stop to protect profits. 5. Because the market often reverses around 10 a.m. each day, it is useful to tighten the stop during this time to three or four spreads (the colored bands of bid and ask levels on the Level II screen) behind the current inside bid. With decimal trading, this allows active traders to keep even tighter stops than was previously possible.

Glossary
Time and sales: The real-time, official record of executed trades (as opposed to bids and offers) throughout the day. Most trading platforms include a time and sales window to monitor this activity. Noise: Random, meaningless price fluctuations that can knock traders out of the market. Buy programs (program trading): Computer-based trading approach whereby institutions or large trading operations execute large volume in related markets to take advantage of discrepancies between them (i.e., buying S&P stocks and selling S&P futures). See Program trading and fair value, Active Trader, Jan./Feb. 2001, p. 28, for more information. Uptick rule: Securities and Exchange Commission rule that requires short sales to be executed when the last recorded price in a stock is higher than (or equal to, depending on the circumstances) the immediately preceding price. (The rule varies slightly for NYSE and Nasdaq stocks, although the principle is the same.) See A walk on the short side, Active Trader, July 2000, p. 32, for more information.

Trade examples
Figure 1 shows that on April 27, Ebay (EBAY) made a high of 48 and a low of 45.5. Based on the guideline to place the entry points 0.3 to 0.5 points above or below the previous days high and low prices, on April 30 we set long entry at 48.5 (0.5 points above the previous days high of 48, which was a whole number).

A buy signal occurs in EBAY when the stock moves .5 points above the whole number nearest to yesterdays high.
EBay Corp. (EBAY), two-minute 52.00 Buy signal is generated when price exceeds previous days high +.5 points. 51.50 51.00 50.50 0 50.00 49.50 Previous days high: 48.00 49.00 48.50 48.00 47.50 47.00 46.50 46.00 45.50 Previous day (compressed) 4/27/01 9:30 4/30/01 10:00 Current day 10:30 11:00 11:30 12:00 45.00

Source: Data Broadcasting Corp.

ACTIVE TRADER September 2001 www.activetradermag.com

33

We trailed a stop no more than 0.4 points behind the current price level. In this trade, the trailing stop was triggered at 49.375, yielding a net profit of 0.875 points in less than 20 minutes. Figure 2 (left) is an example on the short side of the market. Adobe (ADBE) traded between 42.4 and 45.4 on May 2. The next day (May 3) we therefore looked to go short if the market fell to 41.6, 0.4 points below the whole number (42) closest to the previous days low. However, ADBE gapped down to 41.6 in pre-market trading. When this happens, its a good idea to move the initial entry point farther away from the price action to avoid being caught on the FIGURE 2 SELL SIGNAL

wrong side when the market opens. Therefore, we adjusted the entry to 41.4 to clear the gap with as small a distance as possible. This is not an exact science. Sometimes you will jump into a trade too soon despite this step; other times this precaution will save you from taking an unnecessary loss. Because of the uptick rule, it may take several attempts to execute a short trade. Dont be afraid to hit the short button on your trading platform software several times (assuming you are using a directaccess broker) so you can get in on an uptick. Check your trade confirmation window to make sure you are executing a single short trade, and not mistakenly

ADBE had already reached the pre-determined entry price in pre-market trading. The stock kicked off the official trading session with a two-minute rally. Had we sold immediately on the open without adjusting the entry price to take this price action into account, we would have been stopped out with a loss.
Adobe Systems Inc. (ADBE), two-minute 45.60 45.40 45.20 45.00 44.80 44.60 44.40 44.20 44.00 43.80 43.60 43.40 43.20 43.00 42.80 42.60 42.40 42.20 42.00 41.80 41.60 41.40 41.20 41.00 40.80 40.60 40.40 40.20 40.00 39.80 11:30 12:00

entering multiple trades. Because the stock already has traded at or close to this price in the pre-market, it also is important that the time and sales window confirms large block trades are going our way and that most trades are being executed at the bid price (indicating selling pressure). After the entry at 41.4, we trailed a stop a few spreads behind the open trade, without exceeding the 0.3-point stop weve set for this trade. Note that the stop is slightly tighter in this trade than in the first example. Because of the support-resistance level created by the pre-market gap to 41.6, this trade will be invalidated as soon as the market trades above this level, which will happen at 41.7 0.3 points away from the entry price. Most trades entered before 10 a.m. should not last any longer than five to eight minutes. Trades entered after 10 a.m. can last a little longer, but never more than 20 minutes. This trade was covered at 40.75 for a .65-point profit.

Bottom line
Successful trading is much more difficult than it first appears. It requires a long process of market watching and practicing chart pattern recognition. In time, you can learn to avoid low-potential situations and focus on entries based on specific chart pattern breakouts and breakdowns. Planning ahead to trade breakouts should be done daily using the previous days high and low to set trade alerts. Trading with the trend on breakouts using these criteria will help traders avoid overtrading and selectively trade the strongest and most powerful chart patterns. The only exceptions to trading breakouts of the previous days trading range are those rare occasions when a stock makes a rapid multi-point drop from the previous days high and bounces off the previous days low. But this is a trade for experienced traders only, and you should not expect to capture more than 50 percent of the retracements following the bounce. In fact, buying bottoms and shorting tops is largely a failing method, despite the amazing predisposition of most new traders to attempt these types of trades. Your trades should be at least 80 percent breakouts and no more than 20 percent bottom bounces, not the other way around. Its a good idea to tape that to your monitor, along with the words, Tight stops no exceptions!

Short signal is generated at 41.40.

Previous days low: 42.20

Previous day (compressed) 9:30 5/3/01 10:00

Current day

10:30

11:00

5/2/01

Source: Data Broadcasting Corp. 34

www.activetradermag.com September 2001 ACTIVE TRADER

TRADING Strategies

Swing trading 10-day

CHANNEL BREAKOUTS
To trade breakouts successfully, you have to line up as many market factors as possible. Incorporating volume and momentum into your trading plan can put you on the inside track to breakout trades that wont break apart.

BY KEN CALHOUN

T
35

rying to outguess the market by picking bottoms and tops is usually unsuccessful, and more often than not results in a large numbers of whipsaw trades. By contrast, professional traders and institutions favor breakout trading. Combining 10-day support and resistance lines with confirming signals such as volume breakouts and reversals is a practical approach to identifying swing trade opportunities. These 10-day channels provide clear criteria for entering breakout trades once these price levels are triggered.

Why swing trading?


Swing trading is a shorter-term trading style in which positions are held anywhere from one to 10 days. Swing trading has been increasingly popular ever since

the Securities and Exchange Commission (SEC) raised the minimum margin requirement for pattern day traders (PDTs) to $25,000 on Sept. 28, 2001 (see New rules for the intraday trader, Active Trader, October 2001). Traders with less than the $25,000 can make no more than four intraday trades in a five-day period; those who exceed this limit must meet the new day trading margin requirements or face potential position liquidation or account closure. Day trading, in which trades often are entered and exited in a matter of seconds, can be highly stressful and requires a significant initial investment not just in trading funds, but in computer hardware and software, and training in directaccess trading methods as well. Swing trading, by contrast, is generally less stressful and does not require as

large an upfront investment in capital, software or equipment. Because it does not require a trader to watch the market all day, swing trading can be done on a part-time basis using online discount brokers. Professional day trading requires a full-time commitment and a fast direct-access broker. This makes swing trading a viable alternative for active traders who are unwilling to meet the new margin requirements and/or uncomfortable with the technology and capital demands of day trading. Swing trading is also an effective way to learn many of the classic technical indicators and limit risk with small-share or paper trades. The following strategy uses simple volume and sector-strength filters to determine when to trade breakouts of 10-day price channels.

www.activetradermag.com March 2002 ACTIVE TRADER

If a stock gaps
The tools
For this approach, use a 15-minute chart encompassing the most recent 10 days (i.e., today and the previous nine trading sessions). The following rules are given in terms of upside breakouts and long trades; reverse the rules for short trades. However, this strategy is better for long swing entries. For a breakout swing trade, buy when a stock breaks out at least 50 cents over the whole number above the 10-day high, accompanied by volume that is higher than the previous days volume at the same time. For example, assume that during the previous nine trading sessions plus today, the highest price a stock traded at was 37.8, which was set on the previous trading day. The trigger for a 10-day breakout long trade would be 38.5, as long as the volume in the current session is higher than it was at the same time in the previous session. If the stock opened today at 37.6 and traded up to 38.5, this would trigger a long trade. The only exception is when the entry price would contain a 9 e.g., 19.5, 29.5, 39.5, and so on; in such cases, wait until the stock clears the nearest multiple of 10, which would result in long trade triggers at 20.5, 30.5, 40.5, etc. The rationale is prices with a 9 tend to look expensive and often meet resistance, choppy price action, or both near multiples of 10.

The rules
The best types of stocks to trade with this approach are Nasdaq or NYSE stocks priced between $5 and $60, with average daily volume of at least 800,000 shares, and average intraday trading ranges of 1 to 4 points. Here are the rules: 1. Define the 10-day high and low for the stock using a 15-minute candlestick or bar chart. Be sure to include volume bars on the chart. 2. Enter 50 to 60 cents above the nearest whole number above the highest high of the past 10 days, including today. 3. Look for volume breakouts on the 10-day chart. Compare volume bars on the current trading day to previous trading days. The best entries are those for which volume is higher than in the previous session. 4. Confirm entries using market indicators such as the Arms Index (TRIN) as well as the time of day. The TRIN measures the net buying pressure vs. selling pressure in the market at a given point in the trading day. The formula is: {number of advancing issues/number of declining issues}/{volume of advancing issues/volume of declining issues}

open more than 10 to 15 percent from its previous close, it will often reverse and fill the gap, in which case its necessary to take your profit before the market does.
The TRIN, versions of which are available for both NYSE and Nasdaq stocks, can help determine whether a trade is advisable by highlighting whether momentum is bullish or bearish at a given time. A TRIN reading of 1 means buying/selling volume and the number of advancers/decliners are equally matched; a TRIN reading above 1 is bearish; a TRIN under 1 is bullish. See Indicator Insight, Active Trader, December 2000, for more information on this indicator. Its also helpful to enter at times of the day when the market is the strongest and most volatile. Its usually best to enter 10-day channel long trades in the early morning, from 9:45 until 11 a.m. EST, or during late-afternoon rallies between 2:30 and 3:30 p.m., for example. Certain cautionary indicators (red flags) can be used to eliminate poor trades. For long entries, avoid highs reached on lower-than-average volume or those reached by a stock in a weak sector that day. Compare sector indices such as the SOX, NBI, GHA and GSO to determine which are strongest, and give preference to entries in the strongest sectors
36

Strategy snapshot
Strategy: 10-day channel breakout Markets: Nasdaq or NYSE stocks trading between $5-$60, with average daily volume of at least 800,000 shares and average daily range of 1 to 4 points. Entry (for longs; Go long 50 to 60 cents above the nearest whole number reverse for shorts): above the highest high of the past 10 days. Confirmation: The best entries are those in which volume is higher than in the previous session and/or when the stock is in a strongly trading sector. Avoid highs that are reached on lower-than-average volume or those reached by a stock in a weak sector on the entry day. Exit/risk control: The widest initial stop should be the closer of 1.5 points or the previous days low. The most conservative initial stop-loss is the previous days high. Once in a profitable trade, trail the stop .5 points below the current trading range.

ACTIVE TRADER March 2002 www.activetradermag.com

FIGURE 1 POISED TO BREAK OUT NVDA traded in a channel from 48 to 55 for 10 days, forming an ascending triangle toward the end of the period as it challenged the resistance level another time. Entry would occur at 55.50, 50 cents above the highest high of the past 10 days.
Nvidia (NVDA), 15-minute Resistance
55.50 55.00 54.50 54.00 53.50 53.00 52.50 52.00 51.50 51.00 50.50 50.00 49.50 49.00 48.50 48.00 6 million 4 million 2 million 12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 11/16/01 11/19/01 11/20/01 11/21/01 11/23/01 11/26/01 11/27/01 11/28/01 11/29/01 11/30/01

Ascending triangle Support Volume

your risk tolerance. A good initial stop-loss is the previous days low or 1.5 points, whichever is smaller. For example, lets say the 10-day channel range for EBAY is bounded by a low (support level) of 61.8 and a high (resistance level) of 66.8. If the previous days range was 65.5 to 66.8, we would enter EBAY on a breakout above 67.5. The initial maximum stop-loss for this trade would be at 66, 1.5 points below entry (roughly 2 percent). If you trade on a shorter time frame, say three- or five-minute charts, you might consider setting a tighter stop at the previous days high. 6. Trail a stop to protect open profits at 2 percent (generally from .5 to 1.5 points) below the current level of the open trade, or use a time stop of no longer than 10 days (i.e., exit all remaining open positions after 10 days). Whenever one of the exit signals appears, the position should be closed with a profit. Re-enter on subsequent breakouts after retracements have occurred.

Source: eSignal

FIGURE 2 AFTER THE BREAKOUT After the stock fulfills the entry requirements and breaks out above resistance, a trailing stop is used to lock in profits.
Intuit Inc. (INTU), 15-minute Entry Resistance
44.00 43.50 43.00 42.50 42.00 41.50 41.00 40.50 40.00 39.50

How to handle gaps


Managing gap opens on swing trades is always a challenge. When a stock gaps open significantly above the previous days high (in your favor for a long swing trade), trail a stop no more than 50 cents below the current pre-market trading range to lock in your profit. However, if a stock gaps open more than 10 to 15 percent from its previous close, it will frequently reverse and fill the gap, in which case its necessary to take your profit before the market does. This is especially true if the stock gaps up above the previous days high. Conversely, when a stock gaps down significantly against you, its often best to wait until 15 to 20 minutes after the open to exit the position, because down gaps frequently attract buyers who can bring the price back up. Again, use a stop-loss of no more than 50 cents below the current pre-market trading range. It is sometimes helpful to wait until approximately 9:45 a.m. EST to see where the stock trades before exiting a position. It is frustrating to panic out of a gap-down swing trade only to see the stock turn around and fill the gap in the first few minutes of the trading day. Calmly give it a few minutes to establish a trend and see if it consolidates and

Support Volume

39.00

600,000 400,000 200,000

12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 12:00 11/16/01 11/19/01 11/20/01 11/21/01 11/23/01 11/26/01 11/27/01 11/28/01 11/29/01 11/30/01

Source: eSignal

e.g., those up 1.5 to 3 percent or so on the day at the time of the trade entry. Also check to see if sectors are convergent (all green or red i.e., moving up or down) or divergent (mixed). Its best to enter swing trades on days where all sectors are convergent and the broad market has strength in a single direction.
37

Mixed, choppy days are poor days for swing trade entries. 5. Stop-loss values are determined by the previous days high and low. Either of these price points can provide you with an initial stop-loss value, depending on the intraday market trend and

www.activetradermag.com March 2002 ACTIVE TRADER

FIGURE 3 OVERFLOWING CUP Like channels and ascending triangles, cup patterns also provide well-defined resistance levels for breakout trades. The stock broke out above a second cup pattern on Dec. 7, and was stopped out with a 3.6 point profit on Dec. 11.
Invision Technologies (INVN), 15-minute
40.00 38.00 36.00 34.00

Resistance

Breakout entry Exit

32.00 30.00 28.00 26.00 24.00

Initial cup

Second cup

22.00 20.00 18.00 16.00

Volume

1 million 500,000

12:00 12:00 12:00 11/29/01 11/30/01 12/3/01

12:00 12/4/01

12:00 12:00 12:00 12:00 12:00 12:00 12/5/01 12/6/01 12/7/01 12/10/01 12/11/01 12/12/01

Source: eSignal

reverses this initial gap move.

Trade examples
Figure 1 shows Nvidia (NVDA) trading in a 10-day channel (between 48 to 55) from Nov. 16, 2001, to Nov. 30, 2001. Based on the guideline to enter 50 cents over the nearest higher whole number above the highest high of the 10 days, a long entry would be triggered at 55.5. (If, however, the stock gaps up to, say, 55.8 in pre-market trading, the entry would be reset over the next number up, at 56.5 or higher). The initial stop would be placed at 54, 1.5 points below the entry, because 1.5 points is a tighter stop than the previous days low (see trade rule No. 5). The alternate, more conservative stop-loss level is the previous days high in this case 54.60. Notice this stock forms an ascending triangle pattern following an initial downturn earlier in the 10-day channel, and is poised to break out to new highs if it clears the 55 resistance area. If the volume when the trade is entered (on Dec. 1, not shown) is higher than it was at the same time on the previous day, this would provide additional confirmation for a long trade.

Figure 2 provides an example of how to manage a profitable long swing trade. On the afternoon of Nov. 29, 2001, the stock cleared the 10-day high and a long trade was entered at 42.50. The initial stop loss was set at 41 (42.5-1.5). On Nov. 30, the stock continued to rally throughout the session to a high of 44, at which point it consolidated. Using a trailing stop approach raises the stop to 43.5 (44-.5), which was not triggered. The time stop is 10 days from Nov. 29. In this case the stock is up more than a point on an overnight hold. We continue to trail a stop .5 behind the current trading range until the stop is taken out.

it is sound risk management to extend yourself only on the strongest of patterns. This keeps the average entry price toward the low end of the total position. Cup-pattern breakouts, like ascending-triangle and consolidation breakouts, are much stronger than cases where a stock simply trades to a new high without penetrating any kind of resistance level. The test of sellers that occurs at a resistance level prior to a long cup-pattern breakout validates the entry and provides a support level after the trade. Cup patterns, which are extended, saucer-shaped retracements, appear fairly frequently. The key to trading them is to apply volume and other filters to avoid false breakouts that turn out to be double tops (i.e., when price falls back from the right side of the cup instead of breaking out above the resistance level of the cup). Figure 3 shows a cup pattern that started on Dec. 3, pulled back from the resistance level of 28.59 on Dec. 5 (forming a short-lived double top), formed another cup and finally broke out above the resistance on the afternoon of Dec. 7. A long trade was triggered at 30.5 (because the entry price would have been 29.5, and in such cases entry is made above the nearest multiple of 10). The stock gapped open higher on Dec. 10 and the trade was exited on Dec. 11 (when the trailing stop was hit) at 34.1 for a 3.6-point profit.

Bottom line
Swing trading provides traders with opportunities to manage multiple positions and entries at a more leisurely trading pace than is possible in the hectic world of day trading. However, every trader should research and experiment with different trading styles to help determine his or her preference and level of comfort. Using 10-day trading channels to identify entries on volume breakouts can help you better define support and resistance levels and provide techniques you can integrate with other technical indicators to develop a swing-trading plan. Using a comprehensive, measured and specific strategy to trade breakouts continues to produce entries that are more consistent than intra-range or bounce trade approaches. Using volume and price action filters will help you avoid false breakouts in choppy markets.
38

Dynamic position sizing using cup breakouts


Dynamic position sizing is the process of adding to an initial position once a stock has broken out and is continuing to attract buyers. For example, a trader may buy 200 shares initially and add another 100 shares on a subsequent breakout as the stock continues to climb. The key to using dynamic position sizing is to add no more than half the number of the initial trade size on subsequent 10-day high cup-pattern breakouts. When adding to an initial position,

ACTIVE TRADER March 2002 www.activetradermag.com

EQUITY CURVE
3,000,000 2,500,000

System logic: The volatility breakout system is a classic trading strategy based on identifying situations when a 1,500,000 market is about to burst out of a congestion area and potentially establish a new long-term trend. It also can signal a 1,000,000 trade if the market is already trending in one direction but quickly reverses to establish a new trend in the opposite 500,000 direction. This system uses Bollinger Bands (complemented by 0 moving averages), which are lines typically plotted two 12/7/92 12/7/93 12/7/94 12/7/95 12/7/96 12/7/97 12/7/98 12/7/99 12/7/00 12/7/01 standard deviations above and below a moving average. Bollinger Bands expand during high-volatility periods and contract during low-volatility periods. Test data: Daily prices for 14 Dow Jones Industrial Average stocks When volatility is high, the system is designed to stay out of the (AXP, C, CAT, DIS, GM, HWP, IBM, INTC, JPM, KO, MO, MRK, market to avoid taking any unnecessary risk, but if an entry is trig- MSFT, T), with $10 deducted per trade for slippage and commisgered anyway, the system will work to keep you in the trade to sions. avoid being stopped out prematurely with a loss. A long entry is triggered when price moves above its 60-day moving average and Starting equity: $1 million (nominal). breaks the upper Bollinger Band. To exit, price must move below its 30-day moving average and break a lower Bollinger Band that is set Buy-and-hold stats: one standard deviation away (instead of the usual two). Because the Total Maximum Longest next entry cannot occur until price moves back above the lower Index return drawdown flat period band, above its moving average and above the upper band, there DJIA 175% 31.5% (current) 29 months (current) will be times when the system is out of the market completely. S&P 500 120% 40% (current) 26 months (current) Nasdaq 182% 80.5% (current) 26 months (current) Markets: This system will be tested on stocks and also on futures (p. 70). Test results: The system was originally tested on all 30 stocks in the DJIA; the 14 in this test were selected because they were the Rules: ones that showed a profit. Singling out these stocks, though, 1. Go long tomorrow if price moves above its average price for the last 60 days and breaks the SAMPLE SIGNALS upper Bollinger Band. 2. Exit with a profit or loss if 58.00 Philip Morris (MO), daily price moves below its 30-day moving average and penetrates LX = Long exit 56.00 LX a lower Bollinger Band set one standard deviation away.
LX Buy Sell 52.00 54.00

Reverse the rules for short trades. Money management: 1. Risk 4 percent of available equity per stock traded. 2. The number of shares to trade (ST) is calculated using the following formula: ST = AC * PR / R where AC = Available capital PR = Percent risked R = Distance between entry price and exit price (stop-loss). Test period: November 1992 to June 2002.
39
February Source: Omega Research ProSuite March April May June

Account balance ($)

Volatility breakout system

2,000,000

50.00

Buy

48.00

46.00

44.00

42.00

July

www.activetradermag.com October 2002 ACTIVE TRADER

DRAWDOWN CURVE
12/7/92 0% -5% -10% -15% -20% -25% -30% 12/7/93 12/7/94 12/7/95 12/7/96 12/7/97 12/7/98 12/7/99 12/7/00 12/7/01

failed to create results as good as the ones produced by the test on currency futures (see Futures System Lab, p. 44). One thing to keep in mind is that portfolio composition is more complex than simply eliminating instruments that dont perform well. In a dynamic portfolio such as this one, where a group of stocks interacts within a single trading account, the ability of an individual stock to turn a profit or loss also depends on the behavior of all the other stocks. As proof of this, three stocks that were profitable when all 30 stocks were tested showed a loss when the field was pared to 14. If we were to test only the remaining 11 that showed a profit, its likely a few more would turn into losers. This correlation also makes it extremely difficult to trade a longterm system on the stock market. The individual stocks either trend well, almost all at once, or they dont, which results in a large amount of whipsaw losing trades and rather severe drawdowns. The way to overcome this is to diversify by trading as many stocks from different sectors and groups as possible.

In this system, though, the large distance between the entry and exit prices requires trading rather small positions. Doing otherwise would run the risk of using all the capital on only a few positions. This in turn will result in relatively small dollar gains despite large price swings. Even though the system trades only 14 stocks, close to 75 percent of available capital is tied up. Also, the current drawdown has gone on for 42 months. This is likely a reflection of the disappearance of the stock markets pre-2000 trending characteristics, and it is not very likely that a system like this will start producing a profit anytime soon. This system is also a bit passive in its trade frequency. To make it more aggressive, the lookback period can be shortened and/or the standard deviation boundaries tightened.

ROLLING TIME WINDOW RETURN ANALYSIS


Cumulative Most recent: Average: Best: Worst: St. dev.: Annualized Most recent: Average: Best: Worst: St. dev: 12 months 16.70% 10.76% 58.88% -15.08% 17.29% 12 months 16.70% 10.76% 58.88% -15.08% 17.29% 24 months 36 months 48 months 60 months

-0.91% -5.86% 15.22% 22.04% 24.50% 42.81% 64.40% 83.77% 87.95% 102.78% 162.29% 155.19% -19.33% -16.50% 4.57% 16.53% 22.72% 30.43% 36.41% 42.26% 24 months -0.45% 11.58% 37.10% -10.19% 10.78% 36 48 months months -1.99% 12.61% 26.57% -5.83% 9.26% 3.61% 13.23% 27.26% 1.12% 8.07% 60 months 4.06% 12.94% 20.61% 3.11% 7.30%

STRATEGY SUMMARY
Profitability End. equity ($): 2,491,172 Total return (%): 149 Avg. annual ret. (%): 10.00 Profit factor: 1.34 Avg. tied cap (%): 73 Win. months (%): 53 Drawdown Max. DD (%): Longest flat (m):
25.8 41.5

Trade statistics No. trades: 456 Avg. trade ($): 3,270 Avg. DIT: 35.0 Avg. win/loss ($): 31,090 (13,546) Lrg. win/loss ($): 391,627(109,437) Win. trades (%): 38.8 TIM (%): Tr./Mark./Year: Tr./Month: 100 57.7 4.3 4.0

LEGEND: Cumulative returns Most recent: most recent return from start to end of the respective periods Average: the average of all cumulative returns from start to end of the respective periods Best: the best of all cumulative returns from start to end of the respective periods Worst: the worst of all cumulative returns from start to end of the respective periods St. dev: the standard deviation of all cumulative returns from start to end of the respective periods Annualized returns The ending equity as a result of the cumulative returns, raised by 1/n, where n is the respective period in number of years

LEGEND: End. equity ($) equity at the end of test period Total return (%) total percentage return over test period Avg. annual ret. (%) average continuously compounded annual return Profit factor gross profit/gross loss Avg. tied cap (%) average percent of total available capital tied up in open positions Win. months (%) percentage profitable months over test period Max. DD (%) maximum drop in equity Longest flat longest period, in months, spent between two equity highs No. trades number of trades Avg. trade ($) amount won or lost by the average trade Avg. DIT average days in trade Avg. win/loss ($) average wining and losing trade, respectively Lrg. win/loss ($) largest wining and losing trade, respectively Win. trades (%) percent winning trades TIM (%) amount of time there is at least one open position for entire portfolio, and each market, respectively Tr./Mark./Year trades per market per year Tr./Month trades per month for all markets

Send Active Trader your systems


If you have a trading system or idea youd like tested, send it to us at the Trading System Lab. Well test it on a portfolio of stocks or futures (for now, maximum 60 markets, using the last 2,500 trading days), using true portfolio analysis/optimization. Most system-testing software only allows you to test one market at a time. Our system-testing technique lets all markets share the same account and is based on the interaction within the portfolio as a whole. Start by e-mailing system logic (in TradeStations EasyLanguage or in an Excel spreadsheet) and a short description to editorial@activetradermag.com, and well get back to you. Note: Each system must have a clearly defined stop-loss level and a suggested optimal amount to risk per trade.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER October 2002 www.activetradermag.com

40

FUTURES

&

OPTIONS

System Lab
EQUITY CURVE
5,000,000 4,500,000 4,000,000

Futures volatility breakout system


System logic: The system uses Bollinger Bands and a moving average to trade volatility breakouts. The logic and tools for this system are described in the Trading System Lab on p. 56. Markets: Most trending futures markets, such as currencies, energies and interest rates. This system was also tested on stocks (see Trading System Lab). Rules: 1. Go long tomorrow if price moves above the 60-day moving average and breaks the upper Bollinger Band. 2. Exit with a profit or loss if price moves below its 30-day moving average and penetrates a lower Bollinger Band set one standard deviation away (instead of the usual two). Reverse the rules for short trades. Money management 1. Risk the following percentages of available equity per market: 2 percent for Australian dollar, British pound, Canadian dollar, Dollar index and Swiss franc, and 4 percent for Japanese yen, D-mark and Euro. (The yen and the Euro are traded with twice the risk because they are the most liquid currencies.) 2. The number of contracts to trade (CT) is calculated with the following formula: CT = (AC * PR) / (R * PV) where AC = Available capital PR = Percent risked R = Distance between entry price and exit price (stop-loss). PV = Dollar value of a one-point move. Test period: November 1992 to June 2002 Test data: Daily futures prices for eight currency futures: Japanese yen, Australian dollar, Canada dollar, British pound, Dollar index, Swiss franc, and D-mark (until Dec. 31, 1999)/Euro (after Dec. 31, 1999). Starting equity: $1 million (nominal). Test results: If there ever was a system built for the currency markets, this is it. The reason is the smooth, long-term trends currencies sometimes exhibit, probably because they are mostly influenced by the global, long-term economical and political climate. In contrast, the stock market is very sensitive to all other markets; while the stock market cares a great deal about the currency market, the currency market doesnt care all that much about the stock market.

Account balance ($)

3,500,000 3,000,000 2,500,000 2,000,000 1,500,000 1,000,000 500,000 0 11/25/92 11/25/93 11/25/94 11/25/95 11/25/96 11/25/97 11/25/98 11/25/99 11/25/00 11/25/01

The risk for this system was 2 or 4 percent per trade, which resulted in both a drawdown and flat time that would be deemed unacceptable by most professional money managers. These numbers should stay under 30 percent and 18 months, respectively. The major disadvantage of a trend-following system is most markets that work well with this type of a system are usually correlated. In other words, they will either all work well or perform poorly simultaneously. This is reflected in the erratic look of the systems equity curve. Because of this, the drawdowns can be both deep and long, and it usually requires a couple of very good trades to get the system profitable again. Research has shown that a trend-following system will work best when traded on 15 to 20 select markets from various sectors of the economy. The system ties up an average of 11 percent of capital. This means there is plenty of room to add markets, and even trade the system more aggressively, without extending ourselves too much. This is because futures have much smaller margin requirements than stocks. Theoretically, as many as 40 to 50 different futures contracts could be traded before reaching the same level of margin fewer than 20 stocks would require. Finally, the most recent drawdown of approximately 30 percent is the only one over the last 10 years of such magnitude. Most of the previous drawdowns bottomed between 10 to 20 percent. Therefore, the latest drawdown is quite possibly an anomaly. That said, however, there are no guarantees in the market, and your worst drawdown is always still to come. The system also has a relatively low trade frequency. To make it more aggressive, the lookback period can be shortened and/or the standard deviation boundaries tightened.
ROLLING TIME WINDOW RETURN ANALYSIS Cumulative 12 24 36 48 60 months months months months months Most recent: 34.31% 58.39% 65.73% 114.82% 138.14% Average: 15.07% 34.15% 55.68% 80.53% 109.16% Best: 74.75% 76.50% 108.66% 137.94% 202.94% Worst: -28.10% -1.33% 4.12% 28.76% 38.77% St. dev.: 18.17% 16.26% 23.27% 22.74% 37.29% Annualized 12 24 36 48 60 months months months months months Most recent: 34.31% 25.85% 18.34% 21.06% 18.95% Average: 15.07% 15.82% 15.90% 15.91% 15.90% Best: 74.75% 32.86% 27.78% 24.20% 24.82% Worst: -28.10% -0.67% 1.36% 6.52% 6.77% St. dev: 18.17% 7.82% 7.22% 5.26% 6.54%
LEGEND: Cumulative returns Most recent: most recent return from start to end of the respective periods Average: the average of all cumulative returns from start to end of the respective periods Best: the best of all cumulative returns from start to end of the respective periods Worst: the worst of all cumulative returns from start to end of the respective periods St. dev: the standard deviation of all cumulative returns from start to end of the respective periods Annualized returns The ending equity as a result of the cumulative returns, raised by 1/n, where n is the respective period in number of years

STRATEGY SUMMARY
Profitability End. equity ($): 4,550,290 Total return (%): 355 Avg. annual ret. (%): 17.13 Profit factor: 1.32 Avg. tied cap (%): 11 Win. months (%): 51 Drawdown Max. DD (%): 31.6 Longest flat (m): 19.7 Trade statistics No. trades: 303 Avg. trade ($): 11,717 Avg. DIT: 35.8 Avg. win/loss ($): 53,057 (29,536) Lrg. win/loss ($): 345,600 (131,350) Win. trades (%): 42.1 TIM (%): 97 54.1 Tr./Mark./Year: 4.0 Tr./Month: 2.6

LEGEND: End. equity ($) equity at the end of test period Total return (%) total percentage return over test period Avg. annual ret. (%) average continuously compounded annual return Profit factor gross profit/gross loss Avg. tied cap (%) average percent of total available capital tied up in open positions Win. months (%) percentage profitable months over test period Max. DD (%) maximum drop in equity Longest flat longest period, in months, spent between two equity highs No. trades number of trades Avg. trade ($) amount won or lost by the average trade Avg. DIT average days in trade Avg. win/loss ($) average wining and losing trade, respectively Lrg. win/loss ($) largest wining and losing trade, respectively Win. trades (%) percent winning trades TIM (%) amount of time there is at least one open position for entire portfolio, and each market, respectively Tr./Mark./Year trades per market per year Tr./Month trades per month for all markets

41

www.activetradermag.com October 2002 ACTIVE TRADER

TRADING Strategies

Better breakout trading: THE NOISE CHANNEL SYSTEM

All breakout traders have to deal with the reality of false moves
BY DENNIS MEYERS, PH.D.

and whipsaws. The noise channel breakout system shows how a filter can improve the performance of intraday breakout trading.
In the tests that illustrate this strategy, well use five-minute bars of IBM from Feb. 21 to April 6. (For an important point on testing stock trading strategies, see A note on price data and dividends, p. 75). Intraday data has a high noise level, meaning it contains a great deal of random price movement that looks significant but turns out to be meaningless. Without some kind of filter, the losses generated by the random price movement (that is, whipsaws) can completely overwhelm a trading system. To help eliminate such random movement, we will add a noise filter, designated by the symbol f, to the basic channel breakout system. There are three system parameters to find: nhi, which is the number of bars in the lookback period used to determine the highest high price (hhp). nlo, which is the number of bars in the lookback period used to determine the lowest low price (llp). f, which is the amount price must exceed the hhp or llp to trigger a buy or sell. The rules for the resulting noise channel breakout system (NCBS) are: Buy rule: If price crosses above the highest high of the last n

rice trends begin with a breakout of a previous high or previous low. Unfortunately, many breakouts are random mere market noise. False moves and reversals can repeatedly whipsaw traders who act immediately on typical breakout signals. As a result, traders sometimes attempt to use filters to improve the odds of catching a successful breakout trend. One example of a simple filter is to wait for consecutive closes above or below a breakout level. Another example is waiting for price to penetrate a breakout level by x percent or points before acting on the signal. The following discussion will analyze a variation on the simple channel breakout system that uses the latter type of filter to minimize whipsaws on an intraday basis. The strategy will be tested on International Business Machines (IBM). The discussion is broken into two parts, covering 1) the system rules and data selection and 2) testing procedures. This will give you the necessary tools for performing similar research and tests on other markets.

The noise channel breakout system


The basic system we will use here is a fairly simple and effective breakout system that has been in the public domain for many years: the channel breakout system, which goes long on a move above the highest high of the last n bars and goes short on a move below the lowest low of the last n bars.

bars (nhi) by an amount greater than or equal to f, buy at market. For example, if n = 20 and f = 2 (points), you would go long when price moved 2 points above the highest high of the last 20 bars. In addition, when short, and when calculating the highest high price (hhp), it cannot be higher than the previously calculated hhp as previous highs are dropped out of the lookback window. Otherwise, a situation can occur where there is a higher hhp without the price filter f being hit. Therefore, when short the stock, the hhp can only stay the same or go lower. It cannot go higher. Sell rule: If price crosses below the lowest low price of last n bars (nlo) minus an amount greater than or equal to f, sell at market. In addition, when long and when calculating the lowest low price (llp), it cannot be lower than the previous calculated llp as previous lows are dropped out of the lookback window. Again, to avoid the situation where a lower llp occurs without the price filter f being hit, when long the stock, the llp can only stay the same or go higher. It cannot go lower. Exit rule: Close the position five minutes before the NYSE close (no trades are carried overnight).

stable i.e., the profits, wins and drawdowns should not change much as the parameters move by a small amount away from their optimum values. In other words, the system

TABLE 1 OPTIMUM PARAMETER VALUES FOR TEST DATA Start date 2/21/01 2/28/01 End date 3/23/01 3/30/01 nhi 8 8 nlo 4 4 f 1 1

TABLE 2A TEST PERIOD 1 Performance summary for noise channel breakout system: IBM, five-minute bars from Feb. 21 to March 23. Statistics based upon trading 1,000 shares of IBM. Performance summary:
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max intraday drawdown ($): Profit factor: 13,890 39,260 48 26 5,940 1,510 1.309 4 39 -8,470 1.547 Max. no. contracts held: 1

All trades
Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -25,370 54 22 -2,060 -1,153.18 289.38 3 21

Testing the strategy


The walk-forward testing approach will be used to test this strategy because of the volatile nature of intraday stock prices. Intraday price dynamics are constantly changing because of economic surprises, events and trader sentiment. Also, the time of year such as the season, holidays, vacation time, etc. affects the character of intraday markets. As a result, tests performed on intraday data three months ago may no longer be representative of todays intraday price action. For more information on walkforward testing and how it was used for this strategy, see Proper system testing,. The best parameters will be defined as those values that generate the best net profits combined with the minimum drawdown and minimum largest losing trades. In addition, the results should be
43

TABLE 2B TEST PERIOD 2 Performance summary for noise channel breakout system: IBM, five-minute bars from Feb. 28 to March 30. Statistics based upon trading 1,000 shares of IBM. Performance summary:
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max. intraday drawdown ($): Profit factor: 10,490 35,500 47 22 5,940 1,613.64 1.613 3 39 -9,660 1.419 Max. no. contracts held: 1

All trades
Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -25,010 47 25 -1,840 -1,000.40 223.191 3 26

Source: TradeStation by TradeStation Group Inc.

www.activetradermag.com September 2001 ACTIVE TRADER

performance using an nhi of 10 bars should be similar to that using nine bars or 11 bars. Also, in choosing the best parameters, we considered only those results with four or less maximum consecutive losses.

from March 26 to April 6. The trades in this time period are the out-of-sample trades TABLE 3 OUT-OF-SAMPLE RESULTS

generated from the optimized parameters from the two test sections of Feb 21 to

Test results
Table 1 shows the optimum parameter values for the test window described in Proper system testing. The nhi was eight bars, the nlo was four bars and f was 1 point. Tables 2a and 2b show test results using these parameters. Table 3 summarizes the combined performance of the two out-of-sample data segments from March 26 to April 6. This performance represents what would have happened in real time if you used the system parameters found in the test section (not including slippage and commissions). By comparison, the same nhi and nlo values tested without any filter resulted in a loss of $1,150. Table 4 is a trade-by-trade summary TABLE 4 TRADE-BY-TRADE SUMMARY

Combined walk-forward out-of-sample performance summary for the noise channel breakout system: IBM five-minute bars from March 26 to April 6. Statistics based upon trading 1,000 shares of IBM. Performance summary:
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max. intraday drawdown ($): Profit factor: 8,390 14,460 16 8 4,000 1,807.50 2.382 5 54 -4,480 2.382 Max. no. contracts held: 1

All trades
Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -6,070 50 8 -1,350 -758.75 524.38 3 37

Source: TradeStation by TradeStation Group Inc.

This trade summary for the out-of-sample test (five-minute bars, March 26 to April 6) of the noise channel breakout system shows the strategy actually worked better on the short side than the long side.
Entry Date Entry time Buy or sell
Sell Buy Sell Buy Sell Buy Sell Buy Sell Sell Buy Sell Buy Sell Buy Sell

Entry price
93.75 95.59 97.92 96.05 94.90 96.70 96.20 97.75 96.40 93.00 92.00 92.00 95.68 97.30 98.24 97.30

Exit date
3/26/01 3/27/01 3/28/01 3/29/01 3/29/01 3/30/01 3/30/01 4/2/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01

Exit time
15:55 15:55 15:55 15:05 15:55 13:05 15:55 10:55 15:55 15:55 13:50 15:55 15:55 11:55 12:35 15:55

Exit price
94.52 99.59 94.50 94.90 94.88 96.20 96.25 96.40 94.50 90.50 92.00 91.85 98.15 98.24 97.30 97.67

# bars in trade
67 68 75 60 10 41 34 15 60 71 49 25 75 27 8 40

P&L ($)

P&L (%)

Max. profit
0 4,300 3,420 950 390 800 220 350 2,600 2,740 1,900 380 3,040 550 1,660 300

Time

Max. drawdown ($)


(1,620) 0 (380) (1,160) (500) (1,190) (840) (1,350) (1,300) 0 (1,890) (500) (10) (940) (940) (1,960)

Time

3/26/01 10:20 3/27/01 10:15 3/28/01 9:40 3/29/01 10:05 3/29/01 15:05 3/30/01 4/2/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01 9:40 9:40 10:55 10:00 9:45 13:50 9:40 9:40 11:55 12:35 3/30/01 13:05

(770) 4,000 3,420 (1,150) 20 (500) (50) (1,350) 1,900 2,500 0 150 2,470 (940) (940) (370)

-0.82% 4.18% 3.49% -1.20% 0.02% -0.52% -0.05% -1.38% 1.97% 2.69% 0.00% 0.16% 2.58% -0.97% -0.96% -0.38%

10:20 15:50 12:00 10:30 15:15 11:55 13:15 10:05 15:40 15:40 11:20 14:00 15:25 11:15 12:05 12:35

10:35 10:15 9:40 11:20 15:45 10:00 14:35 10:55 11:40 10:00 10:30 14:20 9:40 11:55 12:35 13:55

ACTIVE TRADER September 2001 www.activetradermag.com

44

A note on price data and dividends

n overlooked aspect of testing a stock trading strategy is the effect of dividends. For example, IBM pays dividends on a quarterly basis, usually on the dividend payable dates of March 10, June 10, Sept. 10 and Dec. 10. On the Ex-dividend dates (approximately one month before the payable date), the price of the stock is adjusted down by the value of the dividend. Thus, over the course of a year, IBM has a small downward price bias equal to the amount of the yearly dividend. If you were an owner of IBM, you would receive those dividends in cash, making up for the small downward bias. However, when developing and testing a system using historical stock data, prices are not adjusted for dividend payments. This creates a small distortion in parameter selection and forward-adjusted results. Because no dividends were paid in the data sample used for the test in this article, no adjustment needs to be made. However, if the intraday time period fell on an ex-dividend date, an adjustment would have to be made to avoid distortion.

March 23 and Feb. 28 to March 30. Figure 1 is a five-minute chart with the noise channel superimposed, as well as some of the buy and sell signals from the Table 4 trade-by-trade summary.

Breaking down the numbers


With respect to average winning and losing trades, drawdowns and profit factor, the out-of-sample performance (Table 3) was better than the test sample performance (Tables 2a and 2b) The better performance of the out-of-sample section could have been coincidental, but it does indicate that four weeks of test data was enough to capture the intraday price dynamics of this stock.

Proper system testing


hen testing any trading strategy, the important point is how well it will perform on price data it has not been optimized on that is, out-of-sample data. In short, without out-of-sample testing, its nothing more than a hope and a prayer to believe that system performance in the future will be anywhere near the optimized performance. For example, its possible to take a trading strategy with four independent variables, or parameters, and with hindsight, find the values for each of them that give the best (optimized) results on a specific historical period say, the last three years (using daily price data). However, these optimized parameter values have, in essence, been cherry-picked for this particular data period (a process known as curve-fitting), and are unlikely to perform as well on other historical test periods, or in actual trading in the future. A walk-forward testing procedure was applied to the noise channel breakout system as follows: Five-minute bars from a period of four weeks from the start of the test period Feb. 21 to March 23 were chosen and system parameter values were found through optimization on this intraday data segment. In other words, the best-performing system parameters (e.g., number of days in lookback period, noise filter value) were determined by testing a range of values for each. At this stage of system development, the only thing indicated by the optimum values in the test portion is that the data has been curve-fitted as best it can with this system. Without further testing on out-of-sample data, there is no way to tell if the system will work in the future.

These parameter values were then applied to an out-ofsample data period following the test segment (March 26 to March 30). This walk-forward process was repeated by moving the test data window forward one week, to Feb. 28 to March 30, and again finding the parameters values through optimization on this new data. These optimized parameter values are then applied to the next out-of-sample five-minute intraday data window (April 2 to April 6). An important (but unspoken) point in walk-forward testing is that if you cannot get good results in the out-of-sample data segments, real-time system performance will be random. Almost any period of historical prices can be curve fitted easily to give the false illusion of future profitability. However, these performance measures in no way reflect how a system will perform on price data it has not been optimized on. Only out-of-sample testing that is, testing on price data the system parameters were not originally derived from can determine if a system is robust and has a chance of performing well in real trading. Despite these facts, many market pundits still make the unproven claim that statistics generated solely from optimized buy and sell trades in the test section (the initial period of price data)have value in predicting whether or not the system will perform well in the future. Nothing could be further from the truth. The only thing the statistics from the test section tell you is how well you have curve-fitted the data in the test section. As a matter of fact, using optimization, its almost impossible not to get an excellent fit with great statistical results.

45

www.activetradermag.com September 2001 ACTIVE TRADER

The out-of-sample trade summary (Table 4) shows the system did better on short trades than it did on long trades. On one hand, this could indicate a negative bias for the system. On the other hand, given the current bear market environment, the ability to cash in on the short side has value. There were no big winners or big losers, indicating steady returns. Average wins were 2.4 times average losses in the out-of-sample section. Figure 1 shows how the system was able to efficiently capture intraday trends in IBM. Also, the system constraint of not carrying positions overnight eliminated many negative

opening surprises. Overall, traded on IBM, the NCBS did a good job of minimizing the whipsaw losses prevalent in breakout trading systems and maximizing the profits from major intraday trend moves.

Building on the results


To use this system in real-time trading, at least 10 additional test and out-of-sample windows should be examined to ensure the performance summarized here was not the result of chance. To determine if this approach can be used on other stocks or markets it would be necessary to follow the same proce-

dures and determine the appropriate parameters for each. Every market has subtle differences because the participants vary from market to market. Also, market activity can change over time. Consequently, you should continue to perform walk-forward testing to determine if there is a shift in the systems effectiveness and whether better parameters have emerged. Any trading method should be tested before you risk capital on the technique. Granted, there is a considerable amount of work involved, but without taking the time to adequately research a technique, the chances of success are low.

FIGURE 1 NOISE CHANNEL AND TRADE SIGNALS A few of the buy and sell signals generated by the noise channel breakout system are shown. The system successfully captured intraday trends.
International Business Machine (IBM), five-minute 101

100

-1

99

98

97

96

95 1 94

93 3/26 11:20 12:15 1:10 2:05 3:00 3/27 11:15 12:10 1:05 2:00 2:55 3/28 11:10 12:05 1:00 1:55 2:50

Source: TradeStation by TradeStation Group

ACTIVE TRADER September 2001 www.activetradermag.com

46

TRADING Strategies

The long and short of it: The Noise Channel Breakout SYSTEM 2

BY DENNIS MEYERS, PH.D.

lthough price breakouts are the basis for many trading approaches, breakout systems are plagued by false signals when price initially breaks out, triggering a buy or sell, but quickly retraces, resulting in a losing trade. To combat this problem, traders often apply filters to breakout systems, delaying trade entry until the initial breakout has been confirmed by a price move of a certain size or duration in the direction of the breakout. Better breakout trading: The noise channel breakout system (Active Trader, September 2001, p. 70) showed how a simple channel breakout system, with an additional noise filter to minimize whipsaws, could be developed to trade IBM on an intraday basis using five-minute bars. The noise filter delays taking a breakout signal until the market provides some confirmation the breakout is sustainable, thus avoiding false breakouts. One aspect the original noise channel breakout system (NCBS) did not address is whether to treat the long and short sides of the market the same that is, whether the filter should be different for long and short trades, since uptrends and downtrends have different characteristics.

Here we will use the NCBS, again applied to IBM fiveminute price bars, to see if some improvement can be made by using different filters for long and short trades, respectively. To compare the new version of the system to the previous one, the following tests will use the same five-minute bar prices of IBM from Feb. 21, 2001, to April 6, 2001. First, well review the basics of breakout systems in general and the NCBS in particular.

NCBS refresher
The basic channel breakout system goes long on a move above the highest high of the last n bars and goes short on a move below the lowest low of the last n bars. For example, a 40-day channel breakout goes long when price moves above the highest high of the last 40 days and goes short when price falls below the lowest low of the last 40 days. Breakout systems can be used on intraday price data, as well as daily or weekly data. The NCBS is an intraday breakout system based on five-minute bars. Because intraday price action can be very volatile, without some kind of filter the losses generated by the random price movement (that is, whipsaws) can completely overwhelm a trading system. To help eliminate
www.activetradermag.com October 2001 ACTIVE TRADER

47

Traders often use additional rules or filters to prevent being whipsawed by breakout trading strategies. Find out if using different filters for long and short trades improves the performance of an intraday breakout strategy.

WALK-FORWARD:
Proper system testing
hen testing any trading strategy, the important point is how well it will perform on data on which it has not been optimized that is, out-of-sample data. If a certain system is first tested on a sample piece of historical price data (say, daily bars from 1993 up to 1998), the systems performance results have no implication outside this sample data set; all you know is how well your system parameters performed during this particular period. To get an idea of how the system might actually perform, the system parameters used for the sample data should be applied to different out-of-sample price data (say, daily bars from 1998 to the present). This walk-forward process simulates the application of a system to future data, as would occur in actual trading. In short, without out-of-sample testing, its nothing more than hope to believe that system performance in the future will be anywhere near the optimized performance. For example, its possible to take a trading strategy with four independent variables, or parameters, and with hindsight, find the values for each of them that give the best (optimized) results on a specific historical period say, the last three years (using daily price data). However, these optimized parameter values have been, in essence, cherry-picked for this particular data period (a process known as curve-fitting), and are unlikely to perform as well on other historical test periods, or in actual trading in the future. An important (but unspoken) point in walk-forward testing is that if you cannot get good results in the out-ofsample data segments, real-time system performance will be random.

such random movement, the NCBS adds a noise filter, designated by the symbol f, to the basic channel breakout system. The three system parameters for the NCBS are: nhi, which is the number of bars in the lookback period used to determine the highest high price (hhp). nlo, which is the number of bars in the lookback period used to determine the lowest low price (llp). f, which is the amount price must exceed the hhp or llp to trigger a buy or sell.

The Noise Channel Breakout System 2


The Noise Channel Breakout System 2 (NCBS-2) uses different filter values (f, from the original system) for the long and short sides of the market. As a result, there are four system parameters for the NCBS-2: nhi, which is the number of bars in the lookback period used to determine the highest high price (hhp). nlo, which is the number of bars in the lookback period used to determine the lowest low price (llp).

ACTIVE TRADER October 2001 www.activetradermag.com

48

Think of the symbols xoU and xoD as the crossover Up and crossover Down values. The logic behind modifying the filter values is because market behavior associated with buys and sells is quite different, TABLE 1 OPTIMUM PARAMETER VALUES FOR TEST DATA the noise channels associated with buys and sells should be independent of each other. The NCBS-2 rules are: Buy rule: If price crosses above the highest high price of the Start date End date nhi xoU nlo xoD last nhi bars by an amount greater then or equal to xoU, then buy at the market. In addition, when short, and when calculat2/21/01 3/23/01 8 1 4 1 ing the highest high price (hhp), the hhp can only stay the same or go lower than its most recent value, it cannot go higher. 2/28/01 3/30/01 18 1.25 12 0.25 Sell rule: If price crosses below the lowest low price of last nlo days by an amount of greater than or equal to xoD, then sell at the market. In FIGURE 1A TEST PERIOD 1 addition, when long and when calculating the lowest low price (llp), the llp can Performance summary for NCBS-2, IBM five-min. bars, Feb. 21 to March 23. only stay the same or go higher than its Statistics based upon buying and selling 1,000 shares of IBM. most recent value, it cannot go lower. Exit rule: Close any position five minPerformance summary: All trades utes before the New York Stock Exchange Total net profit ($): 13,890 Open position P/L ($): 0 close (no trades are carried overnight).
Gross profit ($): 39,260 48 26 5,940 1,510 1.309 4 39 -8,470 1.547 Max. no. contracts held: 1 Gross loss ($): -25,370 54 22 -2,060 -1,153.18 289.38 3 21 Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max intraday drawdown ($): Profit factor: Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers:

xoU, which is the amount price must exceed the hhp to trigger a buy signal. xoD, which is the amount price must fall below the llp to trigger a sell signal.

Testing the strategy


As in last months article, walk-forward optimization will be used here. The same data will also be used so we can judge whether this new modification can improve performance. The walk-forward testing procedure was applied as follows: A four-week period from the start of the IBM five-minute bar data from Feb. 21 through March 23 was chosen and system parameter values were found through optimization on this intraday data segment. (Optimization refers to the search for the parameter values that give the best results.) It should be noted that in this stage of system development, the only thing indicated by the optimum values that are found in the test portion is that the data has been curve fitted as best it can with this system. Without further testing on out-of-sample data, there is no way to tell if the system will work in the future. The parameter values found were then applied to an out-of-sample period, in this case March 26 to March 30. This process was repeated by moving the test data window forward one week to Feb. 28 through March 30 and again finding the parameters values through optimization on this new data test window. The parameter values found were then applied to the next out-of-sample data set, which in this case was April 2 to April 6. See Walkforward: Proper system testing for addi-

FIGURE 1B TEST PERIOD 2 Performance summary for NCBS-2, IBM five-min. bars. Feb. 28 to March 30. Statistics based upon buying and selling 1,000 shares of IBM. Performance summary: All trades
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max. intraday drawdown ($): Profit factor: 9,640 34,460 38 20 5,350 1,723 1.25 3 48 -10,030 1.39 Max. no. contracts held: 1 Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -24,820 52.63 18 -3,400 -1,378.89 253.68 2 28

Source: TradeStation by TradeStation Group Inc.

44

www.activetradermag.com October 2001 ACTIVE TRADER

tional information on optimization and walk-forward testing. Of the four system parameters to find (nhi, nlo, xoU and xoD), the best parameters are defined as those values that give the best net profits and best total winning bars/total losing bars ratio with the minimum drawdown and minimum largest losing trades. In addition, the results should be stable e.g. the profits, wins and drawdowns should not change by much as the parameters move by a small amount away from their optimum values. Also, in choosing the best parameters, we considered only those parameter sets with maximum consecutive losses of four or less.

Improved performance?
The optimum parameters in Table 1 show the first test data section produced the same optimum parameters as the original NCBS. This can been seen by observing that both xoU and xoD are exactly the same and are equal to f of the original NCBS. The sample performance summaries in Figures 1a and 1b, and the out-of-sample performance summary of Figure 2a, show the out-of-sample performance was better than the test sample performance with respect to average winning and losing trades, drawdowns and profit factor. This improved performance in the out-of-sample section could have been due to

Results
Table 1 shows the optimum parameters for the IBM five-minute data series. The lookback periods refer to number of bars and the filters values are given as dollar amounts. Figures 1a and 1b) show the performance summary of the test windows using the optimum parameters shown in Table 1. Figure 2a shows the combined performance summary of the two out-ofsample data segments from March 26 to April 6 for NCBS-2. This performance represents what would have happened in real time if the parameters found in the test sections (Table 1) were used. Slippage and commissions are not included. For comparison, Figure 2b (bottom, right) shows the combined performance summary of the two out-ofsample data segments from March 26 to April 6 for the original NCBS. Figure 3 shows a specialized percentage trade-by-trade summary from March 26 to April 6. Note that the trades from March 26 to April 6 are the out-of-sample trades generated from the optimized parameters from the two test sections of Feb. 21 to March 23 and Feb. 28 to March 30. The in-sample trades are, by definition, curve-fit and are not of interest here. In addition, for comparison with Figure 3, Figure 4 contains the specialized trade-by-trade summary from the original NCBS for the same out-of-sample dates. Figure 5 is a five-minute chart of IBM with the NCBS-2 channels superimposed and some of the buy and sell signals from the Figure 3 trade-by trade summary indicated on the charts. (All the signals, as well as expanded performance statistics, can be found at www.activetradermag.com.) Also included at the bottom of the chart is the bar-by-bar profit or loss of each trade. FIGURE 2A TEST PERIOD 1 Combined walk-forward out-of-sample performance summary for NCBS-2, IBM five-min. bars, March 26 to April 6. Statistics based upon buying and selling 1,000 shares of IBM. Performance summary:
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max intraday drawdown ($): Profit factor: 8,650 15,390 15 7 4,000 2,198.57 2.61 2 57 -5,660 2.28 Max. no. contracts held: 1

All trades
Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -6,740 0.47 8 -1,730 -842.50 576.67 3 38

FIGURE 2B TEST PERIOD 2 Combined walk-forward out-of-sample performance summary for NCBS, IBM five-min. bars, March 26 to April 6. Statistics based upon buying and selling 1,000 shares of IBM. Performance summary:
Total net profit ($): Gross profit ($): Total no. of trades: Number winning trades: Largest winning trade ($): Average winning trade ($): Ratio avg. win/avg. loss: Max. consec. winners: Avg. no. bars in winners: Max. intraday drawdown ($): Profit factor: 8,390 14,460 16 8 4,000 1,807.50 2.382 5 54 -4,480 2.382 Max. no. contracts held: 1

All trades
Open position P/L ($): Gross loss ($): Percent profitable (%): Number losing trades: Largest losing trade ($): Average losing trade ($): Avg. trade(win & loss) ($): Max. consec. losers: Avg. no. bars in losers: 0 -6,070 50 8 -1,350 -758.75 524.375 3 37

Source: TradeStation by TradeStation Group Inc.

ACTIVE TRADER October 2001 www.activetradermag.com

50

FIGURE 3 OUT-OF-SAMPLE TRADE BY TRADE SUMMARY IBM five-min.; NCBS-2; Trade size = 1,000 shares; March 26 to April 6 Entry date Entry time Sell Buy Sell Buy Sell Buy Sell Sell Sell Buy Sell Buy Sell Buy Sell Entry price 93.75 95.59 97.92 96.05 94.90 96.70 96.20 96.45 93.33 92.99 92.55 95.68 97.30 98.75 97.02 Exit date 3/26/01 3/27/01 3/28/01 3/29/01 3/29/01 3/30/01 3/30/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01 Exit time 15:55 15:55 15:55 15:05 15:55 13:05 15:55 15:55 15:55 12:55 15:55 15:55 12:00 12:35 15:55 Exit Bars Trade price in trade $ P&L 94.52 99.59 94.50 94.90 94.88 96.20 96.25 94.50 90.50 92.55 91.85 98.15 98.75 97.02 97.67 67 68 75 60 10 41 34 60 75 24 36 75 28 7 40 (770) 4,000 3,420 (1,150) 20 (500) (50) 1,950 2,830 (440) 700 2,470 (1,450) (1,730) (650) Trade % P&L (0.82) 4.18 3.49 (1.20) 0.02 (0.52) (0.05) 2.02 3.03 (0.47) 0.76 2.58 (1.49) (1.75) (0.67) Trade Max $Pft 0 4,300 3,420 950 390 800 220 2,650 3,070 910 930 3,040 550 1,150 20 Time Trade Max $DD 0 (380) (500) (840) (670) (660) (520) (10) Time

3/26/01 10:20 3/27/01 10:15 3/28/01 9:40 3/29/01 10:05 3/29/01 15:05 3/30/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01 9:40 10:55 9:40 10:55 12:55 9:40 9:40 12:00 12:35 3/30/01 13:05

10:20 15:50 12:00 10:30 15:15 11:55 13:15 15:40 15:40 11:20 14:00 15:25 11:15 12:05 12:35

(1,620) 10:35 10:15 9:40 15:45 14:35 9:45 11:00 13:20 9:40

(1,160) 11:20 (1,190) 10:00 (1,250) 11:40

(1,450) 12:00 (1,730) 12:35 (2,240) 13:55 Average (948)

Total Average Average 8,650 0.61% 1,493


Source: Meyers Analytics

FIGURE 4 OUT-OF-SAMPLE TRADE BY TRADE SUMMARY IBM five-min.; NCBS; Trade size = 1,000 shares; March 26 to April 6 Entry date 3/26/01 3/27/01 3/28/01 3/29/01 3/29/01 3/30/01 3/30/01 4/2/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01 Entry time 10:20 Sell 10:15 Buy 9:40 Sell 10:05 Buy 15:05 Sell 9:40 9:40 Buy Buy 13:05 Sell 10:55 Sell 10:00 Sell 9:45 9:40 9:40 Buy Buy Sell 13:50 Sell Entry price 93.75 95.59 97.92 96.05 94.90 96.70 96.20 97.75 96.40 93.00 92.00 92.00 95.68 97.30 98.24 97.30 Exit date 3/26/01 3/27/01 3/28/01 3/29/01 3/29/01 3/30/01 3/30/01 4/2/01 4/2/01 4/3/01 4/4/01 4/4/01 4/5/01 4/6/01 4/6/01 4/6/01 Exit time 15:55 15:55 15:55 15:05 15:55 13:05 15:55 10:55 15:55 15:55 13:50 15:55 15:55 11:55 12:35 15:55 Exit Bars Trade price in trade $ P&L 94.52 99.59 94.50 94.90 94.88 96.20 96.25 96.40 94.50 90.50 92.00 91.85 98.15 98.24 97.30 97.67 67 68 75 60 10 41 34 15 60 71 49 25 75 27 8 40 (770) 4,000 3,420 20 (500) (50) (1,350) 1,900 2,500 0 150 2,470 (940) (940) (370) Trade % P&L (0.82) 4.18 3.49 0.02 (0.52) -0.05) -1.38) 1.97 2.69 0.00 0.16 2.58 (0.97) (0.96) (0.38) Trade Max $Pft 0 4,300 3,420 950 390 800 220 350 2,600 2,740 1,900 380 3,040 550 1,660 300 Time Trade Max $DD 0 (380) (500) (840) Time

10:20 15:50 12:00 10:30 15:15 11:55 13:15 10:05 15:40 15:40 11:20 14:00 15:25 11:15 12:05 12:35

(1,620) 10:35 10:15 9:40 15:45 14:35

(1,150) (1.20)

(1,160) 11:20 (1,190) 10:00 (1,350) 10:55 (1,300) 11:40 0 (500) (10) (940) (940) Average (911) 10:00 14:20 9:40 11:55 12:35 (1,890) 10:30

11:55 Buy 12:35 Sell

(1,960) 13:55

Total Average Average 8,390 0.55% 1,475


Source: Meyers Analytics 51

www.activetradermag.com October 2001 ACTIVE TRADER

FIGURE 5 NCBS-2 SIGNALS Trade signals for the NCBS-2 are shown on a five-minute chart of IBM. The blue and red lines are the long and short filter levels, respectively.
International Business Machine (IBM), five-minute 0
100

101

-1

99

98

97

96

-1 1 0 0

95

94

93

4,000 2,500 1,000 500

9:55 10:50 11:45 12:40 1:35 2:30

3/27 10:50 11:45 12:40 1:35 2:30

3/28 10:50 11:45 12:40 1:35 2:30

chance but does indicate that four weeks of test data were enough to capture the intraday price dynamics of IBM. The performance summaries in Figures 2a and 2b show there is very little difference between the NCBS and NCBS-2. The less-complicated NCBS, while having a slightly lower net profit and average win/average loss ratio, has a smaller drawdown and a smaller largest losing trade. Comparison of Figures 2a and 2b favors the simpler NCBS. The out-of-sample trade-by-trade summary of Figure 3 shows the system did better on short trades than on long trades. This could indicate a negative bias for the system, or perhaps, given the current bear market, this could be normal. Whatever the reason, this bias warrants further investigation. There were no big winners or big losers, indicating steady returns. Average wins were 2.6 times average losses in the out-ofsample section. Average trade run-ups were $1,493, average trade drawdowns were -$948 and the average trade net profit was $576. Its also instructive to compare Figure 3 with Figure 4 to
ACTIVE TRADER October 2001 www.activetradermag.com

determine if the more complicated NCBS-2 offers any advantage in the trade-by-trade figures. There seems to be little advantage: Both systems totals and averages are nearly the same. The NCBS-2 had one less trade and slightly better numbers. However, the difference wasnt enough to claim any superiority or to justify the added complication of another optimization parameter. The NCBS-2 did very well in catching every major intraday trend of IBM. The charts show the system constraint of not carrying positions overnight eliminated many negative opening surprises. Overall, the system did a good job in minimizing the losses resulting from the inevitable whipsaws that will occur in any trading system and maximizing the profits from the major intraday trend moves of IBM. To use NCBS-2 in real time trading, the results from at least 10 to 20 more tests and out-of-sample periods would have to be examined to make sure that the results above were not due to pure chance.
52

ADVANCED Strategies

The multibar range BREAKOUT SYSTEM


Breakouts of price channels can be profitable if the volatility is there and youre on the right side of the trade. This stop-and-reverse system tries to capture intraday trends in the S&P E-Mini contract by recognizing differences in the characteristics of up moves and down moves.

BY DENNIS MEYERS, PH.D.


FIGURE 1 TRADESTATION CODE FOR THE MULTIBAR RANGE BREAKOUT SYSTEM {Strategy: #MultiBarRangeBO} Input: n(45),bx(0.45),m(15),sx(0.45),XTime(1515); vars: hhv1(h),llv1(l),hhv2(h),llv2(l),ii(0),xb(c),xs(c); hhv1=h; llv1=l; for ii=1 to n-1 begin if h[ii]>hhv1 then hhv1=h[ii]; if l[ii]<llv1 then llv1=l[ii]; end; value1=hhv1-llv1; hhv2=h; llv2=l; for ii=1 to m-1 begin if h[ii]>hhv2 then hhv2=h[ii]; if l[ii]<llv2 then llv2=l[ii]; end; value2=hhv2-llv2; xb= c + (Value1 * bx); xs= c - (Value2 * sx); if time<XTime then begin if marketposition<=0 then Buy Next Bar xb stop; if marketposition>=0 then Sell Short Next Bar xs stop; end; if XTime<>0 then SetExitOnClose;

reakout systems are popular when markets are volatile. Such systems typically identify support and resistance levels when price has been moving in a range or channel, and enter trades when price breaks out of either the up side or down side of a channel. There are two simple ways to define support and resistance levels for price channels. In both cases, it is first necessary to define a lookback period. The first way is to use the highest high and the lowest low of the lookback period. The second way is to determine the range of each bar (high minus low) and add that range (or a percentage of it) to, or subtract it from, the current close. In either case, the upper and lower boundaries represent the price channel. One advantage to the second method is it better reflects the volatility of the market it will expand and contract as the volatility changes. Breakout strategies require the market to be in a high-volatility period; a trade will become profitable only if it continues to move in the direction of the breakout. Volatility and emotion go hand in hand. As volatility increases, traders have to cope with more risk; hence, the more emotional the market becomes. This is often reflected by the fact markets fall faster than they rise. In the following system, the channel is determined by using the range of the price bars in the lookback period. A breakout above or below the channels resistance or support creates buy or sell signals.
www.activetradermag.com January 2004 ACTIVE TRADER

53

However, the parameters for the buy signals will be different than those for the sell signals, because of the propensity for markets to fall faster than they rise. The range for the last x bars will be defined as the highest high of the last x bars (including the current bar) minus the lowest low of the last x bars (including the current bar). The buy price is determined by adding a percentage of the range of the last n bars to the current close the previously described volatility-adjusted technique. If the next bars price exceeds the buy price, the system issues a buy signal. The sell price is determined by subtracting a percentage (a different percentage than the buy percentage) of the range of the last m bars from the current close. If the next bars price falls below the sell price, the system issues a sell signal. The resulting Multibar Channel Breakout system will trade the S&P 500 E-Mini futures on an intraday basis using one-minute bars. The TradeStation Code is shown in Figure 1 (opposite page).

TABLE 1 MULTIBAR RANGE BREAKOUT SYSTEM PERFORMANCE SUMMARY, JULY 7 TO AUG. 1, 2003 The system triggered more short trades during the test, but produced profits on long trades, as well. All trades Total net profit Gross profit Gross loss Profit factor Open position P/L Total number of trades Percent profitable Winning trades Losing trades Even trades $4,912.50 $6,637.50 ($1,725.00) 3.85 $0.00 55 58.18% 32 22 1 $89.32 $207.42 ($78.41) 2.65 $700.00 ($300.00) 10.55% 17.39% 1,637.50% 5 5 134.96 166.88 91.95 ($887.50) ($300.00) ($475.00) Long trades $1,450.00 $1,912.50 ($462.50) 4.14 $0.00 20 55.00% 11 9 0 $72.50 $173.86 ($51.39) 3.38 $362.50 ($125.00) 18.95% 27.03% 1,160.00% 5 2 45.8 69.18 17.22 ($862.50) ($175.00) ($475.00) Short trades $3,462.50 $4,725.00 ($1,262.50) 3.74 $0.00 35 60.00% 21 13 1 $98.93 $225.00 ($97.12) 2.32 $700.00 ($300.00) 14.81% 23.76% 1,154.17% 4 3 185.91 218.05 143.69 ($975.00) ($400.00) ($362.50)

Multibar Channel Breakout rules


This is a stop-and-reverse system, meaning it is always in the market: When a sell signal occurs, long trades are exited and a short trade is entered; when a buy signal occurs, short trades are exited and a long trade is entered. These are the systems parameters: ES = E-Mini price; BRange = the price range over the last n bars; SRange = the price range over the last m bars; bx = the percentage multiplier of the BRange for buy signals; sx = the percentage multiplier of the SRange for sell signals; c = the current price; buyCh = c + bx*BRange; sellCh = c - sx*SRange where n = The number of lookback bars (including the current bar) for buy signals. m = The number of lookback bars (including the current bar) for sell signals. Notice that not only are the percentage multipliers for long (bx) and short trades (sx) different, the lookback periods the system references for buys (n) and sells (m) are also different. The trade rules are simple: 1. Buy rule: Buy the next bar at buyCh, stop. 2. Sell rule: Sell the next bar at sellCh, stop. 3. Intraday bar exit rule: Exit the position on the close (no overnight trades). Although it may not be immediately obvious, this system avoids the opening gap whipsaw problem trades being triggered because of large gap openings
ACTIVE TRADER January 2004 www.activetradermag.com

Avg. trade net profit Avg. winning trade Avg. losing trade Ratio avg. winning/ avg. losing Largest winning trade Largest losing trade Largest winner as % of gross profit Largest loser as % of gross loss Net profit as % of largest loss Max. consecutive winning trades Max. consecutive losing trades Avg. bars in total trades Avg. bars in winning trades Avg. bars in losing trades Max. drawdown (intraday peak to valley) Max. drawdown (trade close to trade close) Max. trade drawdown
Source: TradeStation

54

TABLE 2 TRADE-BY-TRADE SUMMARY: JULY 7 TO AUG. 1, 2003 This list contains each trade in the test period. Overall, 58.18 percent of trades were profitable.
Entry date 7/7/03 7/7/03 7/7/03 7/7/03 7/7/03 7/8/03 7/8/03 7/9/03 7/10/03 7/11/03 7/14/03 7/15/03 7/16/03 7/16/03 7/16/03 7/17/03 7/17/03 7/17/03 7/18/03 7/18/03 7/18/03 7/18/03 7/18/03 7/21/03 7/22/03 7/22/03 7/22/03 7/22/03 7/23/03 7/23/03 7/23/03 7/23/03 7/24/03 7/24/03 7/24/03 7/25/03 7/25/03 7/25/03 7/25/03 7/28/03 7/28/03 7/28/03 7/29/03 7/29/03 7/29/03 7/30/03 7/30/03 7/30/03 7/30/03 7/30/03 7/31/03 7/31/03 7/31/03 7/31/03 8/1/03 Entry time 10:36 Sell 12:35 Buy 12:52 Sell 13:01 Buy 13:24 Sell 9:51 Sell 14:09 Buy 9:33 Sell 8:58 Sell 9:05 Sell 9:54 Sell 9:05 Sell 8:48 Sell 12:10 Buy 12:22 Sell 9:04 Sell 11:01 Buy 11:02 Sell 8:49 Sell 11:27 Buy 12:02 Sell 13:01 Buy 14:35 Sell 8:32 Sell 9:20 Sell 10:01 Buy 11:37 Sell 14:37 Buy 8:35 Sell 12:51 Buy 13:38 Sell 14:27 Buy 9:21 Sell 12:45 Buy 13:10 Sell 8:43 Buy 9:01 Sell 13:01 Buy 15:08 Sell 8:33 Sell 12:37 Buy 12:57 Sell 9:01 Sell 10:34 Buy 11:28 Sell 8:34 Sell 11:38 Buy 11:56 Sell 13:02 Buy 13:04 Sell 9:00 Buy 11:20 Sell 13:07 Buy 13:22 Sell 8:46 Sell Entry price ($) 1,003.75 1,002.50 1,001.50 1,002.75 1,002.50 1,002.00 1,004.25 1,007.75 992.50 993.25 1,012.25 1,002.75 1,000.50 993.25 992.25 988.25 986.25 983.75 986.00 985.25 985.50 985.50 991.50 988.00 976.75 978.50 985.75 987.25 986.25 984.75 986.50 986.75 995.50 993.75 994.25 982.50 983.25 989.25 996.00 995.50 996.50 996.25 991.25 986.75 992.00 990.00 989.25 988.00 988.75 987.00 995.75 1,001.25 1,003.00 1,002.25 983.50 Exit date 7/7/03 7/7/03 7/7/03 7/7/03 7/7/03 7/8/03 7/8/03 7/9/03 7/10/03 7/11/03 7/14/03 7/15/03 7/16/03 7/16/03 7/16/03 7/17/03 7/17/03 7/17/03 7/18/03 7/18/03 7/18/03 7/18/03 7/18/03 7/21/03 7/22/03 7/22/03 7/22/03 7/22/03 7/23/03 7/23/03 7/23/03 7/23/03 7/24/03 7/24/03 7/24/03 7/25/03 7/25/03 7/25/03 7/25/03 7/28/03 7/28/03 7/28/03 7/29/03 7/29/03 7/29/03 7/30/03 7/30/03 7/30/03 7/30/03 7/30/03 7/31/03 7/31/03 7/31/03 7/31/03 8/1/03 Exit time 12:35 12:52 13:01 13:24 15:15 14:09 15:15 15:15 15:15 15:15 15:15 15:15 12:10 12:22 15:15 11:01 11:02 15:15 11:27 12:02 13:01 14:35 15:15 15:15 10:01 11:37 14:37 15:15 12:51 13:38 14:27 15:15 12:45 13:10 15:15 9:01 13:01 15:08 15:15 12:37 12:57 15:15 10:34 11:28 15:15 11:38 11:56 13:02 13:04 15:15 11:20 13:07 13:22 15:15 15:15 Exit Bars price ($) in trade 1,002.50 119 1,001.50 17 1,002.75 9 1,002.50 23 1,002.75 111 1,004.25 258 1,007.50 66 1,001.00 342 988.75 377 997.75 370 1,002.75 317 1,000.75 370 993.25 202 992.25 12 995.25 173 986.25 117 983.75 1 980.50 253 985.25 158 985.50 35 985.50 59 991.50 94 990.00 40 978.25 403 978.50 41 985.75 96 987.25 180 986.75 38 984.75 256 986.50 47 986.75 49 987.75 48 993.75 204 994.25 25 980.25 125 983.25 18 989.25 240 996.00 127 997.00 7 996.50 244 996.25 20 993.50 138 986.75 93 992.00 54 989.00 227 989.25 184 988.00 18 988.75 66 987.00 2 986.25 131 1,001.25 140 1,003.00 107 1,002.25 15 988.50 113 979.50 389 Trade $P&L $62.50 ($50.00) ($62.50) ($12.50) ($12.50) ($112.50) $162.50 $337.50 $187.50 ($225.00) $475.00 $100.00 $362.50 ($50.00) ($150.00) $100.00 ($125.00) $162.50 $37.50 $12.50 $0.00 $300.00 $75.00 $487.50 ($87.50) $362.50 ($75.00) ($25.00) $75.00 $87.50 ($12.50) $50.00 $87.50 $25.00 $700.00 $37.50 ($300.00) $337.50 ($50.00) ($50.00) ($12.50) $137.50 $225.00 $262.50 $150.00 $37.50 ($62.50) ($37.50) ($87.50) $37.50 $275.00 ($87.50) ($37.50) $687.50 $200.00 Trade max$Pft $175.00 $0.00 $25.00 $37.50 $87.50 $62.50 $187.50 $525.00 $512.50 $62.50 $575.00 $362.50 $625.00 $0.00 $187.50 $275.00 $0.00 $337.50 $287.50 $62.50 $50.00 $375.00 $75.00 $700.00 $112.50 $500.00 $237.50 $25.00 $412.50 $187.50 $100.00 $62.50 $162.50 $62.50 $762.50 $150.00 $375.00 $412.50 $0.00 $175.00 $100.00 $187.50 $450.00 $450.00 $300.00 $275.00 $0.00 $62.50 $0.00 $125.00 $387.50 $37.50 $12.50 $725.00 $300.00 Time 12:06 12:35 12:55 13:23 14:22 11:21 14:48 11:03 13:48 9:08 14:46 14:05 10:12 12:10 14:30 9:39 11:01 14:01 9:20 11:31 12:19 14:11 14:53 14:10 9:50 11:10 12:37 14:38 11:16 13:35 14:14 15:13 9:50 12:57 14:57 9:00 9:52 14:54 15:08 8:52 12:55 14:42 9:34 10:58 14:17 10:32 11:38 12:19 13:02 13:14 10:14 11:40 13:19 14:56 9:35 Trade max$DD ($12.50) ($50.00) ($62.50) ($25.00) ($112.50) ($175.00) ($62.50) $0.00 ($62.50) ($337.50) ($112.50) ($275.00) $0.00 ($50.00) ($150.00) $0.00 ($125.00) ($25.00) ($25.00) ($12.50) ($25.00) $0.00 ($87.50) ($12.50) ($87.50) ($75.00) ($150.00) ($87.50) $0.00 ($37.50) ($50.00) ($62.50) ($50.00) $0.00 ($25.00) ($37.50) ($337.50) ($87.50) ($62.50) ($187.50) ($12.50) ($87.50) $0.00 ($12.50) ($250.00) ($37.50) ($62.50) ($50.00) ($87.50) ($25.00) ($400.00) ($112.50) ($50.00) ($12.50) ($125.00) Time 10:36 12:38 13:01 13:08 13:47 10:19 14:11 9:33 9:04 11:23 10:01 9:46 8:48 12:18 15:10 9:04 11:02 11:06 9:02 11:27 12:03 13:01 14:41 8:32 10:01 10:18 14:02 14:49 8:35 12:55 13:39 14:35 10:27 12:45 13:11 8:45 12:33 13:25 15:12 10:29 12:37 14:04 9:01 10:34 12:33 9:56 11:52 12:01 13:04 14:21 9:08 12:14 13:16 13:22 8:51

Source: Meyers Analytics, LLC

55

www.activetradermag.com January 2004 ACTIVE TRADER

FIGURE 2 RIDING THE TREND During this period, the system caught one intraday uptrend, one intraday downtrend, and produced small losses on two signals when the market was flat.
September 2003 S&P E-Mini futures (ESU03), one-minute 1,010 Short Short

1,005

Buy

1,000

995

990 Buy End of day exit End of day exit Short 985

980 600 400 200 0 -200

7/30

9:11

9:33

9:55

10:17 10:39 11:01 11:23 11:45 12:07 12:29 12:51 13:13 13:35 13:57 14:19 14:41

8/1

Source: TradeStation

that quickly reverse and stop out the position. With this system, if there is a gap on the opening bar, the buy and sell ranges are expanded and no trades are made until the buy and sell ranges contract or the price breaks the expanded ranges. Breaking the expanded ranges takes time and avoids the opening gap whipsaw.

difficult to sustain more than a handful of consecutive losses, we eliminated all cases that had more than five losing trades in a row. Of the remaining test results, we chose the one that had the highest total net profit and the lowest drawdown. The optimization procedure produced the following system parameters: n = 45; bx = 0.45; m = 15; sx = 0.45; Table 1 (p. 43) shows the performance summary for the fourweek test period (slippage and commissions not included). Table 2 (opposite page) is a trade-by-trade summary of all the trades. The average net profit per trade was $89 well above slippage and commissions for a typical S&P E-Mini trade. The largest losing trade was $300, and the biggest intraday drawdown was $887. These losses are small compared to the total net profit of $4,912. Figures 2 and 3 are one-minute charts of the S&P E-Mini that span July 31 to Aug. 1. The Multibar Range Breakout channels are superimposed on the price series, and all the buy and sell signals are marked. Finally, the bottoms of Figures 2 and 3
56

Testing
The system was tested from July 7 through Aug. 1, 2003, using September 2003 E-Mini futures (ESU03) one-minute bars. A wide range of parameter values was tested to find the optimal ones for the system. The parameter ranges tested for the initial optimization test were: n =10 to 50 in steps of 5; bx = 0.4 to 1 in steps of 0.05; m = 10 to 50 in steps of 5; sx = 0.4 to 1 in steps of 0.05; After the initial test, we had to choose one set of parameters that produced the most realistic results. To avoid curve fitting, we eliminated all results that had profit factors (gross profit divided by gross loss) greater than 4.0, since such performance was unlikely to be duplicated in the future. Also, because it is
ACTIVE TRADER January 2004 www.activetradermag.com

FIGURE 3 ONE DAY, ONE TRADE If no signal in the opposite direction is triggered, the system will stay in the same direction the entire day. All trades are exited at the close no positions are held overnight.
September 2003 S&P E-Mini futures (ESU03), one-minute 1,002 1,000 998 996 994 992 990 Sell End of day exit 988 986 984 982 980 978 End of 976 day exit 600 400 200 0 14:19 14:41 8/1 9:02 9:24 9:46 10:08 10:30 10:52 11:14 11:36 11:58 12:20 12:42 13:04 13:26 13:48 14:10 14:32 14:54

Source: TradeStation

include the bar-by-bar profit or loss of each trade. Figure 4 is a daily chart of the S&P EMini futures from July 7 to Aug. 1, and shows the market moved up, down and sideways during this period. The system was able to produce profits on both the long and short sides of the market, and aside from a streak of five losing trades near the outset of the test period, never had more than three consecutive losses. The Multibar Channel Breakout systems positive performance warrants further investigation. If you consider following this system in real-time, pay close attention to how the real-time statistics compare to the hypothetical numbers shown here. If the numbers begin to deviate, another review of the system parameters are in order. Individual articles can be purchased and downloaded from www.activetradermag.com/ purchase_articles.htm.

FIGURE 4 DAILY PERSPECTIVES The daily chart of the test period shows the system was able to profit on both sides of the market when conditions shifted from uptrend to downtrend to consolidation.
September 2003 S&P E-Mini futures (ESU03), daily 1,015 1.010 1,005 1,000 995 990 985 980 975 7 Source: TradeStation 14 21 28

57

www.activetradermag.com January 2004 ACTIVE TRADER

The TRADING Systems Lab


EQUITY CURVE

DeMark variation
Markets: Stocks, stock index futures, index stocks
(SPDRs, DIAs, QQQs), futures and currencies

600,000

500,000

System logic:

Sell

This system is based on a simple pattern, named TD 300,000 Carrie, described by Tom DeMark in his book New Market Timing Techniques (John Wiley & Sons, 1997). It trades a move above or below the true high (the 200,000 highest of one bars high and the previous bars close) or the true low (the lowest of one bars low and the previous bars close) of the bar four days 100,000 prior to the current (active) bar. However, for the breakout to be valid it must be qualified by a few criteria. (The following rules are described in terms of 0 11/12/91 11/12/92 11/12/93 11/12/94 11/12/95 11/12/96 11/12/97 11/12/98 11/12/99 11/12/00 a long trade; reverse for short trades.) First, to identify a strongly trending market, the true high of four days ago must be higher than the high five days ago. requiring the breakout to take place intraday, we enter into an If this requirement is not met, its still possible to get an entry signal if orderly market instead of a highly volatile one. the market has made a correction counter to the direction of an eventual trade (i.e., a downward correction in the case of a long trade). In Rules: an uptrend this correction is identified by the highs of either two or 1. Prepare to go long today if a. the true high from four days ago is higher than the high from three days ago being lower than the true high of four days ago. either two, three or five days ago, and Second, the close of the bar prior to the anticipated breakout b. yesterdays close is lower than the close two days ago, and needs to be lower then the previous bars close. This is to ensure that c. todays open is lower than the high four days ago. most traders still have a short-term bearish outlook prior to the upside breakout. That will increase the force of the up move as the 2. Prepare to go short today if a. the true low from four days ago is lower than the low from traders are caught on the wrong side of the market and scramble to either two, three or five days ago, and get out of the market. b. yesterdays close is higher than the close two days ago, and Finally, the breakout must take place intraday and exceed the true c. todays open is higher than the low four days ago high of four days ago by a sufficient amount. That the trade needs to take place intraday means, for a valid upside breakout, the open- 3. Go long today with a stop order at the true high of four days ing price of the day for the breakout must be lower than the true ago, plus 0.1 percent. high of four days ago. This is to avoid entering into too strong an 4. Go short today with a stop order at the true low of four days opening, which often marks the end of the current trend. Also, by ago, minus 0.1 percent. 5. Risk 2 percent of available equity per trade. 6. Exit all trades with a loss if the market moves SAMPLE TRADES against the position by 4 percent or more. 7. Exit all trades with a profit if the market Amgen (AMGN), daily 71.00 Sell moves in favor of the position by 12 percent or LX#3 LX 69.00 more. 8. Exit all trades after five days, counting the Buy 67.00 day for the entry as day one, and no matter how late in the day the trade was made (i.e., a trade 65.00 LX#3 executed at 2:50 p.m. on Monday would be exitLX#3 Buy ed Friday the same week). 63.00
62.00
Sell Buy

Account balance ($)

400,000

60.00 58.00

Test period: November 1991 to June 2001 Test data: Daily stock prices for the 30 highest capitalized stocks in the Nasdaq 100 (excluding Intel and Microsoft, which are also part of the Dow Jones Industrial Average). $10 commission deducted per trade. Starting equity: $100,000 (nominal) Buy-and-hold stats:
DJIA: Total return 254 percent; Max DD 22.5

SX Buy SX#3

Buy

56.00 55.00 53.00 51.00

2 9 16 23 30 April May Source: TradeStation by TradeStation Group Inc.

14

21

28

4 June

11

58

www.activetradermag.com September 2001 ACTIVE TRADER

DRAWDOWN CURVE
11/12/91 0.00% -5.00% -10.00% -15.00% -20.00% -25.00% -30.00% -35.00% -40.00% 11/12/92 11/12/93 11/12/94 11/12/95 11/12/96 11/12/97 11/12/98 11/12/99 11/12/00

percent (current); Longest flat 18 months (current). S&P 500: Total return 216 percent; Max DD 30.4 percent (current); Longest flat 15 months (current). Nasdaq: Total return 519 percent; Max DD 72 percent (current); Longest flat 15 months (current).

go with the entry strategies. We therefore arbitrarily attached a 4-percent stop-loss and a 12-percent profit-exit target, plus a time-based stop that exits all trades after five days, no matter what. (All these stops are completely un-optimized, which means a little optimization should increase performance considerably.) Also, note the system operates with no trend filter, such as a long-term moving average. Such filters, which allow only those trades that are in the direction of the underlying trend, also improve performance. Finally, note that many of the stocks traded in this example werent tradable until a few years ago, which explains the initial large drawdown and exceptionally long flat period. Had we been able to test the same 30 stocks throughout the entire period, its highly likely performance would have improved considerably.

ROLLING TIME WINDOW RETURN ANALYSIS


Cumulative Most recent: Average: Best: Worst: St. dev.: Annualized Most recent: Average: Best: Worst: St. dev: 12 months 24 months 36 months 48 months 60 months

System analysis
In DeMarks original work, the amount by which the price had to clear the breakout level was set to the smallest price increment for the market in question. In this version, this is changed to one-tenth of a percent to make the system consistent across all markets. This means that for a stock that trades around $50, this amount is about five cents; for a stock that trades around $100, it comes out to approximately 10 cents. DeMark did not suggest any exit strategies or stop-loss levels to

4.27% 21.73% 87.23% -26.11% 29.26%


12 months

34.67% 81.32% 157.51% 59.85% 115.57% 185.15% 206.04% 294.97% 393.04% -25.61% -21.38% -15.55% 61.15% 95.27% 125.03%
24 months 36 48 months months

336.03% 254.23% 494.23% 12.15% 137.24%


60 months

STRATEGY SUMMARY
Profitability End. equity ($): 415,573 Total return (%): 316 Avg. annual ret. (%): 16.03 Profit factor: 1.13 Avg. tied cap (%): 58 Win. months (%): 53 Drawdown Max DD (%): Longest flat (m): Trade statistics No. trades: 3,529 Avg. trade ($): 158 Avg. DIT: 3.0 Avg. win/loss ($): 1,150 (1,393) Lrg. win/loss ($): 12,674 (8,131) Win. trades (%): 39.4 TIM (%): Tr./Mark./Year: Tr./Month: 97 /15.1 12.3 30.7

4.27% 16.05% 21.73% 26.43% 87.23% 74.94% -26.11% -13.75% 28.26% 26.94%

21.94% 29.18% 58.07% -7.70% 24.99%

26.68% 29.95% 49.01% -4.14% 22.48%

34.25% 28.78% 42.82% 2.32% 18.86%

LEGEND: Cumulative returns Most recent: most recent return from start to end of the respective periods Average: the average of all cumulative returns from start to end of the respective periods Best: the best of all cumulative returns from start to end of the respective periods Worst: the worst of all cumulative returns from start to end of the respective periods St. dev: the standard deviation of all cumulative returns from start to end of the respective periods Annualized returns The ending equity as a result of the cumulative returns, raised by 1/n, where n is the respective period in number of years

37.5 57.2

Send Active Trader your systems


If you have a trading system or idea youd like to see tested, send it to us at the Trading System Lab. Well test it on a portfolio of stocks or futures (for now, maximum 30 markets, using daily data starting Jan. 1, 1990), using true portfolio analysis/optimization. Most system-testing software only allows you to test one market at a time. Our system-testing technique lets all markets share the same account and is based on the interaction within the portfolio as a whole. Start by e-mailing system logic (in TradeStations EasyLanguage or in an Excel spreadsheet) and a short description to editorial@activetradermag.com, and well get back to you. Note: Each system must have a clearly defined stop-loss level and a suggested optimal amount to risk per trade.

LEGEND: End. equity ($) equity at the end of test period Total return (%) total percentage return over test period Avg. annual ret. (%) average continuously compounded annual return Profit factor gross profit/gross loss Avg. tied cap (%) average percent of total available capital tied up in open positions Win. months (%) percentage profitable months over test period Max DD (%) maximum drop in equity Longest flat longest period, in months, spent between two equity highs No. trades number of trades Avg. trade ($) amount won or lost by the average trade Avg. DIT average days in trade Avg. win/loss ($) average wining and losing trade, respectively Lrg. win/loss ($) largest wining and losing trade, respectively Win. trades (%) percent winning trades TIM (%) amount of time there is at least one open position for entire portfolio, and each market, respectively Tr./Mark./Year trades per market per year Tr./Month trades per month for all markets

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER September 2001 www.activetradermag.com

59

EQUITY CURVE

Dynamic breakout system


Account balance ($)

$300,000

$250,000

Markets: Any market with a propensity to trend.

$200,000

$150,000

System logic: This system enters a long (short) trade if the last closing price is above (below) the $100,000 highest high (lowest low) of the lookback period. The word dynamic refers to the fact that $50,000 the lookback period will change based on the volatility of the market. This is similar to the system tested in the $0 3/26/93 January Trading System Lab (p. 50), when Bollinger Bands were used to trigger trades. Since the Bollinger Bands moved farther away from price as the volatility of the market increased, the higher the volatility, the more difficult it was to enter and exit trades. This months system functions in a related manner. The higher the volatility, the longer the lookback period will be. Because buys and sells will be based on price making a new high or low for the lookback period, the longer the lookback period, the more difficult it will be to enter or exit a trade. In this case, the lookback period can range from 20 to 60 days and will change daily depending on the level of volatility. (Volatility reading is the daily standard deviation of the closing price over the last 30 days.) You can read more about the logic of the system in the Futures System Lab (p. 70), where we have tested it on 15 different commodity futures markets. Rules: 1. Go long on the open if yesterdays close is higher than the highest high of the lookback period. 2. Exit by reversing the position. Reverse the rules for short trades. Money management: 1. Risk 2 percent of available equity per market traded. 2. The number of shares to trade was calculated with the following formula: ST = AC * PR / Dist where ST = Shares to trade AC = Available capital PR = Percent risked Dist = Distance between the entry price and the exit price on the day of entry. Test period: April 1993 to October 2002.
May June Source: Omega Research ProSuite

3/26/94

3/26/95

3/26/96

3/26/97

3/26/98

3/26/99

3/26/00

3/26/01

3/26/02

Test data: Daily prices for 30 of the most widely traded Nasdaq 100 stocks. $10 per trade deducted for slippage and commission. Starting equity: $100,000 (nominal). Buy-and-hold stats: Total Index return DJIA S&P 500 Nasdaq 146% 100% 180%

Maximum drawdown 39% (current) 51% (current) 83% (current)

Longest flat period 33 months (current) 30 months (current) 30 months (current)

Test results: Although the system has fared no better than buy-and-hold over the life of the test period, it has fared much SAMPLE TRADES
Cisco (CSCO), daily
Buy Sell Buy 14.00 13.00 12.00 17.00 16.00 15.00

Sell

11.00

10.00

9.00

July

August

September

October

60

www.activetradermag.com February 2003 ACTIVE TRADER

DRAWDOWN CURVE
3/26/93 0% -5% -10% -15% -20% -25% -30% -35% -40% -45% -50% 3/26/94 3/26/95 3/26/96 3/26/97 3/26/98 3/26/99 3/26/00 3/26/01 3/26/02

maximum open profit of each trade. Overall, this would translate into more profitable months, a smoother equity curve and a higher average annual return. Another way to improve this system could be to use different lookback periods for long and short trades. Most likely, the lookback period for the short side would be shorter than that for the long side. As with all systems tested in the Trading Systems Lab, this one is totally unoptimized. As a result, you should be able to increase profits considerably by experimenting with different settings for the indicators and adding a few ideas of your own. ROLLING TIME WINDOW RETURN ANALYSIS
Cumulative Most recent: Average: Best: Worst: St. dev.: Annualized Most recent: Average: Best: 12 months 8.69% 8.77% -27.93% 27.06% 12 months 8.69% 8.77% 104.96% -27.93% 27.06% 24 months -19.18% 20.27% -38.42% 30.46% 24 months -10.10% 9.67% 43.54% -21.53% 14.22% 36 months 15.28% 34.69% -14.94% 28.77% 48 months 63.22% 46.45% 5.25% 33.48% 60 months 26.23% 58.78% 4.40% 40.51% 60 months 4.77% 9.69% 23.42% 0.86% 7.04%

better than a Nasdaq 100 buy-and-hold strategy over the last 30 months (a 43 percent drawdown compared to the Nasdaqs 83 percent). It is quite difficult to succeed over the long term with a system that sells short because of the inherent upside bias of the stock market, and the high volatility associated with bear markets. For this system, the high volatility makes it difficult to enter potential winning short trades and exit losing trades. The best way to improve the results for this system would probably be to reverse the logic for the exit so that it would be easier to exit during times of high volatility. This would most likely result in more and smaller losing trades, but also in larger winning trades because the system would exit closer to the STRATEGY SUMMARY
Profitability End. equity ($): 164,849 Total return (%): 65 Avg. annual ret. (%): 5.36 Profit factor: 1.15 Avg. tied cap (%): 74 Win. months (%): 50 Drawdown Max. DD (%): Longest flat (m):
43.1 31.3

104.96% 106.03% 131.24% 148.03% 186.41%

36 48 months months 4.85% 10.44% 32.24% -5.25% 8.79% 13.03% 10.01% 25.49% 1.29% 7.49%

Trade statistics
No. trades: Avg. trade ($): Avg. DIT: Avg. win/loss ($): 1,053 Win. trades (%): 1,133 57 63.3 (435) 34.1

Worst: St. dev.:

Lrg. win/loss ($): 37,484 (2,209)

TIM (%):
Tr./Mark./Year: Tr./Month:

100

92.8 3.9 9.9

LEGEND: Cumulative returns Most recent: most recent return from start to end of the respective periods Average: the average of all cumulative returns from start to end of the respective periods Best: the best of all cumulative returns from start to end of the respective periods Worst: the worst of all cumulative returns from start to end of the respective periods St. dev.: the standard deviation of all cumulative returns from start to end of the respective periods Annualized returns The ending equity as a result of the cumulative returns, raised by 1/n, where n is the respective period in number of years

Send Active Trader your systems


LEGEND: End. equity ($) equity at the end of test period Total return (%) total percentage return over test period Avg. annual ret. (%) average continuously compounded annual return Profit factor gross profit/gross loss Avg. tied cap (%) average percent of total available capital tied up in open positions Win. months (%) percentage profitable months over test period Max. DD (%) maximum drop in equity Longest flat longest period, in months, spent between two equity highs No. trades number of trades Avg. trade ($) amount won or lost by the average trade Avg. DIT average days in trade Avg. win/loss ($) average winning and losing trade, respectively Lrg. win/loss ($) largest winning and losing trade, respectively Win. trades (%) percent winning trades TIM (%) amount of time there is at least one open position for entire portfolio, and each market, respectively Tr./Mark./Year trades per market per year Tr./Month trades per month for all markets If you have a trading system or idea youd like tested, send it to us at the Trading System Lab. Well test it on a portfolio of stocks or futures (for now, maximum 60 markets, using the last 2,500 trading days), using true portfolio analysis/optimization. Most system-testing software only allows you to test one market at a time. Our system-testing technique lets all markets share the same account and is based on the interaction within the portfolio as a whole. Start by e-mailing system logic (in TradeStations EasyLanguage or in an Excel spreadsheet) and a short description to editorial@activetradermag.com, and well get back to you. Note: Each system must have a clearly defined stop-loss level and a suggested optimal amount to risk per trade.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER February 2003 www.activetradermag.com

61

FUTURES

&

OPTIONS

Trading System Lab


EQUITY CURVE
$160,000 $140,000 $120,000 $100,000 $80,000

Markets: Any markets with a propensity to trend.

System logic: This is the same system tested on 30 $60,000 Nasdaq stocks (p. 60, where you can read more about the systems logic). $40,000 The system is based on the Donchian breakout system, which enters a trade as soon as the market trades $20,000 above or below the highest or lowest price of the last $0 four weeks (approximately 20 days). 3/26/93 3/26/94 3/26/95 3/26/96 3/26/97 3/26/98 3/26/99 3/26/00 3/26/01 3/26/02 The Donchian breakout system was invented by Richard Donchian in the 1970s and refined by Richard Dennis in least some of the markets traded should be in strong trends. the 1980s. The more popular it became, the more other traders These markets should be able to produce profits large enough modified the system by varying the lookback periods, applying to make up for the whipsaw losses produced in the other marother types of filters and attaching various money management kets plus enough additional profits to make trading worthwhile. rules. The dynamic breakout system is a modified version of the Donchian system that alters the lookback period between 20 Rules: 1. Go long on the open if yesterdays close is higher than and 60 days depending on the volatility of the market. This system and the volatility breakout system used in the January the highest high of the lookback period. 2. Exit by reversing the position. Trading System Lab are likely the most commonly used strategies of all time, particularly in the commodity futures market. Reverse the rules for short trades. This is a result of commodity futures markets historical tendency to trend. The idea is that capturing a strong trending move should more than make up for a large number of small Money management: 1. Risk 2 percent of available equity per trade. losing trades produced during times of consolidation and stag2. The number of contracts to trade was calculated with the nant prices. Applying the system to many different futures markets should result in a steady profit, as it is highly likely that at following formula: SAMPLE TRADES
Oats (O), daily
210.00 Sell 200.00 190.00 180.00 170.00 160.00 150.00 140.00 130.00 Buy 120.00

Account balance ($)

Dynamic breakout system

CT = AC * PR / Dist where CT = Contracts to trade AC = Available capital PR = Percent risked Dist = Distance between the entry price and the exit price on the day of entry. Test period: April 1993 to October 2002. Test data: Daily prices for 15 commodity futures markets: cocoa, coffee, corn, cotton, feeder cattle, lumber, oats, orange juice, pork bellies, soybeans, soy meal, soy oil, rough rice, sugar and wheat. Starting equity: $100,000 (nominal); $50 deducted for slippage and commission per contract traded. Test results: It is fair to say this system did not work very well from 1996 to 1999. However, since 1999 it

110.00 May June July August September October

Source: Omega Research ProSuite

62

www.activetradermag.com February 2003 ACTIVE TRADER

DRAWDOWN CURVE
3/26/93 0% -5% -10% -15% -20% -25% -30% -35% 3/26/94 3/26/95 3/26/96 3/26/97 3/26/98 3/26/99 3/26/00 3/26/01 3/26/02

has gained ground little by little, slowly increasing its average annual return. For example, the average return for the last three years has been 6.4 percent. However, the return for the past 12 months has been 9.97 percent, and the return is close to 30 percent for the last six months. Granted, there still is a long way to go before the system can find its way out of a drawdown that has lasted for almost seven years, but the recent upward trend confirms our findings from last month that the long-term trend-following strategy is ready to stage a comeback as a profitable trading system. In the late 1990s, many analysts claimed that long-term trend-following systems would no longer make money. The reason, they argued, was that the markets had become so sophisticated over the last several years that whatever inefficiencies made the strategy profitable during the 1970s and 1980s had been eliminated. STRATEGY SUMMARY
Profitability End. equity ($): 123,221 Total return (%): 23 Avg. annual ret. (%): 2.20 Profit factor: 1.03 Avg. tied cap (%): 40 Win. months (%): 52 Drawdown Max. DD (%): Longest flat (m):
32.9 82.6

However, as the performance summary shows, this system is potentially poised to launch itself into a new period of prosperity. This shows the market works in cycles, and just when youre about to throw in the towel, things often take a turn for the better. Aside from the various ways of improving this strategy suggested on p. 60, the best way to optimize it for the futures markets is to trade it in many markets. Trading a large number of markets is possible thanks to the relatively low margin requirements of the futures markets (often only 5 to10 percent of the total contract value).

ROLLING TIME WINDOW RETURN ANALYSIS


Cumulative Most recent: Average: Best: Worst: St. dev.: Annualized Most recent: Average: Best: Worst: St. dev.: 12 months 9.97% 2.53% 44.61% -20.11% 11.36% 12 months 9.97% 2.53% 44.61% -20.11% 11.36% 24 months 17.00% 4.64% 47.38% -19.85% 17.85% 24 months 8.17% 2.30% 21.40% -10.48% 8.56% 36 months 20.46% 4.24% 47.95% -25.71% 21.91% 48 months 0.25% 2.94% 50.34% -28.62% 22.75% 60 months 2.89% 2.18% 49.68% -24.67% 21.23% 60 months 0.57% 0.43% 8.40% -5.51% 3.93%

36 48 months months 6.40% 1.40% 13.95% -9.43% 6.83% 0.06% 0.73% 10.73% -8.08% 5.26%

Trade statistics No. trades: 199 Avg. trade ($): 117 Avg. DIT: 90.1 Avg. win/loss ($): 2,028 (1,045) Lrg. win/loss ($): 21,163 (2,832) Win. trades (%): 32.2 TIM (%): Tr./Mark./Year: Tr./Month: 100 51.2 1.4 1.7

LEGEND: Cumulative returns Most recent: most recent return from start to end of the respective periods Average: the average of all cumulative returns from start to end of the respective periods Best: the best of all cumulative returns from start to end of the respective periods Worst: the worst of all cumulative returns from start to end of the respective periods St. dev.: the standard deviation of all cumulative returns from start to end of the respective periods Annualized returns The ending equity as a result of the cumulative returns, raised by 1/n, where n is the respective period in number of years

Send Active Trader your systems


LEGEND: End. equity ($) equity at the end of test period Total return (%) total percentage return over test period Avg. annual ret. (%) average continuously compounded annual return Profit factor gross profit/gross loss Avg. tied cap (%) average percent of total available capital tied up in open positions Win. months (%) percentage profitable months over test period Max. DD (%) maximum drop in equity Longest flat longest period, in months, spent between two equity highs No. trades number of trades Avg. trade ($) amount won or lost by the average trade Avg. DIT average days in trade Avg. win/loss ($) average winning and losing trade, respectively Lrg. win/loss ($) largest winning and losing trade, respectively Win. trades (%) percent winning trades TIM (%) amount of time there is at least one open position for entire portfolio, and each market, respectively Tr./Mark./Year trades per market per year Tr./Month trades per month for all markets If you have a trading system or idea youd like tested, send it to us at the Trading System Lab. Well test it on a portfolio of stocks or futures (for now, maximum 60 markets, using the last 2,500 trading days), using true portfolio analysis/optimization. Most system-testing software only allows you to test one market at a time. Our system-testing technique lets all markets share the same account and is based on the interaction within the portfolio as a whole. Start by e-mailing system logic (in TradeStations EasyLanguage or in an Excel spreadsheet) and a short description to editorial@activetradermag.com, and well get back to you. Note: Each system must have a clearly defined stop-loss level and a suggested optimal amount to risk per trade.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER February 2003 www.activetradermag.com

63

FUTURES

Trading System Lab


FIGURE 1 COMPARING THE STOPS
Notice how the modified exit rule approaches price at an accelerated rate as time passes. Nasdaq 100 index (ND), daily
900.00 880.00

Experimenting with exits


Market: Futures.

860.00 840.00

System concept: Some traders believe exit signals are more Sell 820.00 important than entry signals, while others believe success 800.00 hinges on money management and diversification. The 780.00 truth is most likely somewhere in the middle and, as a result, all components of a trading system must be ade760.00 quately developed and tested. 740.00 This systems entry technique is simply a breakout above 720.00 a 55-day high. The more important part of the strategy is a 700.00 trailing stop technique that is designed to capture as much 680.00 of the trend as possible by tightening the stop relative to the number of days the trade has been open. 660.00 After initiating a trade, a recent low point, such as the 640.00 Buy lowest low of the past 55 days, is selected. To determine the 620.00 stop level, the 20-day average true range (ATR) is multi600.00 plied by 10 percent, and then multiplied by the number of 580.00 days the trade has been open. This amount is then added to 560.00 the recent low used as the initial reference point. For example, if a trade has been open for 12 days, we December 1997 January 1998 Feb. 1998 would multiply the 20-period ATR by 0.1 (10 percent), mulSource for all figures: Wealth-Lab Inc. (www.wealth-lab.com) tiply this result by 12 (days) and, finally, add the result to the lowest low of the past 55 days. The next day, the 20-day ATR Rules: would be multiplied by 0.1, multiplied by 13, added to the lowest 1. Enter long on the next bars open if todays high is low of the past 55 days, and so on. greater than the highest high of the last 55 days. We will compare the results of this stop with using the lowest 2. Exit on the next days open if the lowest low is less than low of the past 55 days. Figure 1 shows the difference between the the lowest low of the last 55 days plus 10 percent of the two stops. The magenta line represents the 55-day low stop and the actual average true range for each day in the market. blue line is the modified exit strategy. The blue line tracks the price action more closely. This is a long-only system.

FIGURE 2 EQUITY CURVE (MODIFIED EXIT RULE)


The modified exit rule produced modest profits over the test period.
650,000 600,000 550,000 500,000 450,000 400,000
Account balance ($)

FIGURE 3 EQUITY CURVE (SIMPLE EXIT RULE)


The simple 55-day low exit technique actually outperformed the modified stop.
1,000,000 950,000 900,000 850,000 800,000 750,000 700,000 650,000 600,000 550,000 500,000 450,000 400,000 350,000 300,000 250,000 200,000 150,000 100,000 50,000 0 3/22/94 5/1/95 6/3/96
Equity Cash

350,000 300,000 250,000 200,000 150,000 100,000 50,000 0 3/22/94 5/1/95


Equity

6/3/96 7/3/97 8/3/98 9/1/99


Cash Linear Reg.

11/1/00 1/2/02 2/3/03


Long Short

Account balance ($)

7/3/97 8/4/98 9/3/99


Linear Reg.

11/1/00 1/2/02 2/3/03


Long Short

64

www.activetradermag.com June 2004 ACTIVE TRADER

Money management: Risk a maximum 3 percent of total account equity per trade (stopbased risk %). Setting the maximum risk percent to 3 means at any given time we should not lose more than 3 percent of the total account equity. Of course, overnight gaps and limit down moves could lead to higher losses. Starting equity: $250,000 (nominal). Deduct $20 slippage/commission per round-turn trade. Test period: March 1994 to August 2003. Test data: The system was tested on the Active Trader Standard Futures Portfolio, which contains the following 19 futures: DAX30 (AX), corn (C), crude oil (CL), German bund (DT), euro dollar (ED), euro forex (FX), gold (GC), copper (HG), Japanese yen (JY), coffee (KC), live cattle (LC), lean hogs (LH), Nasdaq 100 (ND), natural gas (NG), soybeans (S), sugar (SB), silver (SI), S&P 500 (SP) and TNotes 10 year (TA). The test used ratio adjusted data from Pinnacle Data Corp. System results: Figure 2 shows the equity curve when risking 3 percent of the total portfolio equity per trade. The system returned a total profit of 135.31 percent over approximately 10 years and 9.54 percent annually, with the worst year being a loss of 8.3 percent in 1999. The single largest annual drawdown of 19.99 percent occurred in 1996. The system produced 351 trades with an average profit of $963.77 per trade. Figure 3 shows the equity curve of the comparison system that

uses the simple 55-day low exit rule. This version had fewer trades (208) than the modified system because the stop maintains a constant distance from price action regardless of volatility changes and how long the trade has been open. The average profit per trade increased to $3,073 and the average holding time increased from 40 days to 95 days. The simple systems net profit was much higher ($639,204 compared to $338,282), although its drawdown was also markedly higher (36.65 percent compared to 28.7 percent). Bottom line: The trailing exit strategy enabled the system to reduce drawdown, but it also reduced profits. Comparison to the simple stop approach suggests the modified version exited trades too quickly and did not give the system enough time to ride the trend.

STRATEGY SUMMARY
Profitability Net profit ($): 338,282.00 Net profit (%): 135.31 Exposure (%): 33.88 Profit factor: 1.32 Payoff ratio: 1.70 Recovery factor: 2.56 Drawdown Max. DD (%): -28.70 Longest flat days: 760 Trade statistics No. trades: Win/loss (%): Avg. gain/loss (%): Avg. hold time: Avg. profit (winners) %: Avg. hold time (winners): Avg. loss (losers) %: Avg. hold time (losers): Max. consec. win/loss: 351 42.17 0.65 40.03 7.97 58.09 -4.69 26.87 6/9

PERIODIC RETURNS
Avg. Sharpe Best Worst Percentage Max. Max. return ratio return return profitable consec. consec. periods profitable unprofitable Weekly 0.21% 0.59 11.95% -9.16% 55.19% 9 8 Monthly 0.88% 0.59 16.74% -9.95% 52.63% 6 4 Quarterly 2.60% 0.57 22.78% -10.91% 56.41% 4 3 Annually 9.86% 0.63 40.57% -8.30% 70.00% 7 1
LEGEND: Avg. return The average percentage for the period Sharpe ratio Average return divided by standard deviation of returns (annualized) Best return Best return for the period Worst return Worst return for the period Percentage profitable periods The percentage of periods that were profitable Max. consec. profitable The largest number of consecutive profitable periods Max. consec. unprofitable The largest number of consecutive unprofitable periods Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

LEGEND: Net profit Profit at end of test period, less commission Exposure The area of the equity curve exposed to long or short positions, as opposed to cash Profit factor Gross profit divided by gross loss Payoff ratio Average profit of winning trades divided by average loss of losing trades Recovery factor Net profit divided by max. drawdown Max. DD (%) Largest percentage decline in equity Longest flat days Longest period, in days, the system is between two equity highs No. trades Number of trades generated by the system Win/Loss (%) The percentage of trades that were profitable Avg. gain The average profit for all trades Avg. hold time The average holding period for all trades Avg. gain (winners) The average profit for winning trades Avg. hold time (winners) The average holding time for winning trades Avg. loss (losers) The average loss for losing trades Avg. hold time (losers) The average holding time for losing trades Max. consec. win/loss The maximum number of consecutive winning and losing trades

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

FUTURES

Trading System Lab


Optimization parameters: The x and y parameters will be optimized from one to eight months. Test data: Daily continuous T-Bond futures (US). No commissions or slippage were deducted. Test periods: Initial in-sample period: Jan. 1, 1985, through Dec. 31, 1995. Second out-of-sample period: Jan. 1, 1996, to Dec. 31, 2002.

Monthly breakout
Market: Futures. System concept: Some traders believe designing a robust trading system requires dividing your data into two sets. The first half (referred to as in-sample data) is used to develop trading rules and optimize their parameters; the second (out-of-sample data) is used to simulate trading the system and see if the results are both favorable and consistent with the initial test. If the system performs well on the second data set (which repFIGURE 1 OPTIMIZATION RESULTS FROM IN-SAMPLE TEST
The results for different parameter combinations are sorted by recovery factor, which is the net profit divided by the maximum drawdown.

Account balance ($)

resents new, unseen price action), the system is considered to have a better chance of working in real trading. The process is referred to as walk-forward testing because the system can be progressively applied to new data to see if it continues to perform. We will explore that concept here. To illustrate the principles in a straightforward fashion, we test a basic, long-only monthly breakout system on a single market, the T-Bond. FIGURE Even though the monthly highs and lows define the entry points, we will use end-of-day data to take opening gaps into consideration. Whenever performing out-of-sample testing, 40,000 expect the performance to be worse than the in-sam35,000 ple tests. This is not a reflection of the quality of the 30,000 system. It is simply because the system was devel25,000 oped and optimized on a different data set. Rules: 1. Entry: Buy at the highest high of the last x months. 2. Exit: Sell at the lowest low of the last y months.

Test results In-sample: All parameter combinations were profitable. Figure 1 (above) shows the top combinations sorted by Recovery Factor, which is the absolute value of the systems net profit divided by its maximum drawdown (see the stock Trading System Lab on p. 56 for the significance of this statistic). 2 PROFIT CURVE
The optimized monthly breakout system slightly underperformed buy-and-hold, but it had a much lower risk level.

20,000 15,000 10,000 5,000 0 1/2/85 12/2/85 1/2/87 1/4/88 1/3/89 1/2/90 1/2/91 1/2/92 1/4/93 1/3/94 1/3/95

Total profit Buy & hold Linear reg Risk control: The system does not use a fixed dollar, point or percentage stop. Instead, a reversal below the Source for all figures: Wealth-Lab Inc. (www.wealth-lab.com) y-month low is used to indicate the market is no longer in an uptrend, at which point all positions are liquidated, For the 10 years covered in the test, the best parameters win or lose. would be to buy at the highest high of the past month and sell at the lowest low of the past two months. As expected, Money management: Each position will consist of one T-bond the shorter the breakout length, the higher the number of contract. trades. However, the optimal settings did not produce many trades (19) over the test period.

66

www.activetradermag.com March 2004 ACTIVE TRADER

FIGURE 3 OUT-OF-SAMPLE TEST RESULTS


The system behaved much differently on the out-of-sample data. The best parameter combination from the in-sample test was the third worst in the out-of-sample test.

FIGURE 4 PROFIT CURVE Bottom line: The testing process illustrated here shows how the performance of even fundamentally sound trading systems can vary over time. The best 20,000 parameter set of the first 10 years became the third worst in the following seven years. However, all the 15,000 parameter combinations were profitable in both peri10,000 ods, suggesting the basic trading approach is sound. 5,000 The best-performing parameters in one period will 0 almost never be the best in future data. Because of this, it is more important to look for parameter stability. A -5,000 broad range of parameter values should be profitable 1/2/96 7/29/96 3/31/97 12/1/97 7/28/98 3/30/99 12/1/99 7/27/00 3/28/01 12/3/01 8/1/02 and deliver consistent results. Total profit Buy & hold Linear reg Optimizing is a very useful tool, but it should be used to confirm parameter stability rather than to try to find the parameter combination with the highest net The equity curve (dark green) in Figure 2 (opposite page) for profit. the most part follows the underlying market curve (blue line). Even though the buy-and-hold profit ($44,006) over the 10-year Dion Kurczek and Volker Knapp of Wealth-Lab Inc. in-sample period was higher than the systems profit ($40,012), the buy-and-hold drawdown was more than 50 percent higher FIGURE 5 SAMPLE TRADE ($10,886) than the systems drawdown ($6,428).
The optimized parameters from the in-sample test performed much worse on the out-of-sample data.
Account balance ($)

Test results Out-of-sample data: Testing the parameters on the out-of-sample data set produced significantly different results. The best parameter combination from the in-sample test (buy above the one-month high and sell below the two-month low) became the third worst combination in the out-of-sample test. Figure 3 (top) sorts the 11 worst parameter combinations by recovery factor. Two combinations from the former top 11 are now in the bottom eleven. On the other hand, all the parameter combinations have remained profitable, which indicates the system rules have some merit. Figure 4 (above) shows the equity curve for the optimized parameters from the in-sample data period tested on the outof-sample period. Even though the performance was positive, it was quite volatile compared to the smooth ride of the optimal parameter combination (buying above the one-month high and selling below the eight-month low) for this test period, a sample trade of which is shown in Figure 5 (right).
Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

The system performed best in the out-of-sample test when it bought above the one-month high and sold below the eight-month low. T-bonds (US), daily
106.00 105.50 105.00 104.50 104.00 103.50 103.00 102.50 102.00 101.50 101.00 100.50 100.00 99.50 99.00 98.50 98.00 97.50 97.00 96.50 96.00 95.50

Sell

Buy

Volume
August 2001 September 2001 October 2001 November 2001

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER March 2004 www.activetradermag.com

67

60-minute breakout system


Markets: Stocks. System concept: This intraday system takes a trade when price breaks out of the trading range established in the first hour of the session. Early in the morning the market often is trying to establish its direction, and a move above or below the 60-minute range might signal a trend in that direction. Also, a breakout of the early trading range is sometimes caused by a specific news item that will cause the trend to continue. Because the highest volatility of the day often occurs in the first trading hour, there are no trades in the first 60 minutes. After the first 60 minutes have ended, if the closing price of the current 30-minute bar is above the high of the range, we will go long on the next open. A short position is established if the closing price is below the range. A signal in the opposite direction is used to exit the current position. All open positions are exited at the close of the day. There will be only one trade per day. FIGURE 1 EQUITY CURVE
We tested the portfolio of 18 stocks on 30-minute bars (more than 3,500 total trades). Each signal used five percent of the portfolio equity value. Long trades were slightly profitable.
160,000 150,000 140,000 130,000 120,000 110,000 100,000 90,000 80,000 70,000 60,000 50,000 40,000 30,000 20,000 10,000 0 10/10/02
Equity

11/25/02
Cash

1/14/03

2/28/03
Linear reg

4/14/03
Long

5/29/03

7/14/03
Short

8/26/03

10/8/03

Buy & hold

Entry rules: Long trades: Buy if the closing price of the third 30-minute bar is above the high of the first 60 minutes of the day. Short trades: Sell short if the closing price of the third 30minute bar is below the low of the first 60 minutes of the day. Exit: Exit all positions on signals in the opposite direction or at the end of the day.

Test period: October 2002 through October 2003. Initial test results: The systems performance was disappointing an overall loss of -3.25 percent. With 3,546 trades in the test period, this is one of the more active systems tested here. However, even setting the commission at one cent per share (advisable for a system that generates this many trades) still resulted in $13,576 in commission charges. Figure 1 shows long trades were slightly profitable, generating a 4.22-percent profit during this period.

Money management: Each trade is sized at five percent of the current account equity. This will allow all trades the system is generating to be executed. Increasing the FIGURE 2 ADDING A FILTER percentage would require dropping trades that The bars show the average per-trade profit that would have been exceeded the available cash limit.
captured by adding the CMO as a trade filter.

Starting equity: $100,000 (nominal). Deduct $0.01 per share slippage and commissions. Test data: The system was tested on 30 minute bars of the Active Trader Standard Stock Portfolio, which contains the following 18 stocks: Apple Computer (AAPL), Boeing (BA), Citibank (C), Caterpillar (CAT), Cisco (CSCO), Disney (DIS), General Motors (GM), Hewlett Packard (HPQ), International Business Machines (IBM), Intel (INTC), International Paper (IP), JPMorgan Chase (JPM), Coke (KO), Microsoft (MSFT), Sears (S), Starbucks (SBUX), AT&T (T) and Wal-Mart (WMT). Data from www.qcharts.com.

0.80% 0.70% 0.60% 0.50% 0.40% 0.30% 0.20% -80.00 -60.00 -40.00 -20.00 0.00 CMOlevel 20.00 40.00 60.00 80.00

68

www.activetradermag.com January 2004 ACTIVE TRADER

Adding a filter: To see if we could reduce the number of trades and improve performance, we added a filter a 14-bar Chande Momentum Oscillator (CMO) to the basic system (see the December 2003 Trading System Lab, p. 48, for more information on this indicator). The filter consisted of taking trades only when the CMO reading for the previous days bar was above 60, indicating bullish momentum. The filter reduced the total number of trades and eliminated short trades. Figure 2 (opposite page) shows waiting for a CMO reading above 60 before taking trades would have increased profitability. Testing our portfolio with the additional filter turned the losing system into a winner although not a spectacular one. The number of trades decreased to 251 from 3,546, the average profit was 0.12 percent and total profit was 1.48 percent. Bottom line: Although the strategy concept sounds reasonable, it did not produce satisfactory results. There is plenty of room for further experimentation, though such as trying other filters, including those that would differentiate between long and short trades. Another alternative is to use shorter bars (e.g., five minutes) to get into positions faster.

FIGURE 3 SAMPLE TRADE


The green bars are the first trading hours of the days shown here. Subsequent black bars have closing prices within the first-hour range; red bars indicate the closing price is below the range and blue bars show bars with closing prices above the range. Cisco Systems (CSCO), 30-minute
21.50 21.40 21.30 21.20 21.10 21.00 20.90 20.80 20.70 20.60 20.50 20.40 20.30 20.20 20.10 20.00 19.90

Short 240 @20.87

Cover 240 @20.34


9/24/03 9/25/03

Buy 246 @20.34

STRATEGY SUMMARY
Profitability Net profit ($): Net profit (%): Exposure (%): Profit factor: Payoff ratio: Recovery factor: Drawdown
Max. DD (%): Longest flat days: -3,247.41 -3.25 -3.26 0.96 0.98 0.42

Trade statistics No. trades: Win/loss (%): Avg. gain/loss (%): Avg. hold time: Avg. profit (winners) (%): Avg. hold time (winners): Avg. loss (losers) (%):

Although some individual stocks produced very good equity curves, the total portfolio itself did not. This illustrates how testing a strategy on a single instrument or very limited portfolio can lead to the wrong conclusions about a systems value.
3,546 49.55 -0.02 6.46 0.85 6.71 -0.87 6.22 18/23
Weekly Monthly

Volker Knapp of Wealth-Lab Inc. PERIODIC RETURNS


Avg. Sharpe Best Worst Percentage Max. Max. return ratio return return profitable consec. consec. periods profitable unprofitable -0.06% -0.56 -0.24% -0.60 1.70% 2.48% 1.99% -2.11% -2.57% -4.47% 47.17% 38.46% 60.00% 4 2 1 6 5 1

-7.45 Avg. hold time (losers): 3,078 Max. consec. win/loss:

LEGEND: Net profit Profit at end of test period, less commission Exposure The area of the equity curve exposed to long or short positions, as opposed to cash Profit factor Gross profit divided by gross loss Payoff ratio Average profit of winning trades divided by average loss of losing trades Recovery factor Net profit divided by max. drawdown Max. DD (%) Largest percentage decline in equity Longest flat days Longest period, in days, the system is between two equity highs No. trades Number of trades generated by the sys tem Win/Loss (%) the percentage of trades that were profitable Avg. profit The average profit for all trades Avg. hold time The average holding peri od for all trades Avg. profit (winners) The average profit for winning trades Avg. hold time (winners) The average holding time for winning trades Avg. loss (losers) The average loss for losing trades Avg. hold time (losers) The average holding time for losing trades Max. consec. win/loss The maximum number of consecutive winning and losing trades

Quarterly -0.63% -0.51

LEGEND: Avg. return The average percentage for the period Sharpe ratio Average return divided by standard deviation of returns (annualized) Best return Best return for the period Worst return Worst return for the period Percentage profitable periods The percentage of periods that were profitable Max. consec. profitable The largest number of consecutive profitable periods Max. consec. unprofitable The largest number of consecutive unprofitable peri ods Trading System Lab strategies are tested on a portfolio basis (unless otherwise noted) using Wealth-Lab Inc.s testing platform. If you have a system youd like to see tested, please send the trading and money-management rules to editorial@activetradermag.com.

Disclaimer: The Trading System Lab is intended for educational purposes only to provide a perspective on different market concepts. It is not meant to recommend or promote any trading system or approach. Traders are advised to do their own research and testing to determine the validity of a trading idea. Past performance does not guarantee future results; historical testing may not reflect a systems behavior in real-time trading.

ACTIVE TRADER January 2004 www.activetradermag.com

69

You might also like