EMA 20 crosses EMA 50: does it work after costs?
On SPY, holding did better: +289.4% vs +124.3% for the rule after costs.
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +124.3% after modelled costs, against +289.4% for simply holding SPY, across 16 trades. It ended ahead of holding on 1 of the 30 tickers in the table. Run on 2026-12-01 with the estockes strategy test; a historical simulation, not advice.
Test this rule on SPYThe rule on 30 liquid tickers, closest to holding first
Across the 30 tickers with a result, the rule came closest to holding on TLT (+13.0% against -9.5%, 22.4 pts ahead) and furthest from it on NVDA (+1,962% against +6,634%, 4,672 pts behind). It made 679 trades in all; 29 of the 30 runs had fewer than 30 trades, too few to judge on their own. Luck Test: random timing did better on 1, too few trades on 29.
| Ticker | Verdict | Trades | After costs | Holding | Luck Test |
|---|---|---|---|---|---|
| TLT | Not enough trades | 25 | +13.0% | -9.5% | too few trades |
| GLD | Not enough trades | 21 | +188.5% | +197.2% | too few trades |
| DIS | Not enough trades | 22 | +27.6% | +40.8% | too few trades |
| META | Not enough trades | 17 | +421.3% | +440.1% | too few trades |
| IWM | Not enough trades | 25 | +54.2% | +135.6% | too few trades |
| XOM | Not enough trades | 25 | +97.7% | +186.8% | too few trades |
| NFLX | Not enough trades | 23 | +331.9% | +426.3% | too few trades |
| BA | Lost money | 31 | -74.8% | +22.5% | random timing did better, beat 1% |
| INTC | Not enough trades | 28 | +3.9% | +109.0% | too few trades |
| XLF | Not enough trades | 25 | +77.2% | +203.6% | too few trades |
| KO | Not enough trades | 25 | +69.1% | +221.5% | too few trades |
| SPY | Not enough trades | 16 | +124.3% | +289.4% | too few trades |
| DIA | Not enough trades | 22 | +54.7% | +220.6% | too few trades |
| XLV | Not enough trades | 27 | +46.7% | +215.2% | too few trades |
| GOOGL | Not enough trades | 17 | +460.8% | +668.1% | too few trades |
| XLE | Not enough trades | 24 | +51.4% | +267.9% | too few trades |
| V | Not enough trades | 24 | +172.6% | +494.9% | too few trades |
| JPM | Not enough trades | 22 | +91.5% | +421.7% | too few trades |
| QQQ | Not enough trades | 19 | +160.6% | +500.3% | too few trades |
| WMT | Not enough trades | 20 | +200.5% | +554.5% | too few trades |
| COST | Not enough trades | 21 | +331.1% | +774.0% | too few trades |
| AMZN | Not enough trades | 28 | +113.0% | +589.5% | too few trades |
| XLK | Not enough trades | 17 | +193.3% | +732.0% | too few trades |
| MSFT | Not enough trades | 19 | +169.8% | +806.1% | too few trades |
| AAPL | Not enough trades | 22 | +544.9% | +1,295% | too few trades |
| SMH | Not enough trades | 21 | +293.5% | +1,288% | too few trades |
| AVGO | Not enough trades | 25 | +506.3% | +2,344% | too few trades |
| TSLA | Not enough trades | 24 | +597.2% | +3,177% | too few trades |
| AMD | Not enough trades | 20 | +1,058% | +4,701% | too few trades |
| NVDA | Not enough trades | 24 | +1,962% | +6,634% | too few trades |
How the rule works
The test enters at the next open after the 20-day exponential average crosses above the 50-day EMA and exits after it crosses back below. A medium-term trend cross that reacts a little sooner than the simple-average version.
Why costs matter
Two averages crossing is a trend rule: the faster the pair, the more round trips and the more often a cross reverses within days and pays costs twice. Slow pairs trade rarely, and their cost is a late entry and a late exit instead.
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
- Golden cross (50-day over 200-day)
- EMA 9 crosses EMA 21
- EMA 50 crosses EMA 200
- 10-day average crosses the 50-day
- All tested rules
- The scoreboard: 90 of 1,260 tests ended ahead of holding, and why
- Strategies we tested
Every rule on one ticker
Questions
EMA 20 crosses EMA 50: does this rule work?
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +124.3% after modelled costs, against +289.4% for simply holding SPY, across 16 trades. It ended ahead of holding on 1 of the 30 tickers in the table. Run on 2026-12-01 with the estockes strategy test; a historical simulation, not advice.
EMA 20 crosses EMA 50: how does the rule work?
The test enters at the next open after the 20-day exponential average crosses above the 50-day EMA and exits after it crosses back below. A medium-term trend cross that reacts a little sooner than the simple-average version.
Why do trading costs matter here?
Two averages crossing is a trend rule: the faster the pair, the more round trips and the more often a cross reverses within days and pays costs twice. Slow pairs trade rarely, and their cost is a late entry and a late exit instead.
How was it tested?
Each number comes from one run of the estockes strategy test (public API), fetched on 2026-12-01: 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.