MACD crosses its signal line: does it work after costs?
Over the last 10 years on SPY (2016-11-28 to 2026-11-27), this rule made +111.1% after modelled costs, against +286.8% for simply holding SPY, across 108 trades. It ended ahead of holding on 0 of the 6 tickers in the table. Run on 2026-11-30 with the estockes strategy test; a historical simulation, not advice.
Test this rule on SPYThe rule on 6 liquid tickers, closest to holding first
Across the 6 tickers with a result, the rule came closest to holding on IWM (+121.7% against +134.5%, 12.7 pts behind) and furthest from it on NVDA (+580.1% against +6,408%, 5,828 pts behind). It made 607 trades in all; 0 of the 6 runs had fewer than 30 trades, too few to judge on their own. The Luck Test for these runs is refresh pending.
| Ticker | Verdict | Trades | After costs | Holding | Luck Test |
|---|---|---|---|---|---|
| IWM | Holding did better | 102 | +121.7% | +134.5% | Luck Test pending |
| SPY | Holding did better | 108 | +111.1% | +286.8% | Luck Test pending |
| QQQ | Holding did better | 98 | +128.2% | +488.6% | Luck Test pending |
| AAPL | Holding did better | 91 | +581.1% | +1,299% | Luck Test pending |
| MSFT | Only in the past | 107 | +43.2% | +811.4% | Luck Test pending |
| NVDA | Only in the past | 101 | +580.1% | +6,408% | Luck Test pending |
How the rule works
MACD is the gap between a 12-day and a 26-day exponential average of the close; its signal line is a 9-day average of that gap. The test enters at the next open after MACD crosses above its signal line and exits after it crosses back below.
Why costs matter
MACD crosses its signal line every few weeks, so this rule trades often. Many of those crosses reverse within days, and each reversal pays costs twice. That is why the after-costs result can sit well below the before-costs one.
Every result here is after modelled costs: the engine charges commission and slippage on each entry and exit, set by the ticker's liquidity (on SPY: 0 bp commission, 2 bp slippage per side), and fills at the next session's open, never at the signal's close. Holding is measured on the same total-return prices with no costs.
Limits of this test
- It is a historical simulation of 10 years of daily data, not a forecast and not advice. A rule that did well in this window can do badly in the next.
- Survivorship: only tickers listed today can be tested, so companies that failed or were delisted are missing, which flatters any rule tested on stocks.
- The recent window matters: ten years that include one long rally favour holding, and a different decade could rank the rule differently. Run the test on another window to see.
- Fixed settings for every ticker. Changing the period or the exit changes the result, and trying many settings until one looks good is how false results are made. That is also why the Luck Test bar rises with the number of results shown.
Related rules
- EMA 9 crosses EMA 21
- Price crosses its 20-day average
- Golden cross (50-day over 200-day)
- RSI(14) below 30
- All tested rules
- Strategies we tested
Every rule on one ticker
Longer single-ticker studies
Questions
MACD crosses its signal line: does this rule work?
Over the last 10 years on SPY (2016-11-28 to 2026-11-27), this rule made +111.1% after modelled costs, against +286.8% for simply holding SPY, across 108 trades. It ended ahead of holding on 0 of the 6 tickers in the table. Run on 2026-11-30 with the estockes strategy test; a historical simulation, not advice.
MACD crosses its signal line: how does the rule work?
MACD is the gap between a 12-day and a 26-day exponential average of the close; its signal line is a 9-day average of that gap. The test enters at the next open after MACD crosses above its signal line and exits after it crosses back below.
Why do trading costs matter here?
MACD crosses its signal line every few weeks, so this rule trades often. Many of those crosses reverse within days, and each reversal pays costs twice. That is why the after-costs result can sit well below the before-costs one.
How was it tested?
Each number comes from one run of the estockes strategy test (public API), fetched on 2026-11-30: daily bars, signal on the close, fill at the next open, costs on every fill, idle cash earning the 3-month Treasury bill rate, compared with holding the same ticker over the same window.