RANGE TEST
I
added a filter to the new hammer definition defined above that required the
range (the high value minus the low value for the day) on the day of the hammer
to be the largest range in the past five days. The test results for this filter
during the 01/03/06 to 05/01/07 time period are shown in Figure 4.7. During this test period, taking only
wide range hammers increased the annualized ROI from 27% to 48%. It also
increased the percentage of winning trades from 56% to more than 58%. Wide
range hammers are an interesting idea, not because my friend suggested it, but
because it tests well. The wide range hammer also showed 222 trades during this
16-month test.
REVISED DEFINITION MEANS NEW TESTS
This volume filter works well enough that I have incorporated it into my standard hammer pattern definition. I will use this as the starting definition in subsequent testing. Adding a filter to the hammer will subsequently imply that it is being added to and compared with the new standard definition unless stated otherwise:
- The stock must be in a downtrend.
- The upper shadow must be more than 4% and less than 20% of the day’s range.
- The body can be either black or white.
- The volume must be more than 160% of the 21 day average.
While I was writing this chapter, a friend suggested that hammers worked better if the range on the day the hammer occurs is wider than the recent day’s ranges. One of the great things about backtesting is that when someone gives you a trading idea, instead of just risking your money on someone else’s feeling, you can test it to see if the suggestion has merit.
FIGURE 4.7: TEST RESULTS FOR HAMMER RANGE THE
LARGEST OF THE LAST FIVE SESSIONS
In
order to verify this result was not limited to specific events during the test
period, I also ran the test during the three-year period of 01/01/04 to
12/29/06. This resulted in a 44.71% annualized ROI, slightly less than 54%
winning trades, and 391 trades during the period. Running the test in the same
period without the wide range filter yielded a 29% annualized ROI and 52%
winning trades with 1,128 trades taken.
Since
the wide range hammer filter nearly doubles annualized ROI in tests involving
two different time frames and covering almost five years, it appears to be
something worth considering in trading the hammer pattern. An example hammer
with the wide range filter is shown in Figure 4.8, in which the hammer is
marked by the down arrow. Notice that the hammer’s range is the largest range
in the last five trading sessions and that there was a significant volume spike
on the day the hammer occurred.
FIGURE 4.8: WIDE RANGE HAMMER IN CHTR ON 03/
14/06
When
I develop trading patterns for my trading toolbox, I always want to know how
they perform in different market conditions. I determine this by testing the
patterns in bullish markets, bearish markets, and trading range markets. In
actual practice, I use trend lines on the NASDAQ to determine the condition the
market is in and when it is changing.
RANGE TEST IN A
SIDEWAYS TRENDING MARKET
During
the first three months of 2006, the market was stuck in a trading range, as
shown in Figure 4.9. Trading range markets
can be difficult for traders, since stocks tend to trigger out of setups less
often and when they do, they tend to “pop and drop.” This happens almost by
definition because, if most stocks were triggering and running, then the
market, which is the sum of the stocks, would have to be trending and not
range-bound.
FIGURE 4.9: NASDAQ TRADING RANGE IN EARLY
2006
Taking
all wide range hammer trades during this period resulted in 19 trades; a 135%
annualized ROI, and 68% winning trades, as shown in Figure 4.10. During a short
period, annualized ROI can be a misleading, but bigger is better. The
interesting part of Figure 4.10 is the 68% winning trades number. When I find a
system that wins more than 60% of the time, I am interested. The question is
whether this holds up in other trading range markets.
FIGURE 4.10: WIDE RANGE HAMMER TEST RESULTS IN
2006 TRADING RANGE
The
market was also in a trading range during the period of 11/14/06 to 02/14/07.
Testing the wide range hammer pattern during this period resulted in 25 trades
with a 43% annualized ROI as compared to 20% for buy and hold. Of the 25 trades
during this period, 68% were winners.
The
trading range market of 01/07/05 to 03/14/05 showed 43 wide range hammer trades
resulting in a 73% annualized ROI as compared to 8% for buy and hold. Testing
the pattern during this period showed 62% winning trades.
Testing
the wide range hammer during the 10/03/03 to 12/29/ 03 trading range market
resulted in only six trades; and showed a negative annualized ROI of 18%, with
only 33% winning trades. The pattern generated very few trades during this
period, and they did not work well. Very few patterns work all the time.
The
wide range hammer pattern worked well in three of the four trading range
markets shown here. In the cases in which it worked, it performed well and
generated a number of trades. In the one case in which it did not perform well,
it only generated a few trades. This reinforces the thought that there are no
guarantees in trading and traders need to adjust position sizing and risk
levels to reflect the fact that losses do occur.
RANGE TEST IN BULL MARKETS
In
bull markets such as the 03/14/07 to 05/09/07 period, the wide range hammer
pattern seems to perform well, as shown in Figure
4.11. The annualized ROI is better than buy and hold and the winning
percentage is 76%. The pattern also performed well during the 07/24/06 to
11/24/06 uptrending market, where it showed an annualized ROI of twice buy and
hold and 43 trades, of which 60% were winners.
FIGURE 4.11: WIDE RANGE HAMMER TEST RESULTS
FOR 3/14/07 TO 5/09/07
The
wide range hammer pattern did not perform well during the market’s bull move
from 10/13/05 to 12/05/05. During this period, the backtesting showed 45 trades
yielding only 7% annualized ROI, while buy and hold showed 47%. Once again,
there are times when trading patterns do not work. Successful traders find
patterns that work most of the time and focus their trading during favorable
market conditions for each specific pattern. They also make sure that position
sizing and money management techniques are used that allow them to get by the
inevitable periods when trading is going through a losing streak.
RANGE TEST IN BEAR
MARKETS
I
found the wide range hammer generally does not test well during periods when
the market is in a downtrend. During the 03/08/05 to 04/29/05 market downtrend,
the pattern lost an annualized ROI of 42%, which was more than buy and hold
lost during the same period, as shown in the test results of Figure 4.12. The pattern generated 41 trades and
only had a winning percentage of 34%. Other testing indicates that while the
pattern performs OK in some downtrends, it is typically a good idea not to
trade it when the market is bearish.
FIGURE 4.12: WIDE RANGE HAMMER TEST IN MARKET
DOWNTREND