SPY daily data, 2016 to 2026: the 50/200 rule, long and short, made 20.1% after costs over 8 trades, winning 50.0% of them, against +277.8% for holding SPY. Long only it made 95.4%. The best of 10 runs was 50/200 on NVDA, long only: +4114.9%, held-out too few trades to judge. Every run, every trade and the script are on this page.
Answers here: Does the golden cross work? · How often does it fire? · Does it beat holding the stock? · Should the death cross short?
SPY daily data, 4 January 2016 to 23 October 2026, long and short: 8 trades, made 20.1% after costs, 50.0% of trades won, profit factor 1.68, worst drawdown 42.0%, 73% of the time in the market. Holding SPY returned +277.8% over the same period.
The held-out third (16 March 2023 to 23 October 2026) had 2 trades, too few to judge.
Long only, the same rule made 95.4% on 4 trades (75.0% won, profit factor 9.64, held-out too few trades to judge): the short side cost 75.2 points of return in a period when SPY rose 277.8%.
Across all 10 runs on this page, 10 made money after costs, 1 survived the held-out third, and 0 beat holding the symbol (10 had too few trades to judge).
The best run was 50/200 on NVDA, long only: +4114.9% net on 3 trades, no losing trades, worst drawdown 37.5%, held-out too few trades to judge. The tester's verdict on it reads "too few trades to judge".
SMA Cross Strategy (golden cross), from the strategy library.
Goes long when the 50-day simple moving average crosses above the 200-day (the golden cross). In the two-way version the death cross, the 50 crossing below the 200, closes the long and opens a short; in the long-only version it only closes the long. A stop sits 2 ATR away. Five names were run both ways.
The indicator itself, with its Pine code drawn on real market data: Moving Average Crossover.
Net and holding the symbol are after costs over the same period. Held-out is the verdict on the last third of the history judged alone: survived, decayed, did not survive, or too few trades to judge.
| Symbol | Timeframe | Settings | Direction | Trades | Win rate | Net | Holding | Profit factor | Max drawdown | Held-out |
|---|---|---|---|---|---|---|---|---|---|---|
| SPY | daily | 50/200 | long and short | 8 | 50.0% | +20.1% | +277.8% | 1.68 | 42.0% | too few trades to judge |
| QQQ | daily | 50/200 | long and short | 8 | 62.5% | +166.5% | +542.3% | 5.13 | 29.4% | too few trades to judge |
| AAPL | daily | 50/200 | long and short | 10 | 40.0% | +35.9% | +1219.6% | 2.17 | 65.7% | did not survive |
| NVDA | daily | 50/200 | long and short | 6 | 83.3% | +2259.6% | +25955.3% | 27.90 | 49.1% | too few trades to judge |
| MSFT | daily | 50/200 | long and short | 12 | 33.3% | +72.6% | +856.6% | 3.22 | 56.4% | did not survive |
| SPY | daily | 50/200 | long only | 4 | 75.0% | +95.4% | +277.8% | 9.64 | 34.2% | too few trades to judge |
| QQQ | daily | 50/200 | long only | 4 | 100.0% | +253.1% | +542.3% | no losing trades | 28.4% | too few trades to judge |
| AAPL | daily | 50/200 | long only | 5 | 60.0% | +280.6% | +1219.6% | 13.34 | 31.7% | too few trades to judge |
| NVDA | daily | 50/200 | long only | 3 | 100.0% | +4114.9% | +25955.3% | no losing trades | 37.5% | too few trades to judge |
| MSFT | daily | 50/200 | long only | 6 | 50.0% | +234.5% | +856.6% | 12.45 | 28.3% | survived |
50/200 on SPY, long and short, the same rule long only, and SPY itself, each calendar year after costs. A partial first or last year counts the sessions it has.
| Year | 50/200, long and short | 50/200, long only | Holding SPY |
|---|---|---|---|
| 2016 | 0.0% | 0.0% | +11.2% |
| 2017 | 0.0% | 0.0% | +18.5% |
| 2018 | +4.6% | 0.0% | -6.9% |
| 2019 | -2.2% | +12.4% | +28.6% |
| 2020 | -23.2% | -4.7% | +15.1% |
| 2021 | +28.8% | +28.8% | +28.8% |
| 2022 | -8.4% | -12.2% | -19.9% |
| 2023 | +6.4% | +15.4% | +24.8% |
| 2024 | +24.0% | +24.0% | +24.0% |
| 2025 | -11.6% | +1.8% | +16.6% |
| 2026 | +11.2% | +11.2% | +11.2% |
The 8 trades of 50/200 on SPY, long and short, oldest first: side, entry and exit days, fill prices after slippage, and the return after both commissions. The other runs' trades open below.
| Side | In | Out | Entry | Exit | Return |
|---|---|---|---|---|---|
| short | 2018-12-10 | 2019-04-02 | 263.29 | 286.12 | -8.8% |
| long | 2019-04-02 | 2020-03-31 | 286.12 | 260.50 | -9.1% |
| short | 2020-03-31 | 2020-07-10 | 260.50 | 314.34 | -20.8% |
| long | 2020-07-10 | 2022-03-15 | 314.34 | 419.66 | +33.4% |
| short | 2022-03-15 | 2023-02-03 | 419.66 | 411.70 | +1.8% |
| long | 2023-02-03 | 2025-04-15 | 411.70 | 539.54 | +31.0% |
| short | 2025-04-15 | 2025-07-02 | 539.54 | 617.40 | -14.5% |
| long | 2025-07-02 | 2026-10-23 | 617.40 | 759.72 | +23.0% |
Pine v6, exactly as it ran for 50/200 on SPY, long and short. The variants change only the inputs listed in the table.
//@version=6
strategy("SMA Cross Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=1, margin_long=0, margin_short=0)
src = input.source(close, "Source", group="Lengths")
fastLen = input.int(50, "Fast SMA", minval=1, group="Lengths")
slowLen = input.int(200, "Slow SMA", minval=2, group="Lengths")
useLong = input.bool(true, "Trade longs", group="Direction")
useShort = input.bool(true, "Trade shorts", group="Direction")
atrLen = input.int(14, "ATR length", minval=1, group="Risk")
stopMult = input.float(0, "Stop (ATR multiples, 0 = off)", minval=0, step=0.5, group="Risk")
fast = ta.sma(src, fastLen)
slow = ta.sma(src, slowLen)
atr = ta.atr(atrLen)
longSig = ta.crossover(fast, slow) and barstate.isconfirmed
shortSig = ta.crossunder(fast, slow) and barstate.isconfirmed
pFast = plot(fast, "Fast SMA", color=color.new(#16A56A, 0), linewidth=2)
pSlow = plot(slow, "Slow SMA", color=color.new(#E5484D, 0), linewidth=2)
fill(pFast, pSlow, color=fast > slow ? color.new(#16A56A, 90) : color.new(#E5484D, 90), title="Trend fill")
if longSig
strategy.close("Short")
if useLong
strategy.entry("Long", strategy.long)
strategy.exit("Long stop", "Long", stop=stopMult > 0 ? close - stopMult * atr : na)
if shortSig
strategy.close("Long")
if useShort
strategy.entry("Short", strategy.short)
strategy.exit("Short stop", "Short", stop=stopMult > 0 ? close + stopMult * atr : na)
Alpaca daily data since 2016, 0.05% commission and 0.025% slippage on every fill, the last third of the history held out, textbook settings and nothing tuned. The engine, fills and what it does not model are written out once, in data and methodology.
Describe the rule in your own words or paste the script. The Free plan writes the Pine v6 script with the AI, runs it on any US stock or ETF with the same costs and the same held-out check, and shows every trade on the chart. No card.
Seventeen popular rules through the same engine, the same costs and the same held-out check, with every trade listed. Next: EMA crossover strategy, Moving average strategy, Trailing stop strategy.
SPY, daily data, 2016 to 2026, long and short: 50/200 made 20.1% after costs over 8 trades (50.0% won, profit factor 1.68) against +277.8% for holding SPY, and the held-out third had too few trades to judge. Long only it made 95.4%. Across all 10 runs on the page, 10 made money after costs, 1 survived their held-out third and 0 beat holding the stock.
From 33.3% to 100.0% across the 10 runs. The classic setting, 50/200 on SPY long and short, won 50.0% of 8 trades. The win rate alone does not decide the result: that run's profit factor was 1.68, so its winners outweighed its losers, and the net return was +20.1%.
On SPY it was: long only made 95.4% against made 20.1% traded both ways, with held-out verdicts of too few trades to judge and too few trades to judge. In a period when SPY returned +277.8%, shorting the pullbacks of an index that kept rising is where the money went; a different period could reverse that.
0 of the 10 runs did. SPY itself returned +277.8% between 4 January 2016 and 23 October 2026, so a rule that is out of the market part of the time has a lot to make up; what a timing rule usually gets you is a smaller drawdown, not a bigger return. The classic run's worst drawdown was 42.0% with 73% of the time in the market.
The last third of every run's history (16 March 2023 to 23 October 2026 for the lead run) was judged on its own, with no fitting on it: 1 of 10 runs survived, 0 decayed, 2 did not survive and 7 had too few trades there to judge. Survived means a positive Sharpe ratio on the held-out part at least half the fitted period's; it is a check on one later stretch, not a forecast.
With the free Alpha Charts tester's own engine: the Pine v6 scripts on this page, run on Alpaca daily data since 2016, split-adjusted and not dividend-adjusted, one position at a time with the whole account, fills at the next candle's open, a commission of 0.05% and slippage of 0.025% on every fill, the last third of the history held out. The settings are the textbook ones and every variant is stated; nothing was tuned to make the page look better.
Every number on this page is the output of the Alpha Charts backtest engine on 25 October 2026, on Alpaca market data; the scripts are the strategy library's templates, shown as they ran. Symbols are US-listed ETFs and stocks; results are price returns after the costs stated. Past results are not a forecast and nothing here is investment advice. TradingView and Pine Script belong to TradingView, Inc.; Alpha Charts is not affiliated with it.