EMA 8 crosses EMA 21: does it work after costs?
On SPY, holding did better: +289.4% vs +151.3% for the rule after costs.
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +151.3% after modelled costs, against +289.4% for simply holding SPY, across 46 trades. It ended ahead of holding on 3 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 NFLX (+602.7% against +426.3%, 176.4 pts ahead) and furthest from it on NVDA (+1,682% against +6,634%, 4,952 pts behind). It made 1671 trades in all; 0 of the 30 runs had fewer than 30 trades, too few to judge on their own. Luck Test: could be luck on 3, looks like luck on 24, random timing did better on 3.
| Ticker | Verdict | Trades | After costs | Holding | Luck Test |
|---|---|---|---|---|---|
| NFLX | Passed basic checks | 49 | +602.7% | +426.3% | could be luck, beat 82% |
| DIS | Passed basic checks | 55 | +62.1% | +40.8% | looks like luck, beat 69% |
| TLT | Only in the past | 70 | +6.0% | -9.5% | looks like luck, beat 64% |
| BA | Only in the past | 60 | +8.4% | +22.5% | looks like luck, beat 55% |
| XOM | Holding did better | 55 | +138.9% | +186.8% | looks like luck, beat 68% |
| GLD | Holding did better | 54 | +133.6% | +197.2% | looks like luck, beat 69% |
| IWM | Holding did better | 58 | +56.6% | +135.6% | looks like luck, beat 43% |
| INTC | Only in the past | 63 | +16.0% | +109.0% | looks like luck, beat 24% |
| XLV | Holding did better | 57 | +86.7% | +215.2% | looks like luck, beat 26% |
| DIA | Holding did better | 44 | +88.5% | +220.6% | looks like luck, beat 16% |
| SPY | Holding did better | 46 | +151.3% | +289.4% | looks like luck, beat 30% |
| META | Holding did better | 54 | +300.4% | +440.1% | looks like luck, beat 71% |
| KO | Holding did better | 56 | +81.8% | +221.5% | random timing did better, beat 4% |
| XLF | Holding did better | 58 | +53.4% | +203.6% | looks like luck, beat 15% |
| XLE | Only in the past | 57 | +74.9% | +267.9% | looks like luck, beat 47% |
| QQQ | Holding did better | 51 | +269.6% | +500.3% | looks like luck, beat 37% |
| JPM | Holding did better | 58 | +75.6% | +421.7% | random timing did better, beat 2% |
| XLK | Holding did better | 48 | +378.3% | +732.0% | looks like luck, beat 64% |
| WMT | Holding did better | 59 | +150.3% | +554.5% | looks like luck, beat 23% |
| AMZN | Only in the past | 55 | +160.9% | +589.5% | looks like luck, beat 20% |
| V | Holding did better | 55 | +61.8% | +494.9% | random timing did better, beat 1% |
| GOOGL | Holding did better | 61 | +228.0% | +668.1% | looks like luck, beat 35% |
| COST | Holding did better | 54 | +326.7% | +774.0% | looks like luck, beat 46% |
| TSLA | Only in the past | 59 | +2,707% | +3,177% | could be luck, beat 96% |
| AAPL | Holding did better | 47 | +796.3% | +1,295% | looks like luck, beat 77% |
| MSFT | Holding did better | 51 | +248.8% | +806.1% | looks like luck, beat 19% |
| SMH | Holding did better | 55 | +480.1% | +1,288% | looks like luck, beat 50% |
| AVGO | Holding did better | 67 | +239.5% | +2,344% | looks like luck, beat 6% |
| AMD | Holding did better | 59 | +1,451% | +4,701% | could be luck, beat 82% |
| NVDA | Only in the past | 56 | +1,682% | +6,634% | looks like luck, beat 46% |
How the rule works
The 8 and 21-day exponential averages are a pairing many swing traders use. The test enters at the next open after the 8-day EMA crosses above the 21-day EMA and exits after it crosses back below.
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 8 crosses EMA 21: does this rule work?
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +151.3% after modelled costs, against +289.4% for simply holding SPY, across 46 trades. It ended ahead of holding on 3 of the 30 tickers in the table. Run on 2026-12-01 with the estockes strategy test; a historical simulation, not advice.
EMA 8 crosses EMA 21: how does the rule work?
The 8 and 21-day exponential averages are a pairing many swing traders use. The test enters at the next open after the 8-day EMA crosses above the 21-day EMA and exits after it crosses back below.
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.