Friday, April 18, 2008

Strategy Test: MACD

For the first in this series I took a look at the performance of the humble MACD trigger line as a trade signal. The parameters were the default MACD (12, 26, 9) and the indicator was tested with and without stops. The following assumptions were used:

Test period: A complete bull-bear cycle defined by the S&P (March 20th 2000 to October 8th 2007).

Stocks: Active Trader list (AAPL BA C CAT CSCO DIS GM HPQ IBM INTC IP JPM KO MSFT SBUX T WMT)

Number of shares: 100

Commission: $9.95 (included in the loss calculation)

The traditional use of the tool returned the following:

Total Profit: $12,368
Winners: 220
Losers: 286
Win percentage: 43%
Profit Factor: 1.18

However, of the seventeen stocks only six returned a profit. The biggest gainer was Apple (AAPL) with a total profit of $12.139. Caterpillar (CAT) and Boeing (BA) were next at $5,341 and $5,997 a piece. With AT&T (T), Starbucks (SBUX) and IBM (IBM) the last of the profitable stocks.

When a protective stop was factored, the total return - irrespective of the stop threshold - was a loss:

8% Stop: Total Profit: -$6,995 Wins: 292 Loss: 522 Win%: 36% PF: 0.92
7% Stop: Total Profit: -$3,783 Wins: 315 Loss: 552 Win%: 36% PF: 0.96
6% Stop: Total Profit: -$13,777 Wins: 340 Loss: 606 Win%: 36% PF: 0.84
5% Stop: Total Profit: -$9,959 Wins: 365 Loss: 644 Win%: 36% PF: 0.88
4% Stop: Total Profit: -$10,207 Wins: 407 Loss: 677 Win%: 38% PF: 0.86
3% Stop: Total Profit: -$10,207 Wis: 412 Loss: 737 Win%: 36% PF: 0.82

As the stop bands narrowed, the number of winning and losing trades increased; even allowing for a relatively loose stop at 8% the number of trades executed increased by 61%. There was a 127% jump in the number of trades for the 3% stop. Irrespective of the stop threshold the average win percentage remained around 36%.

If commission was dropped to $0 (such would be the case if you used a brokerage firm like Zecco) a very different picture emerged. Because commission was included as part of the stop loss, removing it increased the Win %.

No stop: TP = $22,438 on 46% winners
3% stop: TP = $10,678 on 42% winners
4% stop: TP = $11,364 on 42% winners
5% stop: TP = $10,120 on 41% winners
6% stop: TP = $5,048 on 40% winners
7% stop: TP = $13,470 on 39% winners
8% stop: TP = $9,204 on 39% winners

What is clear (other than the spike gains with the 7% stop) is that a low percentage risk strategy returned a respectable win percentage, with a total profit of around $10,000 (on 100 share lots with an average cost-per-share of $36.38).

How does the strategy test for three random dates?

A start date was randomized and 1 year of data from each point was used. The randomization so happened to turn up two 2001 test periods, so the average return for the three periods was negative. The two best returns were given from the no-stop and 3% stop thresholds. These also had the highest win percentage at 39% and 38% respectively.


Given the psychological comfort of using a stop, a 3% threshold for a MACD trading strategy looks appropiate. The high frequency of trades also suggests this strategy is best employed in a low commission environment, or with a large enough account to compensate for the frequency of trades. A low cash account would quickly turn to ruin using a MACD trading strategy with stops on $9.95 commissions.

Dr. Declan Fallon, Senior Market Technician, Zignals.com the free stock alerts, market alerts, and stock charts website

0 comments: