SMA-200 Trend + 15% Trailing Stop on SPY
SPDR S&P 500 ETF Trust: the most-traded S&P 500 ETF and a common benchmark for US large caps. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
Trend plus a trailing stop buys SPY when yesterday's close is above the 200-day average, then ignores the average and sells only when price falls 15% below the position's high-water mark. On SPY from 2021-01-04 to 2026-10-02 it turned $10,000 into $13,562, a 5.45% annualized return. Buy-and-hold ended at $21,820, a 14.56% annualized return. The strategy's maximum drawdown was 31.15% against 23.99% for holding, so on this fund it gave up return and also took a deeper loss.
The result comes down to four trades. Three closed and one is still open. The first lost 8.76%, the second lost 14.37%, the third gained 31.85% over 855 days, and the open position, bought on 2025-05-13 at an adjusted $573.39, stood 34.23% above entry at the last close. One winner out of three closed trades is a 33% win rate, and the profit factor was 1.11. With so few trades, every figure on this page rests on a handful of dates, and the text below names them.
SPY ranks tenth of the 12 templates on this fund and twenty-fourth of the 59 ETFs for this rule. The SPY ranking table shows the other templates, and the trend and trailing stop hub shows the rule across all 59 funds.
Year by year
| Year | trend + trailing stop | buy & hold |
|---|---|---|
| 2021 | 6.0% | 29.6% |
| 2022 | −29.8% | −17.8% |
| 2023 | 24.4% | 25.5% |
| 2024 | 23.5% | 24.3% |
| 2025 | 4.8% | 17.4% |
| 2026 | 13.2% | 13.6% |
Year by year against buy-and-hold
The strategy trailed buy-and-hold in every row of the annual table, and no year is a win. 2021 shows 6.0% against 29.6%, because the sleeve held cash until it bought on 2021-10-19 at $419.68. The test starts on 2021-01-04 and the 200-day average needs 200 sessions, so the first signal came in October. The 23.6 point gap in 2021 comes from that late start.
2022 is the damaging year. The strategy lost 29.8% against 17.8% for the fund, a gap of 12 points in the wrong direction. Three separate things happened. The first position, held 195 days, was stopped on 2022-05-02 at $382.91 for a loss of 8.76%. The sleeve then sat in cash until 2022-08-17, bought at $403.12, and was stopped again on 2022-09-23 at $345.19 for a 14.37% loss. It bought a third time on 2022-12-01 at $387.70. The monthly returns show where the pain was: a 5.11% loss in January, 2.82% in February, 8.47% in April, 7.09% in August, 7.35% in September and 5.53% in December. Each stop came after a decline had already taken place, and each re-entry came after a bounce had lifted price back above the 200-day line.
2023 returned 24.4% against 25.5%, and 2024 returned 23.5% against 24.3%. These are the two years in which the strategy held the same position as the fund for the whole twelve months, so the returns are close. The sleeve held the 855-day trade through both years. That trade stayed open from 2022-12-01 until a stop-out on 2025-04-04 at $511.18.
2025 returned 4.8% against 17.4%, a gap of 12.6 points. The stop-out came on 2025-04-04, the fund's worst day of the window at a 5.98% loss, the day after a 4.78% loss. The sleeve then sat out the best day of the window, a 9.39% gain on 2025-04-09, and bought back on 2025-05-13. March 2025 shows a 5.35% loss and April a 6.73% loss, both from the long position before and around the stop-out. 2026 reads 13.2% against 13.6%.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 2.3% | −0.7% | 4.4% |
| 2022 | −5.1% | −2.8% | 3.6% | −8.5% | −1.3% | 0.0% | 0.0% | −7.1% | −7.3% | 0.0% | 0.0% | −5.5% |
| 2023 | 5.8% | −2.4% | 3.5% | 1.5% | 0.4% | 6.1% | 3.1% | −1.6% | −4.5% | −2.0% | 8.5% | 4.3% |
| 2024 | 1.5% | 4.9% | 3.1% | −3.8% | 4.8% | 3.3% | 1.1% | 2.3% | 2.1% | −0.9% | 5.7% | −2.3% |
| 2025 | 2.6% | −1.2% | −5.3% | −6.7% | 1.1% | 4.9% | 2.2% | 2.0% | 3.4% | 2.3% | 0.2% | 0.1% |
| 2026 | 1.4% | −0.8% | −4.8% | 10.1% | 5.1% | −1.0% | 0.1% | 2.6% | −0.3% | 0.9% | – | – |
Monthly pattern
The month table shows three clusters of zeros: January to September 2021, June and July 2022, and October and November 2022. These are the periods when the sleeve was flat after a stop. Between those clusters the monthly returns follow the fund closely.
The best month was April 2026 at 10.05%, close to the 10.33% buy-and-hold made in the same month. The worst was April 2022 at an 8.47% loss. Buy-and-hold's worst month was September 2022 at 9%. The strategy's September 2022 was a 7.35% loss. In that month the sleeve held the 37-day trade bought on 2022-08-17, and it was stopped out on 2022-09-23. A trailing stop sells after the decline, so the loss up to the stop is taken in full.
The 2022 losses came from three positions in turn. This is the structure of the rule. A stop that sits 15% below the high-water mark allows a 15% loss on each position before it acts, and on a fund whose deepest decline was 24.51% there is room for more than one stop-out to happen inside a single decline.
In 2023 the strategy's monthly returns are almost identical to the fund's: 6.09% in June, 8.54% in November, 4.33% in December. In those months it was fully invested in the long position and the stop never came close to being touched.
Every trade
trend + trailing stop on SPY made 3 closed round trips and one position still open at the end of the test, an average hold of 362 days, an average winner of 31.85%, an average loser of −11.57%, a profit factor of 1.11, a longest losing streak of 2. It held a position at the close on 75.9% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-10-19 | $419.68 | 2022-05-02 | $382.91 | −8.8% | 195 |
| 2022-08-17 | $403.12 | 2022-09-23 | $345.19 | −14.4% | 37 |
| 2022-12-01 | $387.70 | 2025-04-04 | $511.18 | 31.9% | 855 |
| 2025-05-13 | $573.39 | open | – | 34.2% | – |
Prices are adjusted for splits and dividends, so they sit below the quotes printed at the time. An open position is marked at the last close.
The four trades
The trade table holds four rows, and the story is in their order.
The first trade ran from 2021-10-19 at $419.68 to 2022-05-02 at $382.91, a 195-day hold that lost 8.76%. The 15% trail is measured from the highest price since entry, so the stop level moved up with the fund through December 2021 and early January 2022. SPY's peak was on 2022-01-03, and the stop was hit in the following spring. The exit sits below the entry, so the fund gave back more than it had gained since entry.
The second trade, 37 days from 2022-08-17 at $403.12 to 2022-09-23 at $345.19, lost 14.37%, the worst of the test. It entered on a close above the 200-day average during the summer 2022 rally. The fund did not rise much above the entry before turning down, so the loss ended close to the full width of the stop. That is what a 15% trail costs when a position never builds a cushion.
The third trade is the one that made the result. It entered on 2022-12-01 at $387.70 and exited on 2025-04-04 at $511.18, 855 days later, for 31.85%. The stop did not touch it through the 2023 and 2024 advance, and it did not trigger in the August 2024 drop or the early 2025 slide until the sell-off of early April 2025. The trade gave back 15% from its peak before the stop closed it, which is the cost the strategy description states.
The fourth is open: 2025-05-13 at $573.39, marked 34.23% above entry. It adds to final equity but is not counted among the closed trades, the 33% win rate or the profit factor.
The average win was 31.85%, the average loss 11.57%, the average hold 362.3 days. The median return was an 8.76% loss and the median hold 195 days. Exposure was 75.9%, the share of trading days with a position at the close. Prices are adjusted for splits and dividends, and the exit prices come from the trailing stop level, so they carry more decimals than the entries.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2022-01-03 | 2022-12-28 | −31.1% | 359 | 2024-07-02 | 552 |
| 2025-02-19 | 2025-05-23 | −14.8% | 93 | 2025-10-27 | 157 |
| 2026-01-27 | 2026-03-30 | −8.5% | 62 | 2026-04-14 | 15 |
Buy-and-hold's deepest drawdown ran from 2022-01-03 to 2022-10-12 and reached −24.0%.
Why the drawdown was deeper than holding
The largest drawdown was 31.15%, from the peak on 2022-01-03 to a low on 2022-12-28, 359 days later. Equity did not regain its high until 2024-07-02, 552 days after the low. Buy-and-hold's deepest fall from the same peak was 23.99%, with a low on 2022-10-12 and a recovery on 2023-12-13.
A regime filter is meant to sidestep long declines, and this one did not in 2022. Both stops in 2022 were hit after the fund had already fallen, and both of the later entries came during rallies inside the bear market. The fund's own low was on 2022-10-12, and the sleeve was in cash for October and November. It bought on 2022-12-01 at $387.70, and the strategy's equity low came on 2022-12-28, after that purchase. The drawdown therefore includes the 14.37% stop loss, the earlier stop loss and a further decline after the third entry.
The second drawdown was 14.84%, from 2025-02-19 to 2025-05-23, 93 days down and 157 days to recover on 2025-10-27. Buy-and-hold fell 18.41% over the same peak and recovered on 2025-06-26. Here the stop did shorten the fall, though the sleeve stayed out and the recovery came later than holding. The third was 8.53% from 2026-01-27 to 2026-03-30, with a recovery on 2026-04-14. Holding had 8.76% over the same dates.
The Sharpe ratio was 0.5 against 0.95 for holding. The lower return and the deeper drawdown both fed into the lower ratio.
With trading costs
The headline run fills at the bar price. These runs charge slippage on every fill.
| Slippage per fill | CAGR | Max drawdown | Final value | Sharpe |
|---|---|---|---|---|
| None (headline) | 5.5% | −31.1% | $13,562 | 0.50 |
| 5 basis points | 5.4% | −31.3% | $13,531 | 0.49 |
| 10 basis points | 5.4% | −31.5% | $13,501 | 0.49 |
Cost runs
Slippage barely moved this result. At 5 basis points per fill the CAGR was 5.41% and the final value $13,531. At 10 basis points the CAGR was 5.37% and the final value $13,500.50. The drawdown widened from 31.15% to 31.32% and 31.49%, and the Sharpe ratio went from 0.5 to 0.495 and 0.491.
The headline run made 7 fills across 5.7 years. A fill is one buy or one sell, and a position held for 855 days pays slippage twice. A rule that trades this rarely has little exposure to costs. The only cost in these runs is slippage on each fill. Commissions and taxes are not modelled.
The cost of trading was small, and the shortfall against holding came from where the signals landed.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 5.5% | −31.1% | 3 | 33% | $13,562 |
| 10% trailing stop | 4.2% | −31.4% | 7 | 29% | $12,642 |
| 20% trailing stop | 5.4% | −31.1% | 2 | 50% | $13,532 |
| 25% trailing stop | 8.2% | −29.2% | 1 | 0% | $15,757 |
Widening and narrowing the stop
The trail is the one parameter in the exit. The 10% stop returned 4.17% a year with a 31.36% drawdown, 7 trades and 2 wins, ending at $12,642. The 20% stop returned 5.41% with a 31.11% drawdown, 2 trades and 1 win, ending at $13,532. The 25% stop returned 8.24% with a 29.18% drawdown, one trade and no closed wins, ending at $15,757. The published 15% stop returned 5.45% with 31.15%.
The pattern is that wider stops did better, and the table shows why. With a 25% stop the sleeve never exited. The row shows one trade and no closed win, which indicates the position was never stopped out, so the run is buy-and-hold from the first entry. The 8.24% CAGR is the result of owning the fund from 2021-10-19 and watching the 2022 decline without selling. It still trails the buy-and-hold result of 14.56%, because the first entry came in October 2021.
The 10% stop shows the opposite problem. Seven trades and two wins means the narrow stop sold repeatedly on routine declines and bought back higher. The 20% stop had two trades. The Sharpe ratio rose with width: 0.41 at 10%, 0.46 at 20%, 0.616 at 25%. The drawdown barely changed between 10% and 20%, at roughly 31%, which suggests the 2022 decline dominated every variant.
The caveat is that the best row is the one with no stop activity, so the test does not show that a wider stop adds value. It shows that on this window of SPY the exits did not help, and that the fewer exits the sleeve took, the closer it came to the fund.
How SPY behaved
| Measure | SPY |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 125.3% |
| Annualized volatility | 16.4% |
| Deepest drawdown | −24.5% (2022-01-03 to 2022-10-12) |
| Up days | 54.4% |
| Average daily range | 1.15% |
| Average overnight gap | 0.44% |
| Correlation to QQQ | 0.94 |
| Correlation to TLT | 0.08 |
| Sessions above the 200-day average | 78.0% |
| Crossings of the 200-day average | 30 |
| Falls of 10% or more from a 20-day high | 11 |
What SPY's behaviour did to a wide stop
SPY was above its 200-day average on 77.99% of sessions and crossed it 30 times, so the entry condition was usually true. That makes the stop the real decision-maker. With annualized volatility of 16.41%, an average daily range of 1.15% and a maximum drawdown of 24.51%, a 15% trail is wide enough to survive ordinary pullbacks, which it did through 2023 and 2024, and narrow enough to be hit in a long bear market, which it was in 2022.
SPY had 11 episodes of a 10% fall from a 20-day high, spread over 23 days. Those are the fast declines that a trailing stop is built for, and they are rare. The slow 2022 decline and the sharp 2025 drop were both larger than the stop. In 2025 the stop-out came on 2025-04-04, the fund's worst day of the window.
Lag-1 autocorrelation of negative 0.02 means yesterday's return says almost nothing about today's. The best day of the window, 9.39% on 2025-04-09, came days after the worst. A rule that exits after a drop and re-enters after the 200-day line is regained will tend to miss the bounce. The fund's 2022 rallies, such as 5.48% on 2022-11-10, came inside a bear market.
Compare the same rule on other funds. QQQ returned 11.27% with a 26.72% drawdown and IOO returned 10.63% with 19.72%. VOO, which holds the same index as SPY, returned 5.66% with 31.18%, close to SPY's 5.45% and 31.15%. SPY's 5.45% is above the 2.61% median for this rule across all 59 funds.
The rules
Enter when price is above the 200-day average; exit only when a 15% trailing stop is hit.
- WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
- WHILE invested · a managed trailing stop follows 15% below the position's high-water mark
A hybrid of the regime filter and the trailing stop. The 200-day average decides when to get in, and a 15% trail from the position's high-water mark decides when to get out. Winners can run well past the point where a crossover would have exited, and the position gives back 15% from every peak.
Good for: long trends with moderate pullbacks; the 15% trail is wide enough to survive normal corrections.
Watch out: every exit gives back 15% from the peak, and on choppy assets it re-enters above the 200-day repeatedly after each stop-out.
How the entry and the exit interact
The entry is the regime filter from the 200-day regime filter on SPY, which returned 8.3% with a 17.96% drawdown. This strategy uses the same entry and replaces the exit. The regime filter sells when the close falls below the average, and the trailing version waits for a 15% decline from the high. The regime filter made 15 round trips. This one made 3 closed ones.
The two exit rules fail in different ways. The average-based exit sells early and buys back often, and in 2022 and early 2023 it paid for that in a string of small losses. The stop-based exit sells late and rarely, and in 2022 it paid in two large losses. The regime filter ended with the shallower drawdown, 17.96% against 31.15%, and with a higher return, 8.3% against 5.45%.
The golden cross returned 8.71% with an 18.13% drawdown, the EMA 12/26 trend returned 10.2% with 11.84%, and the momentum breakout returned 9.09% with 13.14%. All three had shallower drawdowns on this fund.
Limits: one window, 5.7 years, one bear market, a single fund. Three closed trades cannot support a general claim about trailing stops. The headline run has no fees or slippage, decisions are daily, and orders fill on minute bars. The test describes what these rules did on SPY between 2021-01-04 and 2026-10-02 and makes no statement about other periods.
Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.
Frequently asked questions
Did trend + trailing stop beat buy-and-hold on SPY?
Over 2021-01-04 to 2026-10-02, trend + trailing stop on SPY returned 5.5% annualized vs 14.6% for buy-and-hold: it trailed buy-and-hold by 9.1% per year, with a maximum drawdown of 31.1% (buy-and-hold: 24.0%).
How many trades did it make?
3 completed round trips over 5.7 years (7 fills), with 33% of round trips closing profitably.
Why 15% rather than 10%?
A wider trail survives routine corrections and gives back more at the end. Both numbers are one-field edits in DeployQuant, so you can backtest both and compare.
Did the trailing stop version beat buy-and-hold on SPY?
No. It returned 5.45% a year against 14.56% for holding, ending at $13,562 against $21,820 from $10,000. It trailed in every calendar year of the test.
Why was the drawdown deeper than buy-and-hold?
The maximum drawdown was 31.15% against 23.99% for holding. Both 2022 stops were hit after the fund had already fallen, and the sleeve bought again during rallies inside the bear market. Its low came on 2022-12-28, after the third entry.
How many trades did it make?
Three closed round trips and one open position, with 7 fills in total. One of the three closed trades won, the 855-day hold that gained 31.85%. The open position bought on 2025-05-13 stood 34.23% above entry at the last close.
What happens if the trailing stop is wider?
In this window wider stops did better. The 20% stop returned 5.41% and the 25% stop returned 8.24%, with only one trade and no stop-out. The result shows fewer exits kept the sleeve closer to the fund, and does not show the wider stop adds value.
Does trading cost matter for this strategy?
Very little. At 5 basis points per fill the CAGR was 5.41% and at 10 basis points 5.37%. The strategy made 7 fills over 5.7 years.
How does this compare with the plain 200-day filter?
The regime filter on SPY returned 8.3% with a 17.96% drawdown. This version returned 5.45% with a 31.15% drawdown. Both use the same entry, and the difference is the exit rule.
Related
Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.