Truth About MACD - What Worked
Truth About MACD - What Worked
Title
Copyrights and Disclaimers
Books by Jackie Ann Patterson
Introduction
Chapter 1: Moving Parts of MACD
The Very Basics of Technical Analysis
MACD Basics
Advanced MACD Signals
Chapter 2: Baseline for Reference
Why A Baseline
The Strategy Evaluation Process
The Baseline Strategy
Baseline Strategy Backtest Results
Chapter 3: Using MACD Divergences to Find Big Bottoms
MACD Divergence Strategy Under Test
MACD Divergence Long Entry Backtest Results
MACD Divergence Exit Backtest Results
Conclusions on Original MACD Divergence Backtest Results
Out-of-Sample MACD Divergence Backtest Results
How To Apply MACD Divergences
Chapter 4: Divergence Count Indicator
Overview of Divergence Count Indicator
Strategy Development Methodology
DCI Win Rates Backtest Results
DCI Exit Backtest Results
DCI Exits Without Stop Losses Backtest Results
Conclusions From DCI Backtesting
How to Apply DCI Zones to Your Trading
Chapter 5: Intra-Day Divergence Count
My Intra-Day MACD Divergence Scans
Hypothetical Performance of Intra-Day Divergence Count
How to Do Intra-Day Divergence Scanning and Counting
Chapter 6: Resources
Bonus Materials for Book Owners
Divergence-Alerts.com
MACD Divergence Detection Software
Related Reading
Chapter 7: Selling Short MACD Negative Divergences
What is a Short Trade
Strategies Under Test
MACD Divergence Short Entry Backtest Results
MACD Divergence Short Exit Backtest Results
Chapter 8: Anticipating the Cross with MACD Buy Signals
Strategies Under Test
Basic MACD Entry Backtest Results
Conclusions About Non-Divergence MACD Entry Signals
Chapter 9: Catching the Wiggles with MACD Sell Signals
Strategy Under Test
Non-Divergence MACD Exit Backtests Results
Conclusions for Non-divergence MACD Exit
Chapter 10: The Missing Link With EMAs and MACD
MACD MA Crossover Entry Backtest Results
MACD MA Crossover Exit Backtest Results
In Summary
Acknowledgements
Beat The Crash Volume II
Truth About MACD:
What Worked, What Didn’t
Work, and How to Avoid Mistakes
Even Experts Make
Second Edition
Published by:
Own Mountain Trading Company dba BackTesting Report
P.O. Box 620427
Woodside, CA 94062-0427
support@backtestingreport.com
www.ownmountain.com
www.backtestingreport.com
www.truthaboutmacd.com
Despite best efforts to produce a useful and correct report, this book may
contain errors. Much of the data relies on backtesting, which is a historical
simulation with significant differences from real live investing and
trading. No claim is being made that you will make money from this
book, and in fact you may lose money from investing. The author is not a
licensed financial planner. This book is intended for educational purposes
and is not a recommendation to buy or sell securities. You must consider
carefully what is right for you and consult professionals as needed.
Truth About MACD: What Worked, What Didn’t Work, and How to
Avoid Mistakes Even Experts Make. Beat The Crash Volume II
I didn’t set out to be an expert in technical analysis. I’d say I’m probably a
lot like you, dear reader, in that I wanted to trade to make money with as
little effort as possible.
What I was willing to do was take trading classes from Dr. Alexander
Elder (www.elder.com). His trading camps not only cover the intellectual
material on trading, they are an introduction to a lifestyle of freedom and
travel.
The camp I took was on the island of Cyprus. I learned not only why Dr.
Elder called MACD divergences the most powerful signal in technical
analysis, and not only how Gerald Appel, the inventor of MACD, used it
to find the bottom in 2003, but also enjoyed intriguing travel around
Cyprus including festive group dinners at Greek tavernas in the local
villages.
The thing was, when I came home to trade using the MACD divergences,
it was not as easy for me as it seemed in the classroom. You see, I made
the almost-fatal mistake of treating all MACD divergences alike.
More research showed me that some signals had a chance of helping with
trading and others not so much. Needing to recover my composure and
my income for trading, I decided to research in depth and sell that research
as written BackTesting Reports, videos, and a web service called
divergence-alerts.com that flags MACD divergences on US stocks and
ETFs. In fact, the first edition of this book was packaged as a series of
reports that sold online for more than $100.
By the end of this book, you’ll have a complete briefing so that, when you
see a MACD on a chart, you can tell at a glance how it was made, what it
indicates about the market, and most importantly, how much or how little
to count on it based on its track record.
The first book in the Beat the Crash series, Truth About ETF Rotation,
presented a completely mechanical system for investing in Exchange
Traded Funds (ETFs). This second book in the series begins the long and
arduous path of learning tools to help with discretionary trading and
investing.
If you come away with only one thing, let it be ideas for finding big
market bottoms. Beating the crash is as much about picking good times to
buy as knowing when to sell. It is also about resilience to re-enter the
market after a healthy downturn.
Overall, this work is NOT meant to convince you to use the MACD
indicator or even to trade the stock market. Only you can make those
decisions for yourself. This book is meant to give you information to
consider while you weigh your choices and point out areas that appeared to
perform better than others in historical simulation.
Chapter 1: Moving Parts of MACD
The MACD is a complex indicator that can do all of the above. This
chapter explains the different parts of the MACD and shows you how it is
typically interpreted. Later chapters report on the performance of each
aspect of the MACD.
Before getting complex, let’s cover the basics of technical analysis. The
first thing to understand is that the price of a stock, ETF, or futures
contract is commonly expressed as charts of bars. Each bar represents a
time interval such as days, weeks, months, hours, 5 minute intervals. Most
of my research focuses on charts of daily bars, plus key elements of
weekly and hourly charts.
I often plot price charts in candlestick format, with the rectangular candle
body drawn between open and close prices. Wick lines extend to the high
and low prices outside the candle body. In color-coded charts, green
candles represent up days where the market closed at a higher price than it
opened, and red candles represent down days. In black and white or
grayscale, down days are darker. See Figure 1 below for an example
plotted with the TradeStation® charting software.
Larger versions of this figure as well as all tables and figures in this book
are available online at truthaboutmacd.com.
Many patterns of candlesticks are studied by traders which are beyond the
scope of this book. Click here to learn more about candlesticks.
To construct a moving average, take each price bar, look back a fixed
number of bars, say 12, calculate the average of all of the past 12 bars, and
plot that average by the price bar.
Two methods of calculating the average are popular. The Simple Moving
Average (SMA) equally weights each bar and takes the arithmetic
average. Most sports statistics are calculated this way: earned run average,
rushing yards per game, etc.
The other popular method is an Exponential Moving Average (EMA)
which weights the more recent bars more heavily than the past bars. This
has the obvious advantage of being more sensitive to recent price, and the
obsolete advantage of being easier to maintain an EMA on a chart by hand.
One more piece of background information: one of the earliest and most
popular technical signals was the crossover of two moving averages. For
example, when the 200-day simple moving average crosses up through
(i.e. surpasses from below) the 50-day simple moving average it is called
a Golden Cross, which is rumoured to be a buy signal for institutional
investors. Similarly, when the 200-day plunges below the 50-day SMA it
is called the Death Cross.
MACD Basics
This section covers the MACD in two ways. First it describes the basic
signals of the MACD roughly following the story of their evolution. Then
it walks through those same basic signals in order of their appearance in
example stock price movements.
The first thing to know about MACD is what the acronym stands for:
Moving Average Convergence Divergence. That’s too much of a
mouthful for polite company so let’s just use MACD. All the letters in its
name are often spoken – “M-A-C-D”, although “Mac-D” is easier.
The basic idea to keep in mind about the MACD is that it started as a way
to anticipate a Moving Average crossover and jump ahead of other traders
waiting for the MA crossover signal. MACD anticipates MA crossovers
by tracking how the two exponential moving averages come together
(converge) and drift apart (diverge).
The MACD Line tracks the relative position of two moving averages by
measuring the difference between them. See Figure 2 below.
As the EMAs move together the MACD line converges or moves towards
zero. MACD approaches zero from the above when anticipating a sell
signal and comes up from below for a buy signal.
Figure 2- MACD with dotted lines added to mark EMA crossovers
and MACD zero crossings. Created with TradeStation. ©
TradeStation Technologies, Inc. All rights reserved. (Click here for
larger figure.)
The MACD Line crosses zero at the exact same point as the MA
crossover, as illustrated in Figure 2 above. When the MACD Line is
above zero, the MAs have crossed over into the bull market configuration
of the fast MA above the slower MA. When the MACD Line is below
zero, the MAs are in the opposite bear market configuration. In this way,
MACD functions as a trend-following indicator.
MACD as Oscillator
The “D” in MACD stands for divergence, but it is not the divergence you
seek. As the MACD Line moves away from zero, it shows that the
underlying moving averages are moving further apart. That is all. The
more important MACD Divergence is described in the Advanced MACD
Signals section below.
If the MA crossover was all we wanted, we could just stick with the two
MAs and call it good. In fact, some traders do exactly that. But,
remembering the intent is to anticipate the crossover, MACD gives
definite signals in advance of the crossover. In addition to the zero
crossing, three more ways evolved to interpret MACDs, each giving
progressively earlier signals.
Figure 3- MACD Line and its Signal Line. Created with TradeStation.
© TradeStation Technologies, Inc. All rights reserved. (Click here for
larger figure)
When the main MACD Line crosses up through the MACD Signal line, it
was originally said to indicate a buying opportunity. To be meaningful at
all, the MACD must be below zero (indicating an oversold market) at the
time of the crossover. When the MACD crosses down through its signal
line, it was originally considered a sell signal, especially when it happened
above the zero line which indicates an overbought market.
The crossing of the signal line gives advance notice of a potential moving
average crossover as illustrated in Figure 4.
Figure 4 - Relationship between MACD Lines and MAs. Black line is
12-day EMA, brown is 26-day EMA, blue is MACD, and purple Signal
line. Created with TradeStation. © TradeStation Technologies, Inc.
All rights reserved. (Click here for larger figure.)
To catch an even earlier signal, be there when the MACD line turns. With
the naked eye, it’s easier to see the turning point drawn as a histogram.
Figure 5 shows a histogram plot highlighting the uptick before the MACD
Lines cross.
Figure 5 – Appel’s MACD Histogram. Arrow highlights a buy signal
as the histogram ticks up from below zero. Created with
TradeStation. © TradeStation Technologies, Inc. All rights reserved.
(Click here for larger figure)
With a histogram you simply compare the height of the current bar to the
previous bar. If the current bar is below zero but dropping less low than
the previous one, it can be considered a buy signal. If the current bar is
above zero and shorter than the previous, it can be considered a sell
signal.
Here’s where things get a little crazy: Two different MACD histograms
float around in the world.
Mr. Appel draws a histogram under the MACD line representing the
difference between the two moving averages. From here forward, let’s
call this Appel’s histogram. Most texts and some prominent web sites
describe the MACD Histogram in this manner.
However, most chart packages and texts actually calculate the MACD
Histogram another way. They plot the histogram as the difference
between the MACD Line and its Signal Line. Let’s continue to refer to
this as the MACD Histogram, a.k.a. MACDH.
You can tell which kind of histogram you have on any chart by looking at
how the zero crossings of the histogram relate to the zero crossings of the
MACD lines. If the bars in the histogram cross zero at the same time as
the lines cross zero, it is Appel’s histogram. If, however, the bars cross
zero when the MACD lines cross each other, then it is the MACDH.
When you see a histogram on a chart, take a quick moment to check what
type, so you know if you’re getting the early signal or the later one. You
can use the results from this report to see the performance track record of
both types of histogram.
With either histogram, remember the main point is to see when the bars
change direction. In fact, a change in direction of the MACD Histogram is
the first MACD signal to emerge in a trend change.
Just because the MACD Histogram changes direction, it doesn’t mean that
the price trend will reverse. There is the rub. In general, the more
sensitive or fast a signal is, the more false or fruitless signals it gives.
MACD Settings
The MACD can be calculated on any two moving averages. The standard
values are 12-day EMA, 26-EMA, and 9-Day EMA of MACD to create
the Signal Line. The backtesting in this book was done with these
standard settings, plus a few selected alternates.
A trader could use smaller EMA values in the MACD to get quicker
signals and more of them. Use longer EMAs to slow things down.
To recap, in the idealized case where the market moves from low to high
and back, the MACD signals appear in the order shown in Figure 7 below.
To see Figure 7 larger and animated as I talk through each signal of the
MACD, check out the bonus video for book owners by registering at
truthaboutmacd.com.
1. Sometimes before the price even moves up, the MACD Histogram
ticks up. By ticks up I mean today’s bar is less negative than
yesterday’s bar. This says that the MACD Line and its Signal Line
moved closer together.
2. Appel’s histogram ticks up. This says that MACDL moved moving
up, which means that the EMAs on the chart moved closer together.
Not that EMAs themselves are moving up, but just that they are
closer together now than last bar.
3. The MACD Line crosses its Signal Line. This isn’t really tied to
anything on the chart – it’s just a way of slowing down signals from
Appel’s histogram. The other thing that happens at this same time is
MACD Histogram crosses zero. That’s only tied to an abstract
mathematical construct as well – a second cousin to price if you will.
Where price is the thing, the EMAs are first cousins, the MACD
Lines second cousins, and the MACD Histogram third cousins.
4. This signal is the missing link – it’s the MACD Lines crossing zero
which correspond to the original EMAs crossing each other. At this
time, Appel’s histogram crosses zero too.
In this example, which is why I chose it, the price keeps rising as the
MACD signals progress and then it starts down. We see the same order
of signals on the sell side:
These important signals occur when price hits a new extreme while the
indicator is actually showing a less powerful move. See Figure 8 for a
double positive divergence on both the MACD Lines and MACD
Histogram. In a divergence, price makes a lower low, but at each low, the
MACD reading is successively higher.
Fuzzy Divergences
Market context
Divergent indicator set-up, including parameter settings
Trigger event
To make that objective and measurable, look for MACD lines less than
zero to set the stage for a positive divergence or MACD lines greater than
zero to kick off a negative divergence.
A key question is how far apart must the extremes of price be to count as a
divergence? Based on historical backtesting, more compact divergences
with extremes no more than 50 bars apart performed better than looser
divergences with extremes up to 100 bars apart.
Dr. Alexander Elder, author of Trading for a Living, also requires that
MACD Histogram divergences “break the back of the bear” (or bull).
What this means in the case of a positive divergence is that the MACD
Histogram starts out below zero at the first price low, and in the bounce
makes it up above zero before price hits the second price low. See Figure
10 for an example of a situation where the MACD Histogram does NOT
break the back of the bull.
The back-breaking behavior screens out lessor price moves and reduces
the number of divergences. For MACD Histogram this is necessary to rule
out divergences on lessor price moves. MACD Lines very rarely break the
back across zero and considering the slope of the lines serves to identify a
reasonable number of divergences.
Trigger Event
A situation may have all the other parts to lay the groundwork for a
divergence:
But only if the price actually closes up for at least one bar do you have a
divergence.
Anticipating Divergences
As you become familiar with divergences you can spot many charts that
could produce a divergence if price makes a certain move. Be very
careful! The divergence might never materialize.
If you’d like more detail on this baseline of the stock market presented in
this chapter, you can download a free report from
www.backtestingreport.com/BackTestingReportBaseline.pdf
Although most traders agree that backtesting is useful, many people don’t
do it because of the time, expense, and expertise required. This book can
give you a leg up on the markets without doing all the work yourself.
Picking entry strategies, which have win rates above the baseline, is a good
start. Also use win rate as a hint on the ease of following a system. For
example, consider if you can really stick to a trading plan that only wins
10% of the time. Most importantly, remember that win rate alone doesn’t
determine if a strategy is profitable – the size of the wins and losses
matters, too.
Most complete strategies have two types of exit tactics: taking profits and
stopping losses. To keep the exploration to a manageable size, first we
compare profit-taking without stops, with the same criteria to sell the stock
as to buy the stock. This also gives a fantastic what-if scenario to see what
can happen if you run without limiting risk. Next we add stops losses and
compare them both to the stop-less run and to each other. Keep the
following criteria in mind while comparing different exit strategies.
Expectancy versus Percentage Gain
Most investors and many traders are used to measuring their performance
in terms of percentage gain. Compound annual growth rate is a very
meaningful metric when applied to a whole account or portfolio of
investments.
(loss_rate * avg_loss)
The solid aqua lines highlight simulated profitable trades and the hot pink
lines simulate losses. As Figure 11 demonstrates, according to the
baseline strategy, if the market goes up during the trade, a profit is
counted. If not, it is a loss. Either way, once a trade is over, a new one is
entered without any decision-making.
The purchase price of the trade is assumed to be the opening price the day
the trade begins. The sales price is assumed as the closing price on the day
the trade ends. Slippage – the possibility that one’s own order affects the
market price – is neglected.
Over a decade of data went into the creation of the baseline. 14 years to be
exact, spanning May 1994 - April 2008. In an effort to prevent over-
optimization, the 14-year period was divided into three samples:
This ten-year period was chosen to include major up, down, and
sideways movements of the stock market.
This full year of data preceded the worst of the credit crisis market
meltdown. However, it was still a down year.
More recent backtest results for the MACD Divergence strategies are also
included in this book, without reference to a baseline.
Stock Lists
The list of 7147 stocks tested for the baseline and subsequent strategy
backtesting consisted of all US stocks and American Depository Receipts
(ADRs) of foreign corporations trading during the time periods above.
This includes delisted tickers, i.e. companies that quit trading on the major
exchanges. A company may be delisted for any of several reasons such as:
Bankruptcy
Stock price below the exchange limits
Merger
Going private
Don’t assume that all delisted companies depress the performance data.
Mergers and leveraged buy-outs have been known to run up the price
before the ticker is delisted.
The historical data used for the baseline and backtesting was purchased
from CSI (www.csidata.com) and read by the TradeStation backtesting
engine. Dividends were ignored.
Commissions were calculated at $0.01 per share each way. For the
baseline, the trade size was always 1000 shares. So the commission was
$20 round trip.
I modeled the Active Investor with a holding time of 200 trading days.
(Click here for larger table 2.)
The results to beat for position traders are shown in Table 3 below.
(Click here for larger table 3.)
Instead a swing trader is ready with a quick exit the moment the trade goes
the other way. Given the shorter time span, swing traders need entry and
exit strategies that pounce on the opportunities to get in, capture profits,
and get out all the while minimizing the inevitable losses.
Advanced traders who are pessimistic about the market may choose to sell
short. In this type of transaction, the stock broker arranges the loan of
shares of the ticker of interest. The short-seller then sells the shares on
loan with the intent of buying back the same quantity of the same ticker
once the price has decreased.
The object is still the same: buy low and sell high. However, the order is
reversed to first sell high, then attempt to buy low.
If the stock price doesn’t fall, or worse the price rises, the short-seller is
forced to take a loss. Note that the potential loss of a short sale is
theoretically infinite because the stock could continue to rise to the sky. In
practice, the broker monitors the account margin and forces the client to
end the short sale while they still have funds to cover the losses.
As you can see by comparing the various baseline tables, the long or
regular baseline produced winning trades when the market went up while
the short baseline generally lost. When the market dropped, the short
baseline demonstrated profits while the long baseline did not. Read on to
see how the MACD strategies compared to the baseline.
Chapter 3: Using MACD Divergences to
Find Big Bottoms
This chapter focuses on the aspect of the MACD that produced the best
numbers in my backtesting – the divergences between price and indicator.
In truly obsessive fashion, the pages below take apart the MACD
divergence, trying it with lines and histogram, various settings, and a
smattering of exits.
Here you can find several robust strategies along with data-backed criteria
to help you choose the way to apply MACD that appeals most to you. Oh,
and you can take note of a few pitfalls to avoid as well.
In his Master’s Class, Gerald Appel, the inventor of the MACD, gave
several examples of waiting for a negative divergence to sell. What he
doesn’t tell you, but what is laid out in this chapter, is “Here are the
rewards you might get if you do for wait for a divergence signal.”
I’ve got to admit, early on in my own trading, I understood the concept
rationally but didn’t always wait for the bearish divergences to sell. It
always seemed scary as the price fell away from a high and as the
MACDH started ticking down – I was out of there. Even while coding up
the first negative divergence strategies to test I was shaking my head
believing they wouldn’t turn out and thinking up alternate exits to test.
Boy was I surprised!
Now with years of experience, I hold out even past the first series of
negative divergences. I wait to sell because I believe, based on data, the
negative divergences show up way too soon. A trend often shows a fair
amount of life after negative divergences. Later books in the Beat the
Crash series explore other methods to exit a trade besides MACD
Divergence.
The testing started with timed exits, comparable to the baseline in Chapter
2. Then I tested with symmetric exit signals of negative divergences. The
screenshots below are of the final steps in the backtesting process – bullish
divergence entry strategies with symmetric exit signals of bearish
divergences plus average true range (ATR) stops – because that gives
more realistic insight into how a person might use them.
The MACD Lines (MACDL) rise in between the price bottoms of July
2002 and October 2002, forming a positive or bullish divergence as
illustrated by green arrows added to the TradeStation screenshot of Figure
13. Likewise, the MACD Line declines between price tops of June and
Sept 2003, forming a negative or bearish divergence – note the red
arrows. As it happens in this case, the price continues upward after the
strategy exits.
Contrast the steady and steep price decline in Figure 16, where MACD
Histogram got whipsawed with the double bottom in Figure 17, where the
MACD Histogram positive divergence did signal a significant buying
opportunity.
Another interesting feature of Figure 17 is the gap up on the buy day.
Recall that our end-of-day strategy detects a signal after hours and
schedules a buy on the open the next day. This is the proper way to
backtest with end-of-day data because it prevents us from accidently acting
on a signal in hindsight and calling it foresight. A live trader with intraday
data might get the buy signal in time to act before the close on the same
day. While we can’t test this directly, we can and did post-process the
results data to estimate the opening gaps. See the win rate results for
Swing Traders coming up.
Figure 18 and Figure 19 show this strategy applied to the same 2002-2003
price data on SPY. Notice how the first trade shown is now profitable
whereas before (in Figure 16 and Figure 17) it got stopped out. Also
notice the quick exit on the Oct’02 entry and how that allows the
opportunity to grab another trade at the Mar’03 bullish divergence. This
strategy gives no re-entry signal after that and consequently misses most of
the 2003 bull run.
In addition to the strategies presented above, two other runs applied more
tactics to limit losses in conjunction with ATR stops. It applied to both the
basic MACDL and MACDH divergences. Here’s how it works: The value
of the MACDL or MACDH is recorded on the day of the buy signal. If
the MACD (lines or histogram respectively depending on the strategy)
ever violated its value on the day of the buy signal, the position was sold at
the next day’s open. In the results tables, these are called the MACD Div
Low+3ASym runs.
Time Periods: May 1994 - April 2008, divided into three samples to
prevent over-optimization.
Entry Strategy: Enter any stock with buy signals as described above, and
when volume criterion is met (more than 500,000 shares daily). All entries
are next day via Market on Open orders.
Exit Strategy: Exit all stocks according to the signals described above.
Profit-taking is done next day via Market on Open orders. Stop losses,
where applied, are simulated as stop orders, which may be executed
intraday. This combination doesn’t exactly model a nimble trader who
may grab profits from an exit signal early in a day in which those waiting
for end-of-day miss out due to a sell-off before the close. It does model
end-of-day trading and investment though.
Sizing: Where no stops are involved, size is fixed at 1000 shares. With
stops, the risk amount was fixed at $1000 and the size computed as the
number of shares that would risk $1000 between the anticipated entry and
the stop.
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
As shown in Figure 20, the win rate varies with respect to the baseline for
active investors. In more recent years, the MACD Histogram Bullish
Divergence entries beat the baseline. The MACD Lines Bullish
Divergences did not produce a better win rate than the baseline when held
for 200 trading days in any time period.
Figure 20 – Hypothetical win rates of MACD Divergences for Active
Investors with 200-day timed exit (Click here for larger figure.)
The MACD Bullish Divergence strategies edged past the baseline for
Position Traders as shown in Figure 21 below. The differences are slight.
Figure 21 – Hypothetical win rates of MACD Divergences for Position
Traders with 20-day timed exit (Click here for larger figure.)
The graph in Figure 22 illustrates the win rate performance of the MACD
Divergence trades compared to the baseline. The numbers are rounded in
the graph and Table 7 below shows the exact amounts.
The upshot is that the MACD Divergence trades came in slightly below
the baseline in all but the one case of MACD Histogram divergences in
2007-2008.
Figure 22 – Hypothetical win rates of MACD Divergences for Options
Traders with 5-day timed exit (Click here for larger figure.)
MACD Divergences do not get off to a winning start for swing traders
with a 2 day horizon. We can see in the graph below that the test
strategies perform below the baseline for all three time periods.
Catching the opening gap by entering near the close on the signal day
could be enough to take the win rates over 50%.
Figure 23 - Hypothetical win rates of MACD Divergences for Swing
Traders with 2-day timed exit (Click here for larger figure.)
The table below summarizes the results for all trader types. In general,
potentially profitable strategies have a positive expectancy. Losing
strategies have their negative expectancies colored red. Yellow indicates
that the expectancy was slightly positive, but rounded down to zero –
indicating caution. Expectancies are a very rough guideline at this stage
because we are using timed exits.
(Click here for larger table 7.)
With no stop, we assume the entire position was at risk, and in that case a
9% expectancy implies a 9% return, on average per trade. Again this
doesn’t mean every trade returns 9%, a big loss and even bigger gain could
amount to an average of 9%.
Obviously, bigger is better and you should seek the highest expectancy
within your risk tolerance. A key question is: how much is enough? Only
you can answer that for sure.
As a rough guide, the graphs of expectancy are set up to plot any strategy
on a color-coded gradient with a red zone for losses, cautionary yellow
zone for strategies which demonstrated a very thin edge, and a green zone
for those that performed better. In the graphs below, you’ll notice the
color scale is shifted such that strategies with expectancies just above zero
are coded red because you need more than break-even in this idealized
case in order to show a real-world profit.
The table below summarizes the backtesting results for exit testing. Note
that we compare to 20-day timed exits as the closest to the actual hold
times of the strategies with real exits.
Table 8 – Table 10 collate the data from the exit testing of MACD
Divergence strategies. This data is examined in detail and plotted
graphically in Figure 24 - Figure 27 below. See the following three pages.
(Click here for larger table 8.)
(Click here for larger table 9.)
(Click here for larger table 10.)
Win Rates with Real Exits
Adding real exits of course changes the win rates for each strategy. While
win rate is not as important as expectancy, we still want to know if a
strategy wins often enough to hold our attention and not decimate our
accounts with losses before the winner finally arrives.
It’s not surprising to note that the win rate decreases with the addition of
stops. Nor is it particularly cause for alarm. Adding a stop almost always
reduces the win rate because some trades got stopped out that would have
turned around and later become winners. We’ll miss those but that’s okay.
Graphs of win rates for strategies with exits are shown in Figure 24 -
Figure 26. With 13 strategies under test, the graphs get a little crowded.
The data label closest to and even touching each triangle identifies the
strategy by name. Each data point is presented in the same order left to
right as in the data table, top to bottom.
Let’s reserve final judgment on each strategy until we see the expectancy
and risk factors in the sections below.
The colorful graph above plots the expectancy for all of the exit strategies
under test plus the baseline. Each strategy occupies one space along the
horizontal axis and is in the same order as in the data table.
All the data for one strategy is aligned in a vertical column. As shown in
the legend, each time period has a particular shape to identify its data
point: 1994-2004 is denoted with a diamond, 2004 – 2007 a square, and
2007 – 2008 a triangle. If a shape is not visible, it is hiding behind a larger
shape, which had roughly the same value.
As the data points spread apart from the zero line, they reveal that
increasing risk goes with increasing returns. It’s relatively easy to find
rules and leverage that increases the expectancy in good times but it
usually comes at the expense of a greater negative expectancy when
conditions deteriorate. Look for strategies that go further into the green
zone and less into the red zone than others.
The extreme jump is largely an effect of the change in sizing and risk
calculations. It illustrates how reducing your risk can improve profits
when the right strategy is employed for the market conditions. However
adding stops is not a panacea for a mismatch between strategy and market
conditions as shown by the losses in 2007-2008.
Curiously, the 3ATR stop did slightly less poorly in the 2007-2008
timeframe than the tighter 2 ATR stop. This held true for both the
MACDH and MACDL suggesting that at some point tighter stops
possibly bring more losses by getting caught up in the noise and not
allowing the stock enough room to move. Or this may be related to
the sizing algorithm – see the Maximum Adverse Excursion (MAE)
section below for more details on that.
The Low+3 tactic reduced tough year losses while still retaining solid
profits in good years. It consisted of monitoring the MACD Lines or
Histogram value throughout the life of the trade and exiting if that
value was violated.
Don’t let the technical term put you off, MAE really just means knowing
how much the position went against you. MAE is not the same as the
biggest losing trade because a stock may wander down for a huge open
loss and come back before the exit.
To stay in the game, the MAE needs to stay under the size of your
account. To be successful, the MAE needs to be limited to a fraction of
your account.
Rather unexpectedly, the 2 ATR stop on the Power Tools run had a worse
MAE than the 3 ATR stop. One would think that a wider stop would
necessarily lead to a worse MAE. In this case what happened by looking
at one example trade: a buy signal on STEM at 11/21/07. Both trades
wound up being stopped out when price couldn’t follow through after a
strong gap up opened for a buy price higher than expected.
The difference between the two stop values was in the sizing. Because the
2 ATR stop was closer to the price of the stock than the 3 ATR stop, to
maintain comparable risk amounts on the trades, the size of the 2 ATR
stop trade was 5434 shares versus 3623 shares purchased with a 3 ATR
stop. The larger size is what pushed the 2 ATR stop to a higher MAE than
the 3 ATR stop for that particular trade. With the smaller size, that trade
didn’t even have the worst MAE for the 3 ATR stop. Another trade was
the “winner” of that contest resulting in different per share MAE values
between the 2 and 3 ATR stop runs.
To scale the returns by the risk taken, I use R-Multiples which were
popularized by Dr. Van Tharp (vantharp.com). As the name suggests, the
return is expressed as a multiple of the risk, where an R-Multiple of 1
means the return was equal to the risk. As examples, an R-Multiple of
+5R means the profit was five times the amount risked and an R-Multiple
of -1R means a loss of the amount risked.
In these back-tests R, the amount risked per trade, was always $1000.
Then +5R is $5000 profit while -1R is a $1000 loss. All of the trades from
a run of a particular strategy over a particular time period were sorted into
“bins” which correspond to a bar on the graph. The label of the bin is the
mid-point of its contents so the 0.5 bar represents all trades that returned
between 0 and 1 R. Anything more negative than -1 R means those trades
gapped past their stops or jumped the risk limits due to opening gaps.
For the 2004-2007 results in Figure 33, Figure 35, and Figure 37, the fat
tail of positive R-Multiples is highlighted in green to make it more visible.
The Power Tools strategy has the thickest fat tail – meaning that it had the
most trades with huge profits. However, the other strategies have more
“everyday” trades bringing in 5R or less.
Figure 40 - Results Distributions for MACDL Power Tools with 3
ATR Stop 2007-2008 (hypothetical) (Click here for larger figure.)
An alarming thing happens with both the MACDL Power Tools strategy
and the MACDH strategy: the -1.5R bin is larger than the -0.5R bin
meaning that many losing trades jumped their stops! It’s also possible
that the risk
value was exceeded if the stock gapped up in the morning.
These results are “risk limited” meaning that trades that would have
increased the risk value more than 20% were thrown out (with negligible
impact to expectancy). That leaves many trades where the initial risk
between buy price and stop price grew beyond the set $1000 risk.
Fewer signals
Higher expectancy
More huge winners
Both MACD Histogram and MACD Lines required a trader to let the
winners run for weeks and months to achieve the high positive
expectancies in this backtest. Attempts to exit the MACD Histogram
trades at the first downtick above zero severely limited profits.
A nimble trader that can accurately sense the MACD divergence during
the day it occurs and enter just before the close might have goosed their
expectancy gain by capturing the gaps up on the morning open. No
evidence suggested that this gain affected the expectancy of holding long
term, meaning that the big morning gap up trades had about the same
chance of long term gain as the trades that didn’t gap.
That said MACD divergences did prove out as the most powerful of the
MACD signals.
It is also out-of-sample data, meaning that these time periods were not
considered as part of the previous backtests. That is useful for seeing that
the conclusions held up very well even for a completely different set of
data.
No delisted stocks.
Time Periods: The historical time periods under test started from May 1,
2008. The first divergence was spotted on the weekly charts September 3,
2010 and on the daily charts on March 5, 2009. The end date of the
backtests was April 18, 2014. Note that this time period does not overlap
the previous tests at all so it is completely out of sample data that didn’t
even exist when the previous backtests were run.
Weekly chart or daily chart is indicated in the name in the results Tables
14 – 17.
Entry Strategy: For this simulation, all the entry signals are MACD
divergences.
All strategies in this test used the standard settings of MACD: 12, 26, 9.
The scanner was set to look for compact divergences with at least 6 and no
more than 50 bars between price extremes. The divergence backtesting in
chapter 3 included larger divergences, with 10 to 100 bars between price
extremes.
The names in the results table spell out the type of strategy tested. Here
are the letters in order:
1. M – MACD
2. L or H – Lines or Histogram
3. D – Divergence
4. L or S – Long or Short
5. Z – fuzzy divergence which did not make a price extreme. Fuzzy
divergence entries are exited after 5 bars.
6. Q – quick exit which ends the trade on a MACD lines crossing or
MACD Histogram uptick/downtick. The exit otherwise is a matching
divergence from the entry signal.
Exit Strategy: The exits for long trades are negative divergences. For
example, enter long on MACD Lines positive divergence, exit on MACD
lines negative divergence. Short trades exit on the uptick of either MACD
lines (for MACD lines divergence entries) or MACD histogram (for
MACD histogram divergence entries). Fuzzy divergence entries are exited
after 5 bars. In addition, all trades have a 2.5 ATR stop loss fixed from the
point of entry.
Sizing: Trades are sized with a constant $100 risk from expected entry
price to stop price.
BackTest Results
The US Stocks (USTKS) and Dow Jones Indices (DJIS) top the list. ETFs
as a group are challenged to produce profits one way or the other because
they contain both regular and inverse funds.
The largest gains came from waiting for a negative divergence to exit.
Taking the Quick exit (MACD lines cross up or MACD Histogram uptick)
as in the Q strategies or exiting after five trading days as the fuzZy strategy
does, led to reduced profits.
A few profitable strategies managed a win rate over 60%, however, most
came in between 40% and 55%. The highest win rate of 72% came from
entering a Dow Jones Index on a MACD Lines positive divergence and
exiting when the MACD lines crossed down from above zero on a daily
chart. This quick strategy was backtested on index data however tradable
ETFs exist that track those indices.
The strategies that weren’t profitable during this backtesting session were
mostly trading in the short direction, as shown in Table 15 below. Note
that Table 15 is sorted by decreasing expectancy so the worst performers
are at the bottom. Those strategies traded short on a negative divergence
on the weekly chart and covered when the MACD lines crossed upwards
for MLxS strats or when the MACD Histogram made an uptick for MHxS
strategies.
Notice that the win rates of the unprofitable strategies are all under 50%
and generally under 40%.
(Click here for larger table 15.)
The large MPE numbers for the weekly strategies compared to their
average gains indicate that they gave back considerable profits waiting for
a negative divergence to exit.
In general, the more recent backtests confirmed the earlier conclusions that
trading long on positive MACD divergences could be profitable while
trading short on negative MACD divergences did not produce encouraging
results.
1. Watch your favorite stocks and when you see a MACD positive
divergence, consider jumping on it. This might happen once or twice
a year.
2. Scan the broad market for MACD positive divergences on any stock
or more realistically any stock that meets your pre-set criteria of
volume, fundamentals, etc. To scan the market, you again have two
choices:
This chapter describes how the DCI can be used to identify potential
turning points and reports on backtesting to assess the historical
performance of DCI.
Basic Categories of DCI
The DCI tracks the number of divergences that occurred on each day for
daily charts and each week for weekly charts. The INTRAS divergence
count, covered in the next chapter, focuses of intra-day count, specifically
hourly charts. On the general chart shown in Figure 46 below, the positive
divergence count is plotted below the daily prices for the SPY.
The middle pane was created from data from CSI – including delisted
tickers – running the basic MACD Lines Divergence (MACDL Div) scans
that were used in the previous chapter.
The bottom pane is the USTKS data – created from TradeStation historical
data running the MACD Divergence Alerts scans for MACD Lines
Divergences. The “U” data does not contain delisted tickers.
Once again, the top plot is SPY, and the bottom plot is created from a
count of MACD Lines Divergences on TradeStation with data from CSI.
M for MACD
Strategies Considered
Again, by inspection it was clear that this strategy was very similar to
looking at MACD Divergences on the market indices. No advantage from
counting divergences expected here.
The approach was to apply a simple moving average to smooth the raw
counts of positive and negative divergences. Then look for favorable
times to buy based on peaks in the positive divergence count and/or
troughs in the negative divergence count. Sells signals and signals to sell
short were not considered in this first pass.
One advantage to this approach is that it’s relatively easy to create
objective signals.
The back testing actually began with an examination of the MACD Lines
Negative Divergence Counts on daily charts (UMLND and CMLND for
TradeStation and CSI respectively).
The basic idea behind the strategy is that times when the negative
divergence count drops very low might be a good time to buy. To quantify
this, the “buy zones” are defined as the 20-day moving average (MA) of
negative divergence counts being below 5. Let’s call these the N-Zones.
See Figure 48 for the N-zones marked with green dots when the MA falls
below threshold.
Figure 49 below shows the converse case for creating buying zones from
the MACDL positive divergence count. We can call them P-Zones.
To create the P-Zone, a 20-day moving average (MA) of the MACD Lines
positive divergence was taken. The zone is defined by the MA crossing up
above the threshold value of 10 – then the buying on MACDL positive
divergences can begin. The zone ends when the MA crosses down below
10.
Obviously neither P-Zones nor N-Zones are perfect – both produced open
buying zones during the spring of 2008, and in hindsight we know the
market had further to fall. Trading during the DCI zones still carries
significant risks and stop losses are recommended.
We also consider All-Zones, which is the union of the P-Zones and the N-
Zones. As illustrated in Figure 50, the buying window is open if either the
count of negative divergences drops below its threshold of 5 or the count
of positive divergences rises above its threshold of 10.
Figure 50 – DCI N-Zones and P-Zones plotted together. Created with
TradeStation. © TradeStation Technologies, Inc. All rights reserved.
(click here for larger figure.)
Backtest Setup
The back test setup and results presentation are similar to Chapter 3.
Those exact trades were then filtered for P-Zones and N-Zones as
described in this report. The total number of zones tested is just above the
minimum of 30 required for a valid sample:
P-Zone = 46
N-Zone = 32
All-Zones = 78
Time Periods: May 1994 - April 2008, divided into three samples to
prevent over-optimization.
Entry Strategy: Enter any stock with buy signals as described above, and
when volume criterion is met (more than 500,000 shares daily). All entries
are next day via Market on Open orders.
Exit Strategy: Exit all stocks according to the signals described above.
Profit-taking is done next day via Market on Open orders. Stop losses,
where applied, are simulated as stop orders which may be executed
intraday. This combination doesn’t exactly model a nimble trader who
may grab profits from an exit signal early in a day in which those waiting
for end-of-day miss out due to a sell-off before the close. It does model
end-of-day trading and investment though.
Sizing: Where no stops are involved, size is fixed at 1000 shares. With
stops, the risk amount was fixed at $1000 and the size computed as the
number of shares that would risk $1000 between the anticipated entry and
the stop.
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
As you can see from Figure 51 – Figure 54 below, the P-Zones and N-
Zones helped the win rates considerably. The out-of-sample period of
1994 -2004 not only confirmed but exceeded the performance of the time
periods used for development.
The longer term holding periods benefited the most from the buying
zones. The advantages to short term traders tended to be smaller and less
consistent.
The N-Zones more consistently increased the win rate than the P-Zone
did.
Figure 51 - Win Rates for buying during DCI open windows and
holding for 200-days show improvement in all time periods
(hypothetical) (Click here for larger figure.)
Figure 52 - Win Rates for buying during DCI open windows and
holding for 20-days generally show improvement in all time periods
(hypothetical) (Click here for larger figure.)
Figure 53 - Win Rates for buying during DCI open windows and
holding for 5-days mixed results (hypothetical) (Click here for larger
figure.)
Figure 54 - Win Rates for buying during DCI open windows and
holding for 2-days generally show decrease in all time periods
(hypothetical) (Click here for larger figure.)
(Click for larger Table 18.)
(Click for larger Table 19.)
(Click for larger Table 20.)
(Click for larger Table 21.)
The entry signals continue to be filtered by the DCI. The strategy only
buys when there is a positive MACD divergence on the individual ticker
and the broad-market DCI zone is open. The three sets of zones (P-, N-
and All-) were tested independently.
In Figure 55, the DCI-filtered results (column 2-4) are compared to the
Baseline from Chapter 2 (column 0) and the MACD Lines Divergence
with 100-day lookback from Chapter 3 (column 1). The No Zone results
(column 5) are MACD Divergences with a 50-day lookback and no DCI
filter applied.
The data from the back tests using 3 ATR stops shows the clear advantage
of the DCI zones because the DCI expectancies in columns 2-4 are all
shifted upwards. This means that in the favorable markets the DCI
strategies showed more positive expectancies.
In the less favorable market of 2007 – 2008, the expectancies are less
negative, with the N-Zone expectancy even venturing into the positive
realm.
The average gain per trade (not annualized) is shown in Table 22 – Table
24. In general, the DCI zones improved on the average gains. The one
exception in 2003-2007 stemmed from a single 200% winning trade,
which fell outside the DCI zones.
The number of trades showed a dramatic reduction for the different zones.
With DCI, the trades are no longer distributed evenly throughout the test
period but instead clustered with start dates within the buying zones. The
end dates could be anywhere as the exit signals used for this set of back
tests was not tied to DCI zones.
(Click here for larger table 22.)
(Click here for larger table 23.)
(Click here for larger table 24.)
The win rates for the DCI zones with stop losses are shown in the
following three graphs, Figures 56 - Figure 58. It is not unusual for stop
losses to push the win rates under the baseline.
Figure 56 – Win Rates for DCI Exit Testing, 1994 – 2004
(hypothetical) (Click here for larger figure.)
Remarkably, the N-Zone win rate was above the baseline for 2004 – 2007
as shown in Figure 57 below.
All other win rates were below the baseline, which was typical for MACD
Divergence strategies.
Figure 57 – Win Rates for DCI Exit Testing, 2004 – 2007
(hypothetical) (Click here for larger figure.)
Figure 58 – Win Rates for DCI Exit Testing, 2007 – 2008
(hypothetical) (Click here for larger figure.)
For the Symmetric runs, the DCI Zones produced win rates over the
baseline in all cases as shown in Figure 60 – Figure 62, below.
Figure 60 - DCI Exit Testing, No Stops, 1994 – 2004
(hypothetical) (Click here for larger figure.)
The N-Zone, where the moving average of negative divergences fell below
the threshold, showed the most improvement. The P-Zones, where the
moving average of positive divergences increased above the threshold,
also delivered better results than either the baseline or the plain MACD
Divergence strategies.
Both N-Zones and P-Zones severely limit the number of trades. Actively
using both the N-Zones and P-Zones, a process nicknamed the All-Zones,
produced the largest number of trades while still dramatically improving
results.
Short term trading such as options or swing trading did not appear to be
particularly helped by the DCI Zones.
1. Count all MACD Lines Divergences across the stock market, each
and every day
2. Plot 20-day moving averages of the negative divergences and the
positive divergences
3. Consider longer-term purchases on the stock market when the MA of
negative divergences is below 5 and/or the MA of positive
divergences is above 10.
4. Use smaller trade sizes and stop losses to manage risk.
The time scale I use is a 60-minute chart. The scans run automatically
during the regular trading hours at the bottom of the hour: 10:30, 11:30,
etc.
The stock list contains the component stocks of the Standard & Poor’s
S&P 500® index, plus the underlying ETFs and stocks from the CBOE®
list of options with weekly expiration. This amounts to about 550 tickers
to scan each hour.
For each day in that period, the movement in the S&P 500 Index as
tracked by the SPY exchange traded fund was recorded over the next four
days in percentage terms. For a simplistic example, say the SPY went up
1% each day for four days. Then we’d have a Day1 gain of 1%, Day 2 of
2%, Day 3 of 3%, and Day4 gain of 4%.
Seven scans run during the trading day and the maximum number of
positive divergences in any one of those hours became the metric for the
analysis.
The plot below in Figure 63 shows the gain or loss after four trading days
corresponding to the maximum number of positive divergences each day.
Figure 63 - Scatter plot of % gain after 4 days versus number of
positive divergences on 60 minute chart (hypothetical) (Click here for
larger figure.)
With 550 stocks in the scan set, 85 makes 15% of the stocks scanned
showing divergences. As you can see from the graph, only one day in four
and one-half years had over 300 (60%) stocks with divergences.
The Baseline column shows the expectancy for the complete historical
data set. The market’s upward bias during this time becomes evident from
the fact that holding for two trading days produced a positive expectancy
of 1.1% and holding for six trading days produced a positive expectancy of
slightly more – i.e., 1.6%.
Based on this sample, a strong market may follow on the heels of days
with high numbers of positive divergences on the 60-minute charts, but
shorting the market after high numbers of negative divergences on the 60-
minute charts is not likely to pan out.
So far this book has covered strategies that showed promise based on
historical backtesting, namely various forms of positive MACD
Divergences.
In case you only want to read about the more useful techniques, this may
be a good place to discuss resources that can help you put MACD
Divergences to use.
Divergence-Alerts.com
My divergence-alerts.com website offers comprehensive reporting of
MACD Divergences of all forms:
Anticipating Divergences
M for MACD
At the right side of Figure 65 you can see RadarScreen® working with the
MACD Divergence Detectors to monitor many stocks for divergences in
real time.
TradeStation clients can try out this software for free within the
TradeStation App Store at
https://tradestation.tradingappstore.com/products/MACDDivergenceDetector
Related Reading
The author’s current reading list is posted at
http://backtestingblog.com/order/books/
A short seller must borrow shares of stocks or ETFs which the brokers
make easy to do. The borrowed shares are then sold at the current market
prices. That is the short sale.
If the market goes down, the trader buys shares at the prevailing lower
prices and pockets the difference. The newly purchased shares are used to
automatically repay the loan that facilitated the short sale. This is called
“buying to cover”.
But what if the market doesn’t go down? A short trade can theoretically
lose an infinite amount of money as the stock price rises. Even without
reaching that theoretical maximum an open short can wipe out a trading
account.
As the market goes up, the short seller experiences an open loss. The
broker may require more collateral for the borrowed shares. If that
requirement exceeds the size of the account, the broker may close out the
trade, or issue a margin call requiring the trader to add more money to the
account.
When a trader buys back at a price higher than they sold short, either of
their own volition or at the hands of the broker, a loss is debited against the
account.
The second trade went much better as the price dropped significantly.
That trade ended on the positive divergence marked with the green arrow
drawn over the MACD.
You may notice that the MACD sunk lower throughout early 2000. The
strategy waited for the price to actually close at new highs before entering
the trade. This served to weed out “false” sell signals.
The second entry method relies on the ADX indicator to select “trendless”
markets before searching for MACD divergences. The thinking here is
that because many uptrends don’t cave in at the first negative MACD
divergence, the ADX can be used to give an indication that the uptrend has
weakened and a reversal more likely. The backtesting runs show how this
compares to using MACD divergence alone.
Figure 67 is a chart of the same time in history as Figure 66. The ADX is
plotted below the MACD indicator. The rule is that the strategy only sells
short on negative MACD divergences if the ADX is below 20 to indicate a
trendless market.
Quick exits on MACD lines cross upwards below zero and MACD
Histogram uptick.
May 1994 - April 2008, divided into three samples to prevent over-
optimization:
Entry Strategy: Enter all stocks according to the MACD and ADX signals
described above, when volume criterion is met (more than 500,000 shares
daily). All entries are next day via Market on Open orders. All runs
comparing entry types used the de-facto standard settings of 12-26-9 (fast-
slow-signal).
Sizing: Where no stops are involved, size is fixed at 1000 shares. With
stops, the risk amount was fixed at $1000 and the size computed as the
number of shares that would risk $1000 between the anticipated entry and
the stop.
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
For longer term holding periods which model active investors most short
strategy win rates were directly opposite the long baseline. See Figure 68.
When the long baseline won more often than not, i.e. 1994 – 2004 and
2004 – 2007, the short strategies did not produce a winning record. On the
other hand, when the market turned down in 2007 – 2008, the short
strategies come in winners more than 60% of the time.
A glaring exception that struggled in all time periods was the addition of a
5 ATR stop loss to the basic short selling strategy plotted as the rightmost
bar in Figure 68 - Figure 70. Its poor performance in the 2007-2008
timeframe indicates that even in a favorable market environment a short-
seller might face an unendurable open loss.
Figure 69 – 20-day timed exits from short sales on negative MACD
divergences (hypothetical) (Click here for larger figure.)
The final run in this series used timed exits of 2 days. Note that the scale
in Figure 70 is much tighter than that of Figure 68 and Figure 69. That
makes it appear as though the results were spread out more than they really
were. Actually, it is only a slight difference among the win rates with 2-
day exits however it demonstrates the same pattern of running opposite to
the long baseline.
Figure 70 – 2-day timed exits from short sales on negative MACD
divergences (hypothetical) (Click here for larger figure.)
Again, the short strategies with quick exits fared better than waiting for a
positive divergence to exit.
12-26-9
19-39-9
6-19-9
In addition Mr. Appel’s method of using the slope of a moving average to
choose the parameter settings for the MACD was also tested.
Time Periods:
May 1994 - April 2008, divided into three samples to prevent over-
optimization:
Entry Strategy: Enter all stocks according to the MACD lines and
histogram signals described above, when volume criterion is met (more
than 500,000 shares daily). All entries are next day via Market on Open
orders. All runs comparing entry types used the de-facto standard settings
of 12-26-9 (fast-slow-signal). The MACD parameter settings, which were
tested separately, were (fast-slow-signal): 12-26-9, 19-39-9, 6-19-9
Exit Strategy: Timed Exits of 2 days, 20 days, 200 days, chosen as the
simplest way to make a baseline for popular Trader Types. It exits via
Market on Close orders.
Backtesting Engine: TradeStation version 8.3, Build 1631 and Build 1634
(for Appel Histogram only)
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
This chapter focuses on Win Rate, which is the metric to beat for entry
strategies in similar exit conditions. Three time periods are tested
separately to help guard against curve fitting.
Active Investors
The most notable results in this chapter’s backtests came from adding the
200-day moving average (MA) as a filter and only buying stocks when
they are priced above the 200-day MA and have an uptick on the MACDH
from below the zero line.
Figure 76 – Win rates of non-divergence MACD signals with 200-day
timed exits, 1994 – 2004 (hypothetical)(Click here for larger figure.)
Figure 77 – Win rates of non-divergence MACD signals with 200-day
timed exits, 2004 – 2007 (hypothetical) (Click here for larger figure.)
Figure 78 - Win rates of non-divergence MACD signals with 200-day
timed exits, 2007 – 2008 (hypothetical) (Click here for larger figure.)
(Click here for larger table 29.)
Other than that, varying the parameter settings for the MACD Histogram
didn’t make much difference in the win rates. See Figure 79 - Figure 81
below.
Figure 79 – Varying parameter settings for MACD Histogram entry
signals, 1994 – 2004 (hypothetical) (Click here for larger figure.)
Figure 80 - Varying parameter settings for MACD Histogram entry
signals, 2004 – 2007 (hypothetical) (Click here for larger figure.)
Figure 81 - Varying parameter settings for MACD Histogram entry
signals, 2007 – 2008 (hypothetical) (Click here for larger figure.)
(Click here for larger table 30.)
Position Traders
As it turns out, the tests for MACD were inconclusive for position traders.
All entry tactics and all setting performed about the same in terms of win
rate. See Figure 82 – Figure 84.
Figure 82 - Win rates of non-divergence MACD signals with 20-day
timed exits, 1994 – 2004 (hypothetical) (Click here for larger figure.)
Figure 83 - Win rates of non-divergence MACD signals with 20-day
timed exits, 2004 – 2007 (hypothetical) (Click here for larger figure.)
Figure 84 - Win rates of non-divergence MACD signals with 20-day
timed exits, 2007 – 2008 (hypothetical) (Click here for larger figure.)
All flavors of the MACD tested out roughly the same as each other and
only slightly better than the baseline for Position Traders.
See Table 31 for the complete results for position traders. Remember,
expectancies are a very rough guideline at this stage because we are using
timed exits.
(Click here for larger table 31.)
The various settings for MACD Histogram came out about the same for
position traders. See Figure 85 – Figure 87. During 2007-2008, they all
did a little better than the baseline, perhaps saving a few losses during
these down years.
The real test of the trading strategies is adding exits to see if expectancy
improves by producing larger gains and smaller losses due to the MACD
Histogram signals. This is the topic of the next chapter.
Figure 85 - Varying parameter settings for MACD Histogram entry
signals 20-day timed exits, 1994 – 2004 (hypothetical) (Click here for
larger figure.)
Figure 86 - Varying parameter settings for MACD Histogram entry
signals 20-day timed exits, 2004 – 2007 (hypothetical) (Click here for
larger figure.)
Figure 87 - Varying parameter settings for MACD Histogram entry
signals 20-day timed exits, 2007 – 2008 (hypothetical) (Click here for
larger figure.)
(Click here for larger table 32.)
Swing Traders
The clear leader of the MACDs for the swing trader is the combination of
price above 200-day moving average (MA) and MACD Histogram uptick,
which beat the baseline in all three test periods. This is consistent with
other backtesting experiments where the addition of the 200-day MA
screen improved the win rate.
Figure 88 - Win rates of non-divergence MACD signals with 2-day
timed exits, 1994 – 2004 (hypothetical) (Click here for larger figure.)
Figure 89 - Win rates of non-divergence MACD signals with 2-day
timed exits, 2004 – 2007 (hypothetical) (Click here for larger figure.)
Figure 90 - Win rates of non-divergence MACD signals with 2-day
timed exits, 2007 - 2008 (hypothetical) (Click here for larger figure.)
Table 33 summarizes the MACD entry type results for swing traders. Win
rates might improve by using MACDH with fast (6,19,9) settings and a
200-day MA filter to get buy signals.
(Click here for larger table 33.)
MACD Parameter Settings for Swing Traders
This chapter tested several different MACD entry styles and parameter
settings other than divergences.
Better results came from taking the earliest buy signal – the MACD
Histogram uptick. Adding a 200 day MA to screen for stocks in an
uptrend improved the win rates for active investors and swing traders.
Overall, position traders didn’t get much benefit from the MACD in any of
the configurations tested. Swing traders did better with faster settings: 6-
19-9 performed well in these tests. Otherwise, the parameter settings did
not significantly affect the results.
Win rates were in the 50-60% range predicted by Mr. Appel, who also
attributes to the MACD larger wins than losses.
The next chapter on MACD exit strategies compares expectancies for the
different MACD strategies. It is wise to withhold final judgment until all
the data is in.
Chapter 9: Catching the Wiggles with
MACD Sell Signals
This chapter is the second in the series about non-divergence MACD
signals. The previous chapter explored buy signals and this one explores
the sell signals. It helps us find out if non-divergence MACD signals can
be profitable, and if so, which exit type out-performed the others.
In setting up the backtests for this chapter, I got mired in the nuances of
MACD exit signals. While the isolated events of MACD Histogram
ticking up/down and lines crossing up/down are objectively obvious, the
actual usage can be quite subjective, especially when using different
parameters for entries and exits.
For example, when you buy on a 12-26-9 MACD Histogram uptick, the
19-39-9 MACD Lines may still be above zero. Do you require them to dip
below zero and rise again before accepting an exit signal from them, or
not?
A human trader may not be consistent in cases like this, but instead wait
for a full cycle in strong markets and be quick on the trigger in weaker
times. The backtest forces consistency so we choose a rule and live by it
in all situations.
It’s tempting to try out many little twists during the backtests to eke out
more gains. However, any one special usage may be the result of chance
and not repeat in the future, especially when the stats come out very close.
Keep in mind while reading this chapter that even Gerald Appel, the
inventor of the MACD, recommends using other strategies along with the
MACD. Ultimately our trading strategies must do that too but first we test
each piece independently to find out how it might contribute to the overall
operation.
The goal of this chapter is to help you decide whether to incorporate basic
MACD strategies into your trading plan. In general, the MACD
divergence strategies discussed earlier in the book performed better.
Unless otherwise stated, tests in this chapter were run with the MACD
Histogram Uptick with price above the 200-day moving average. Also
unless stated otherwise, all runs used the de-facto standard settings of 12-
26-9 (fast-slow-signal). This entry proved to have a decent win rate,
although it was not always the most reliable entry signal for all trader
types. For more details on how to correctly identify this entry see Chapter
8, Figure 75.
The first experiment in this report compared several exit signals given by
the MACD:
Symmetric to Entry: exit when the 12-26-9 MACDH ticks down and
is above zero
Slower Exit: exits when the 19-39-9 MACDH ticks down and is > 0,
(with a 12-26-9 entry)
Gerald Appel Power Tools: basic decision structure from Mr.
Appel’s book, uses Appel’s histogram but without indicator/price
divergences or other chart patterns
Lines Cross: exit when the 19-39-9 MACD lines cross down and are
above zero
In this example, both the faster and the slower histogram tick down at the
same time, showing no real difference in the exits. In fact, that happens
quite a bit. Visual inspection of several charts gives the impression that
the settings impact the zero crossings of the MACD Histogram, which are
the same as the lines crossing. This change in the settings doesn’t appear
to make much difference in the MACD Histogram uptick/downtick
timing. But don’t go by visuals alone, read backtest results for a larger
sample size.
The “Power Tools” book by Gerald Appel offers complex instructions for
trading with the MACD along with other techniques. In this test, we
isolate the basic MACD-related rules. The case where price diverges from
the indicator is not implemented in this run. This strategy uses the “Power
Tools” entry method, which selects different parameter settings for
Appel’s Histogram upticks based upon price being above or below the 50-
day Exponential Moving Average (EMA). Looking very closely, you can
also see that the parameter settings make a more distinct impact on
Appel’s Histogram than MACD Histogram.
The trade-off for the Power Tools strategy is evidenced by the Oct
whipsaw as the strategy entered below the 50-day MA, only to be stopped
out when Appel’s histogram ticked down signifying that the MACD lines
reached lower than at the entry price - a rule in the book.
MACDH_MA_Lines_12-26-9
Figure 98 - Strategy which buys when MACDH 12-26-9 ticks up (and
lines are below zero) and sells when MACD 12-26-9 lines cross down
(and are above zero). Created with TradeStation. © TradeStation
Technologies, Inc. All rights reserved. (Click here for larger figure.)
The final strategy tested without stops is illustrated by Figure 98. The aim
of this strategy was to attempt to let winners run longer by waiting for the
MACD lines to cross downward while above zero. To avoid pre-mature
exits, that means waiting for the lines to go below zero before entering.
The side effects are shown above: no re-entry when the trend resumes in
Jul - Sept but a better enter point in the Oct timeframe by waiting for the
stock to be oversold as indicated by the lines under zero. Backtesting
results can illustrate the net effect of that trade-off.
The first set of runs above experimented with different ways to let profits
grow. The second section experiments with ways to limit losses. For this
series, the MACDH_MA200_Sym1939 served as the basic strategy and
three different kinds of stops were pitted against each other. The stop
types and parameter variations were:
%: 3% and 9% of price
ATR: 2 and 3 times the average true range (ATR)
Histo-stop: a downtick of the MACDH from the entry price
Rather than taking a fixed number of shares and almost unlimited risk as
we do with no stops, setting a stop gives an opportunity to have a fixed
risk on every trade by varying the number of shares. If we assume a
hypothetical $100,000 account and risk 1% of that account on each trade,
that amounts to risking $1000 per trade. The risk is considered the dollar
amount between the entry price and the stop. Then Size = $Risk / (Entry
price – Stop Price)
The benefit is that trades at different share prices now have equal impacts
to risk and reward.
Time Periods: May 1994 - April 2008, divided into three samples to
prevent over-optimization.
Entry Strategy: Enter any stock with buy signals as described above, and
when volume criterion is met (more than 500,000 shares daily). All entries
are next day via Market on Open orders.
Exit Strategy: Exit all stocks according to the signals described above.
Profit-taking is done next day via Market on Open orders. Stop losses,
where applied, are simulated as stop orders, which may be executed
intraday. This combination doesn’t exactly model a nimble trader who
may grab profits from an exit signal early in a day in which those waiting
for end-of-day miss out due to a sell-off before the close. It does model
end-of-day trading and investment though.
Sizing: Where no stops are involved, size is fixed at 1000 shares. With
stops, the risk amount was fixed at $1000 and the size computed as the
number of shares that would risk $1000 between the anticipated entry and
the stop.
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
With exit strategies the key criteria are Expectancy and Maximum Adverse
Excursion (MAE), described in detail below. The number of trades
measured how often the strategy had an opportunity to trade. The average
hold time measures how long each trade went on. Between them you can
get an idea of how productively each strategy put its funds to use. Keep in
mind that the average hold times are just that – an average. Winning
trades tended to go on longer while losing trades were often shorter.
Win Rates
Graphs of win rates are shown in Figure 99 - Figure 101. No surprise that
adding exits pushed the win rates under the baseline for two of the
strategies. However, the real acid test of the exit strategies is expectancy
and MAE.
None of the win rates were so low as to make the strategy overly difficult
to follow. The lowest was 30%, which would average two losses for every
win, although strings of losses could go on much longer. You decide what
is acceptable for you.
Figure 99 – Win Rates 1994 – 2004 (hypothetical) (Click here for
larger figure.)
Figure 100 – Win Rates 2004 – 2007 (hypothetical) (Click here for
larger figure.)
Figure 101 – Win Rates 2007 – 2008 (hypothetical) (Click here for
larger figure.)
Expectancy
A large money-making trade can make up for several smaller losses and
allow a strategy with lower win rate to be more profitable. That’s why
expectancy is a very important metric for a complete strategy.
Figure 102 – Expectancy without stop losses (hypothetical) (Click here
for larger figure.)
At a glance we can see from Figure 102 that none of the basic exit
strategies tested demonstrated great profitability and in fact all results are
clustered around the breakeven point. The next two sub-sections explore
underlying reasons for the lackluster results and then attempt to improve
the results.
The colorful graph above plots the expectancy for all of the exit strategies
under test plus the baseline. Each strategy occupies one space along the
horizontal axis and is in the same order as in the data table.
All the data for one strategy is aligned in a vertical column. As shown in
the legend, each time period has a particular shape to identify its data
point. For example, 1994-2004 is denoted with a diamond. If a shape is
not visible, it is hiding behind a larger shape, which had roughly the same
value. The vertical axis displays the expectancy. Negative expectancies
(unprofitable) are color-coded red. Notice that the red extends above the
zero line. That is not an accident. A strategy that comes out marginally
positive in hypothetical backtesting is unlikely to be profitable in real
situations. The colors gently fade to yellow to indicate caution. Then they
go on to green to signify strategies that were more profitable in backtesting
and have a chance at real-world profitability.
As the data points spread apart from the zero line, they reveal that
increasing risk goes with increasing returns. It’s relatively easy to find
rules and leverage that increases the expectancy in good times but it
usually comes at the expense of a greater negative expectancy when
conditions deteriorate. Look for strategies that go further into the
green zone and less into the red zone than others.
The MAEs in Table 36 above give clues as to why the results weren’t
better. Huge adverse excursions make these strategies untenable. Note,
however, that MACD strategies still did much better than the baseline
MAE. The section on stops shows them doing even better. The Power
Tools strategy consistently controlled risk in the backtests as evidenced by
the smallest MAEs in each time period.
Figure 103 - High MAE for the MACDH Lines Strategy. Created with
TradeStation. © TradeStation Technologies, Inc. All rights
reserved. (Click here for larger figure.)
See Figure 103 for an example of how MAEs can get so large. First off,
the stock is high priced. Secondly, the strategy always buys a fixed
number of shares, in this case 1000. So it makes a huge position in just
one stock. Then the price goes against the position. While this gigantic
open drawdown is taking place, a triple divergence forms on both the
MACD lines and the MACDH. Still the drawdown grows to roughly 30%
before the stock bounces off the 200-day MA and reverses upwards. That
thrust carries price upwards to the breakeven point for this position and an
exit signal occurs slightly above. This example happens to have a happy
ending with a small profit but it could well have been devastating. It
illustrates the need to somehow get out of the position early with minimal
loss and be ready to re-enter at a more favorable time.
Select R-Multiple Distributions
The R-Multiple distributions of all the basic strategies look similar so only
one is presented here for reference. In Figure 104 we see the two tall
spikes containing trades that produced results in the range of -1R to 1R.
Note that only 14 times in 14 years did this strategy more than double the
money invested (see the tiny numbers above the positive bins in Figure
104 and Figure 106). This is characteristic of strategies without stops,
where all the money invested is considered at risk, and so 1R represents a
100% return on the investment.
Remember that R is the amount risked per trade, in our test $1000. R-
Multiple is the number of times that risk is returned, so +5R is $5000
profit while -1R is a $1000 loss. The trades are sorted into “bins” which
correspond to a bar on the graph.
The label of the bin is the mid-point of its contents so the 0.5 bar
represents all trades that returned between 0 and 1 R. Anything more
negative than -1 R means those trades gapped past their stops or jumped
the risk limits due to opening gaps.
Figure 104 – Results Distribution without Stop Losses 1994 – 2004
(hypothetical) (Click here for larger figure.)
Figure 105 - Zoom in on Figure 104 (hypothetical) (Click here for
larger figure.)
Figure 106 – Results Distribution without stop losses 2004 – 2007
(hypothetical) (Click here for larger figure.)
Figure 107 - Results Distribution without stop losses 2007 – 2008
(hypothetical) (Click here for larger figure.)
The next set of runs explores the addition of stops to the strategy. In five
of the seven runs below, the basic strategy entered on MACDH (12-26-9)
uptick while price was above the 200-day MA and exited if the MACDH
(19-39-9) ticked down while above zero or the price dropped below the
200-day MA.
Various stops were added and the results compared. The sixth strategy
used the “Power Tools” entries and exits, with a 2ATR stop added. The
seventh strategy used the basic entry with an exit when MACD lines
crossed down and a 2ATR stop (chosen based on the results of the
previous runs with stops).
(Click here for larger Table 37.)
(Click here for larger Table 38.)
(Click here for larger Table 39.)
Expectancy
Let’s cut to the chase and examine expectancy first. In Figure 108 below,
we can immediately see that adding stops markedly changed the
expectancy. The general pattern seemed to be that during time periods
where the market rose (1994-2004 diamonds and 2004-2007 squares) the
expectancy crept into positive territory. However, in the time period
where the market headed down, the expectancy became clearly negative
(2007 – 2008 triangles).
Observe that as the stops got wider, 3% vs 9% and 2ATR vs 3ATR, the
range of expectancy actually got narrower. The most dramatic case was
the Histo Stop. In most trades, it was the closest stop, coming just at the
price where the MACDH would tick down again from the first uptick entry
signal. In this case, we see that it got better expectancy in the positive
situations while the negative went from bad to worse.
Two interesting points about the MACD Power Tools Strategy: First,
despite a lower win rate than the other strategies, it produced a higher
positive expectancy in rising market conditions. Secondly, the Power
Tools strategy compares favorably to the MACD Lines exits, as
demonstrated by similar expectancies in the relatively favorable conditions
of 1994 - 2007 but not as negative expectancy in the tough conditions of
2007 – 2008.
Figure 108 - Expectancy of MACDH MA with Stops
(hypothetical) (Click here for larger figure.)
Even with stops, the basic MACD strategies lost money in down markets
and didn’t push solidly into the profit zone during favorable times.
Therefore, it’s probably not going to be profitable to blindly follow the
MACD signals. Since they did have some situations with positive
expectancy though, they might fit in as part of a larger strategy.
Win Rates
Graphs of win rates are shown in Figure 109 - Figure 111. Adding stops
pushed the win rate under the baseline in every case. One concern is that
the win rates were consistently below 25% for the histo-stops, which may
make this strategy too demoralizing for most people.
Figure 109 – MACDH MA Stop Loss Win Rates 1994 – 2004
(hypothetical) (Click here for larger figure.)
Figure 110 - MACDH MA Stop Loss Win Rates 2004 – 2007
(hypothetical) (Click here for larger figure.)
Figure 111 - MACDH MA Stop Loss Win Rates 2007 – 2008
(hypothetical) (Click here for larger figure.)
This section shows what we got in return for the lower win rates with
stops. Adding stops trimmed the MAE down considerably. Certainly, the
per-share MAE decreased after adding stops. The MAE in total dollars of
the positions – Viability — was still surprisingly high.
(Click here for larger Table 40.)
(Click here for larger Table 41.)
(Click here for larger Table 42.)
1. Entry Price Below the Stop. The decision to enter a trade is based
on today’s end-of-day data but the entry takes place the next day at
the open. The trouble is that sometimes the stock price gaps down
below the stop overnight, before we even had a chance to get in. The
automated strategy goes awry here because it doesn’t detect that
situation, enters anyway, and is immediately stopped out. While this
didn’t account for the biggest MAEs, it’s still not realistic because a
human would thank their lucky stars and either scratch this stock or
recalculate a new stop before entering. An automated strategy
operating in real time would also need to be able to detect and correct
this situation. Having an entry below the stop is an artifact of
historical backtesting.
2. Close Stop Makes Oversized Position. Simply sizing to the stop
means that a close stop on a high priced stock can make for a wildly
large position. Then a gap past the stop can be devastating.
Figure 112 - Figure 115 display the R-Multiple distributions for the basic
MACDH uptick/downtick strategy with 2ATR stops. With stops, 1 R-
Multiple is $1000, the nominal dollar amount risked between entry and
stop. Then 2 R-Multiples is $2000 gained, 3-R is $3000, and so on.
In Figure 113 below we zoom in on the action between -1R and +1R for a
close-up of many more small losses than small wins. The taller spike to
4088 losses at label -0.95R corresponds to trades that hit their stops. The
trades that lost less than that either had a better-than-expected entry price
or got an exit signal that took them out below the breakeven point.
Figure 113 – Zoom in on Results Distributions with Stops 1994-2004
(hypothetical) (Click here for larger figure.)
Figure 114 - Results Distributions with Stops 2004-2007
(hypothetical) (Click here for larger figure.)
With stops and in favorable markets, MACD did somewhat better than the
baseline. Given a means to identify favorable markets, MACD and
MACDH could ultimately prove useful in timing entries and exits a little
better than chance.
No single MACD exit strategy did the best in all market conditions. In
general, tighter stops and slower exits produced more extremes in
expectancy – more profits and more losses. Histo-stops had the highest
expectancy at the expense of the highest MAE and lowest win rate. Power
Tools moderated the MAEs and still had nearly as high expectancy.
Active Investors
MACD is often used with a longer term outlook, typically associated with
active investors who look to stay in a stock for a year or more. However,
from these tests we see that basic MACD signals didn’t keep an investor in
positions all that long when applied to a daily chart. Even when we
specifically tried to hang in longer by using the MACD lines or skipping a
signal per Power Tools, the average trade length was under 20 days.
Perhaps applying MACD to weekly charts would yield positions that
lasted over a year.
Position Traders
Swing Traders
Waiting for MACD Histogram to tick down may try the patience of a
swing trader, even as it cuts out before the full extent of the price move.
Skipping a signal or waiting for the lines to cross takes even longer (and
still might not grab the full move). The tighter stops – 3%, 2ATR, and
histo-stop – all had shorter average hold times and might be a better match
for the swing trader’s temperament. Perhaps faster settings would speed a
swing trader in and out a little faster.
After reading this chapter, you should thoroughly understand this strategy,
not only as a buy signal but also as a complete system with symmetric sell
signals. To get a taste of how stops can reduce risk, an additional test run
with a stop loss is included. We take the test even one step further by
applying a 200-day moving average as a filter to select only those cases
where the market has already shown some strength.
Whether or not you elect to add this simple strategy to your trading
arsenal, you can learn and improve your skills by understanding it in
detail.
The strategy tested in this report derives its buy signal from the 12-day
EMA crossing up through the 26-day EMA as shown in Figure 116. We
first test with the usual timed exits of 2 days, 20 days and 200 days to
represent swing traders, position traders, and active investors.
Seeing how the results of the previous tests came out, a 200-day moving
average filter was applied to give us a backtesting run which attempts to
distinguish better opportunities for this long-only strategy to initiate a
trade.
In this case, it only buys if the price is above the 200-day moving average
(and the buy signal occurs) and sells if price falls below the 200-day
moving average (or the sell signal occurs). Since this was an after-
thought, it was only tested with real exits rather than timed exits.
Figure 118 - TradeStation screenshot illustrates how trades are
filtered out when price is below the 200-day MA. Created with
TradeStation. © TradeStation Technologies, Inc. All rights
reserved. (Click here for larger figure.)
Time Periods: May 1994 - April 2008, divided into three samples to
prevent over-optimization.
Entry Strategy: Enter any stock with buy signals as described above, and
when volume criterion is met (more than 500,000 shares daily). All entries
are next day via Market on Open orders.
Exit Strategy: Exit all stocks according to the signals described above.
Profit-taking is done next day via Market on Open orders. Stop losses,
where applied, are simulated as stop orders, which may be executed
intraday. This combination doesn’t exactly model a nimble trader who
may grab profits from an exit signal early in a day in which those waiting
for end-of-day miss out due to a sell-off before the close. It does model
end-of-day trading and investment though.
Sizing: Where no stops are involved, size is fixed at 1000 shares. With
stops, the risk amount was fixed at $1000 and the size computed as the
number of shares that would risk $1000 between the anticipated entry and
the stop.
Data Vendor: CSI. This data set was specially selected for accuracy after
extensive testing.
Active Investors
As shown in Figure 119, the win rate is very nearly the same as the
baseline for active investors, especially in the primary test period of
1994-2004.
Figure 119 – MAXO for Active Investors with 200 day exit
(hypothetical). (Click here for larger figure.)
Position Traders
The Moving Average crossover strategy edges past the baseline as shown
in Figure 120.
Figure 120 – MAXO for Position Traders with 20-day exit
(hypothetical). (Click here for larger figure.)
Swing Traders
Swing traders are in it for a quick profit. We model this with a 2-day
timed exit. Our moving average crossover strategy did not get off to a
winning start for swing traders. It performed below the baseline for two of
three time periods.
Figure 121 – MAXO for Swing Traders with 2-day exit (hypothetical).
(Click here for larger figure.)
(Click here for larger Table 43.)
The average hold times for the 200-day tests wind up being a little less
than 200-day because some trades are still open at the end of the test
period.
Keep in mind that the average hold times are just that – an average.
Winning trades tended to go on longer while losing trades were often
shorter. Interestingly enough, the average hold times did come out near 20
days so the position trader’s baseline is used here for comparison.
Graphs of win rates are shown in Figure 122 - Figure 124. All exits
pushed the win rates under the baseline for two of the strategies. We
reserve judgment until seeing the expectancy.
Expectancy
Figure 125 – Expectancy of MAXO Strategies with Different Exit
Types (hypothetical). (Click here for larger figure.)
In contrast, it’s relatively easy to find rules and leverage that increases the
expectancy in good times but it usually comes at the expense of a greater
negative expectancy when conditions deteriorate. Because the 200-day
MA improved results in both good times and bad, we can see that it’s
useful. However, it’s not enough to turn around an unprofitable stretch for
long-only strategies like 2007-2008.
The combination of stop losses and bull market filter topped the categories
of win rate, expectancy, MAE in this chapter.
Figure 126 - Figure 128 show the R-multiple distributions for the strategy
of EMA crossovers with stops and 200-day MA filter.
The +0.5R bar is shorter. In the two profitable time periods, the small
losses outnumbered the small profits by about 3.5 to 1. However, in the
2007-2008 time period, that soared to over 6.6-to-1, which was the first
sign of unprofitability. Also 2007-2008 evidenced few large gains. It was
those large gains, which truly carried the strategy to profitability in the
first two time periods.
Figure 126 - Results Distribution for MAXO 12/26 with stops 1994 -
2004 (hypothetical). (Click here for larger figure.)
Figure 127 - Results Distribution for MAXO 12/26 with stops 2004 -
2007 (hypothetical). (Click here for larger figure.)
Figure 128 - Results Distribution for MAXO 12/26 with stops 2007 -
2008 (hypothetical). (Click here for larger figure.)
First consider that the backtesting data in this report showed that you may
lose money if you trade this strategy in market conditions that are not right
for it. However, you may still want to bring it up on a chart, examine it
with your favorite stock, or backtest it against a completely different
market.
Looking across the whole stock market to identify times when many
stocks show positive divergences and/or few stocks show negative
divergences appears to be a worthwhile practice.
More work is needed to identify rules on when to sell. The next volume in
the Beat The Crash series will investigate exit strategies in detail. Stay
tuned…
Acknowledgements
Many thanks to Jeff Parker for reviewing the original BackTesting Reports
that became the first edition of this book. I also appreciate the work of
Kathleen Callan and Gail Gauvin in formatting the materials. All errors
are mine.
Thank you to Elizabeth Schramm for posting the figures and tables on the
web site for readability. Thank you to TradeStation for all the screenshots.
I want to show my appreciation to you too, dear reader. Please see the
book companion site at www.truthaboutmacd.com to download bonus
materials such as videos, audio presentation, and more.
Thank you!