MACD is one of the first indicators most traders learn. It is the gap between a fast and a slow average of the price, over 12 and 26 days, and its signal line is a 9-day average of that gap. This rule buys when MACD crosses above its signal line and sells when it crosses back below. It only buys, and there is no stop loss.
The idea is to catch a move as it starts. A crossover only happens once the move is underway, though, so it buys late and sells late, and in a choppy stretch it gets bounced in and out.
It made money on all five, barely on Microsoft, and trailed holding on every one. These stocks mostly rose in long stretches with short dips, and the rule sold on many of those dips and bought back higher.
In the table, the biggest drop is the most the account fell from a high point before it recovered.
| Stock | With the strategy | Just holding | Trades | Biggest drop | Backtest |
|---|---|---|---|---|---|
| SPY | $11,638 (+16.4%) | $14,692 (+46.9%) | 27, plus 1 still open | -8.8% | See the backtest |
| QQQ | $12,008 (+20.1%) | $16,717 (+67.2%) | 25, plus 1 still open | -16.8% | See the backtest |
| IWM | $10,831 (+8.3%) | $13,521 (+35.2%) | 27 | -19.6% | See the backtest |
| AAPL | $14,570 (+45.7%) | $19,649 (+96.5%) | 27 | -18.5% | See the backtest |
| MSFT | $10,033 (+0.3%) | $12,168 (+21.7%) | 25 | -31.3% | See the backtest |
How we tested
We ran the textbook rules on SPY, QQQ, IWM, Apple and Microsoft from Mar 26, 2024 to the end of last month, in the same Backtest tab you can use. Every strategy on this site starts on the same day, the first day the slowest of them, the golden cross, could trade.
Every test starts with $10,000 and puts the whole balance into each trade, with no borrowed money. Costs are the tester's defaults for stocks: half a cent a share in commission and a cent of slippage on every fill. Slippage is the gap between the price you wanted and the price you got.
"Just holding" buys the same stock on the first day of the test and keeps it to the end.
Questions
Does the MACD crossover beat buying and holding?
No. It didn't beat just holding on any of the five stocks after costs, even though it made money on all five.
Why does it trade more than the golden cross?
Its averages are much shorter, so they cross every few weeks instead of once a year or so. More trades means more chances to sell a dip that turns out to be nothing.
Can I test it on a different stock?
Yes, with a paid plan. Press "Try it yourself" to open the Backtest tab with the MACD crossover already loaded, then change the stock. A backtest of the MACD crossover needs more history than a free account can reach.