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 results pane 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.
$10,000, all in on every trade, no margin. Commission is $0.005 a share and slippage is a cent a share, on every fill.
"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 New backtest 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.
Can I change the rules?
Yes. Describe the change to Spyglass, an AI quant that works on your chart, and it rewrites the strategy and backtests it again. Spyglass comes with the Trader and Quant plans.