20-day average crosses the 50-day: does it work after costs?
On SPY, holding did better: +289.4% vs +140.8% for the rule after costs.
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +140.8% after modelled costs, against +289.4% for simply holding SPY, across 20 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 META (+521.7% against +440.1%, 81.7 pts ahead) and furthest from it on NVDA (+1,404% against +6,634%, 5,231 pts behind). It made 789 trades in all; 26 of the 30 runs had fewer than 30 trades, too few to judge on their own. Luck Test: looks like luck on 3, random timing did better on 1, too few trades on 26.
| Ticker | Verdict | Trades | After costs | Holding | Luck Test |
|---|---|---|---|---|---|
| META | Not enough trades | 24 | +521.7% | +440.1% | too few trades |
| DIS | Not enough trades | 26 | +107.2% | +40.8% | too few trades |
| TLT | Not enough trades | 26 | +29.8% | -9.5% | too few trades |
| GLD | Not enough trades | 26 | +136.8% | +197.2% | too few trades |
| IWM | Not enough trades | 26 | +69.9% | +135.6% | too few trades |
| BA | Not enough trades | 26 | -56.7% | +22.5% | too few trades |
| XLF | Not enough trades | 29 | +118.3% | +203.6% | too few trades |
| INTC | Lost money | 30 | -11.5% | +109.0% | looks like luck, beat 11% |
| DIA | Not enough trades | 22 | +92.4% | +220.6% | too few trades |
| XOM | Not enough trades | 28 | +55.6% | +186.8% | too few trades |
| XLV | Not enough trades | 27 | +76.6% | +215.2% | too few trades |
| SPY | Not enough trades | 20 | +140.8% | +289.4% | too few trades |
| KO | Holding did better | 31 | +52.3% | +221.5% | random timing did better, beat 4% |
| NFLX | Not enough trades | 24 | +219.9% | +426.3% | too few trades |
| JPM | Not enough trades | 25 | +174.3% | +421.7% | too few trades |
| XLE | Holding did better | 33 | +16.9% | +267.9% | looks like luck, beat 7% |
| QQQ | Not enough trades | 22 | +207.5% | +500.3% | too few trades |
| V | Not enough trades | 25 | +199.6% | +494.9% | too few trades |
| GOOGL | Not enough trades | 26 | +329.5% | +668.1% | too few trades |
| WMT | Not enough trades | 27 | +121.3% | +554.5% | too few trades |
| AMZN | Not enough trades | 27 | +74.8% | +589.5% | too few trades |
| XLK | Not enough trades | 25 | +217.1% | +732.0% | too few trades |
| COST | Not enough trades | 28 | +195.5% | +774.0% | too few trades |
| MSFT | Not enough trades | 24 | +107.2% | +806.1% | too few trades |
| AAPL | Not enough trades | 29 | +384.7% | +1,295% | too few trades |
| SMH | Not enough trades | 24 | +321.9% | +1,288% | too few trades |
| AVGO | Not enough trades | 25 | +607.6% | +2,344% | too few trades |
| TSLA | Holding did better | 30 | +711.8% | +3,177% | looks like luck, beat 44% |
| AMD | Not enough trades | 27 | +403.9% | +4,701% | too few trades |
| NVDA | Not enough trades | 27 | +1,404% | +6,634% | too few trades |
How the rule works
The test enters at the next open after the 20-day simple moving average rises above the 50-day average, and exits after it falls back below. Slower than the 10/50 cross, faster than the golden cross.
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
20-day average crosses the 50-day: does this rule work?
Over the last 10 years on SPY (2016-11-30 to 2026-11-30), this rule made +140.8% after modelled costs, against +289.4% for simply holding SPY, across 20 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.
20-day average crosses the 50-day: how does the rule work?
The test enters at the next open after the 20-day simple moving average rises above the 50-day average, and exits after it falls back below. Slower than the 10/50 cross, faster than the golden cross.
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.