20-Day Momentum + 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.
The 20-day momentum breakout with a trailing stop, run on SPY, turned $10,000 into $16,474.94 between 2021-01-04 and 2026-10-02. That is a total return of 64.75% and a CAGR of 9.09%. Buying and holding SPY over the same dates made $21,820.48, a total return of 118.2% and a CAGR of 14.56%. The rule finished behind holding by a wide margin.
What the rule gave up in return it took back in drawdown. Its maximum drawdown was 13.14%, against 23.99% for holding. The Sharpe ratio was 0.91 against 0.95, so the return per unit of volatility was close. The rule was invested on 64.6% of sessions.
The entire result comes from four entries. The rule needs SPY to gain more than 10% in 20 sessions before it buys, and that did not happen in 2021 at all. The first fill was on 2022-08-11. Three round trips have closed since, two of them winners, and a fourth position, entered on 2025-05-06, was still open on the last day and is up 40.18%.
SPY ranks 12th of the 59 funds for this rule and the rule ranks fifth of the 12 templates on SPY. On the median fund of the 59 the rule's CAGR was 0%, because on many funds the 10% burst never came. SPY is one of the funds where it did. The window is 5.74 years long. The headline run leaves out fees and slippage, and with four entries the numbers rest on very few events.
Year by year
| Year | momentum breakout | buy & hold |
|---|---|---|
| 2021 | 0.0% | 29.6% |
| 2022 | −10.6% | −17.8% |
| 2023 | 13.4% | 25.5% |
| 2024 | 23.7% | 24.3% |
| 2025 | 15.7% | 17.4% |
| 2026 | 13.5% | 13.6% |
Six years with one flat start
The rule returned 0% in 2021, -10.6% in 2022, 13.4% in 2023, 23.7% in 2024, 15.7% in 2025 and 13.5% in 2026 to date. Holding SPY returned 29.6%, -17.8%, 25.5%, 24.3%, 17.4% and 13.6%. Holding was ahead in five years. Only 2022 went the rule's way, by 7.2 points.
2021 is the largest single gap in the table, 29.6 points. The rule held no position all year and all of 2022 until August, because SPY never rose 10% inside 20 sessions in that stretch. A steady bull market with small daily gains does not trigger a rule that asks for a burst. The 2021 gap alone accounts for much of the difference in final wealth, and nothing the rule did afterwards could recover it.
2022 produced the rule's only losing round trip and a short one. It bought on 2022-08-11 at an adjusted $399.91, after the summer rally had pushed the 20-day return past 10%, and sold on 2022-09-06 at $367.389 when the trailing stop hit, a loss of 8.13% in 26 days. August cost 6.31% and September 1.59%. The rule then bought again on 2022-11-14 at $376.70. November returned 2.53% and December lost 5.38%, which left the year at -10.6% against -17.8% for holding.
2023 returned 13.4% to the rule and 25.5% to holding. The second position was open the whole year until it was sold on 2023-10-26 at $397.359 for a gain of 5.48%. The rule made 5.89% in January, 3.49% in March, 6.13% in June and 3.08% in July, then gave back 4.5% in September and 3.39% in October as the stop approached. The rule sat in cash from the end of October until it bought again on 2023-11-27.
2024 was the closest year. The rule made 23.7% against 24.3% for holding, a gap of 0.6 points. The position from 2023-11-27 was held through all twelve months of 2024 and well into 2025. Strong months were 4.95% in February, 4.82% in May and 5.73% in November, and the weak ones were -3.86% in April and -2.31% in December. In a year when SPY trended, the rule matched it.
2025 returned 15.7% against 17.4%. The big events were February and March. The 2023 position was stopped out on 2025-03-13 at $541.251, a gain of 23.3% over 472 days, after the market fell 6.83% on the rule's account in March. The rule stayed out through April, and the account made nothing that month. It bought again on 2025-05-06 at $549.06, after the 20-day return had cleared 10% in the rebound, and May, June and July returned 5.45%, 5%, and 2.23%.
2026 so far shows 13.5% for the rule and 13.6% for holding, a gap of 0.1 points. The position from May 2025 was held the whole time. March 2026 lost 4.87% and April made 10.25%, the rule's best month.
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% | 0.0% | 0.0% | 0.0% |
| 2022 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | −6.3% | −1.6% | 0.0% | 2.5% | −5.4% |
| 2023 | 5.9% | −2.4% | 3.5% | 1.5% | 0.4% | 6.1% | 3.1% | −1.6% | −4.5% | −3.4% | 0.2% | 4.4% |
| 2024 | 1.5% | 5.0% | 3.1% | −3.9% | 4.8% | 3.4% | 1.1% | 2.3% | 2.1% | −0.9% | 5.7% | −2.3% |
| 2025 | 2.6% | −1.2% | −6.8% | 0.0% | 5.5% | 5.0% | 2.2% | 2.0% | 3.5% | 2.3% | 0.2% | 0.1% |
| 2026 | 1.4% | −0.8% | −4.9% | 10.3% | 5.2% | −1.1% | 0.1% | 2.6% | −0.3% | 0.9% | – | – |
Where the monthly returns came from
The grid is blank for 19 months at the start. The first non-zero figure is August 2022 at -6.31%. After that the rule is invested in most months, with zeros only in October 2022, the period between the sale on 2023-10-26 and the repurchase on 2023-11-27 (which touched both October and November), and April 2025.
The best month was April 2026 at 10.25%, and holding's best month was the same month at 10.33%. The worst was March 2025 at -6.83%, and holding's worst was September 2022 at -9%. The rule missed September 2022 on the downside because the stop had already sold it on 2022-09-06. March 2025 was the month the rule took a loss that holding also took, with the stop closing the position only on 2025-03-13 after the fall had started.
The positive months run in streaks once a position is on. From May 2025 to January 2026 every month was positive: 5.45%, 5%, 2.23%, 2.02%, 3.47%, 2.33%, 0.2%, 0.07% and 1.44%. The rule has no profit target, and the grid shows what that looks like in a year when SPY kept going up. The weakest streak was the second half of 2023, with September at -4.5% and October at -3.39%, before the stop sold the position.
The pattern in the month-by-month record is that this rule suffers most in the first month or two after an entry, when a burst can reverse, and collects most of its return in the long middle of a trend. The first position lost 8.13% almost immediately. The second, third and fourth were still gaining after a year.
Every trade
momentum breakout on SPY made 3 closed round trips and one position still open at the end of the test, an average hold of 281 days, an average winner of 14.39%, an average loser of −8.13%, a profit factor of 3.36, a longest losing streak of 1. It held a position at the close on 64.6% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2022-08-11 | $399.91 | 2022-09-06 | $367.39 | −8.1% | 26 |
| 2022-11-14 | $376.70 | 2023-10-26 | $397.36 | 5.5% | 346 |
| 2023-11-27 | $438.97 | 2025-03-13 | $541.25 | 23.3% | 472 |
| 2025-05-06 | $549.06 | open | – | 40.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.
Four entries and what each did
The trade list has four rows. Three closed and one is open.
- 2022-08-11 to 2022-09-06: from $399.91 to $367.389, -8.13% in 26 days
- 2022-11-14 to 2023-10-26: from $376.70 to $397.359, 5.48% in 346 days
- 2023-11-27 to 2025-03-13: from $438.97 to $541.251, 23.3% in 472 days
- 2025-05-06 and open: from $549.06, up 40.18% at the close on 2026-10-02
The win rate on closed trades was 67%, two of three. The average win was 14.39% and the average loss was -8.13%, which gives a profit factor of 3.36. The median return was 5.48% and the median hold was 346 days. The shortest hold was 26 days and the longest closed hold was 472 days. The longest winning streak was 2 and the longest losing streak 1. Prices are adjusted for splits and dividends.
The contrast between the first trade and the other three is the nature of the rule. A 10% jump in 20 sessions is a sharp move, and the first one came during the 2022 bear market. A burst in a falling market can be a rebound inside a downtrend. The stop sold the position 10% below its high-water mark, so a loss of 8.13% means the position never rose far above its entry before falling.
The next entry, in November 2022, came after a similar burst but near the bottom of the decline. The fund's best days that month, including 5.48% on 2022-11-10, happened just before the rule bought on 2022-11-14. Entering after the burst meant paying a higher price than the October low, which is the cost of confirming momentum before acting. That trade held for 346 days and exited at 5.48%, a modest result for nearly a year of exposure, because the stop sold it in October 2023 during the September and October slide.
The open position deserves a caution. Its 40.18% gain is unrealised, and the trailing stop is 10% below the highest price since the entry. The final return depends on where the stop is eventually hit, and the test stops at the last day of data.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2022-08-16 | 2022-12-28 | −13.1% | 134 | 2023-06-13 | 167 |
| 2025-02-19 | 2025-03-13 | −9.6% | 22 | 2025-06-30 | 109 |
| 2023-07-31 | 2023-11-27 | −9.3% | 119 | 2024-02-15 | 80 |
Buy-and-hold's deepest drawdown ran from 2022-01-03 to 2022-10-12 and reached −24.0%.
Drawdowns compared with holding
The rule's deepest drawdown was 13.14%, from a peak on 2022-08-16 to a trough on 2022-12-28, 134 days later. It recovered on 2023-06-13 after 167 more days. Holding's deepest was 23.99%, from 2022-01-03 to 2022-10-12, recovering on 2023-12-13. The rule's drawdown starts five days after the first entry. It bought into the August 2022 rally, held through the failed breakout, and took the later fall in December.
The second drawdown was 9.59%, from 2025-02-19 to 2025-03-13, recovered on 2025-06-30 after 109 days. Holding's second was 18.41% from the same peak, which bottomed on 2025-04-08. The rule's stop on 2025-03-13 ended the loss at the lower figure and left the position out of the market for the April rebound. That is the trade-off in one episode: the rule took a smaller loss than holding and also missed the first part of the recovery, though it bought again on 2025-05-06.
The third was 9.3%, from 2023-07-31 to 2023-11-27, recovered on 2024-02-15 after 80 days. It covers the late-2023 slide that ended the second position. Holding had a third drawdown of 8.76% in early 2026, from 2026-01-27 to 2026-03-30, which the rule also went through since it held the whole time.
The maximum drawdown was lower by 10.85 points than holding's, while the final wealth was lower by $5,345.54. The Sharpe ratios of 0.91 and 0.95 show that on a risk-adjusted basis the two were much closer than the CAGRs of 9.09% and 14.56% suggest. The drawdown protection is real in this test, but it came at the price of sitting out 2021 and the start of 2022. The exposure figure of 64.6% reflects that.
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) | 9.1% | −13.1% | $16,475 | 0.91 |
| 5 basis points | 9.1% | −13.2% | $16,441 | 0.90 |
| 10 basis points | 9.0% | −13.3% | $16,407 | 0.90 |
Cost runs
The rule made seven fills, so costs have little to act on. With 5 basis points taken off each fill the CAGR was 9.05%, the end value $16,440.78 and the maximum drawdown 13.23%. With 10 basis points it was 9.01%, the end value $16,406.62 and the maximum drawdown 13.32%. The Sharpe ratio moved from 0.91 to 0.9 and 0.895.
The headline run was 9.09% and $16,474.94. The whole cost effect over the window is a few tens of dollars. SPY is the most heavily traded fund in the data, with an average daily dollar volume of $30,453,859,411 and a median minute volume of 107,870 shares, so a $10,000 order has no visible effect on price, and a flat 5 or 10 basis points is a conservative assumption for it.
Compare this with a rule that trades 20 or 30 times: it would pay the same cost on every fill. A rule with four entries and three exits barely feels it. The low trade count is a structural feature of the breakout entry and trailing stop, since each position can run for a year or longer.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 9.1% | −13.1% | 3 | 67% | $16,475 |
| 5% trailing stop | 3.9% | −6.1% | 5 | 60% | $12,426 |
| 15% trailing stop | 8.7% | −17.8% | 2 | 50% | $16,100 |
| 20% return entry | 0.0% | −0.0% | 0 | – | $10,000 |
Trailing stops of 5% and 15%, and a 20% entry
Three variants were run in place of the published 10% stop and 10% entry.
- 5% trailing stop: CAGR 3.86%, maximum drawdown 6.09%, Sharpe 0.693, 5 trades with 3 wins, end value $12,426.46
- 15% trailing stop: CAGR 8.65%, maximum drawdown 17.79%, Sharpe 0.815, 2 trades with 1 win, end value $16,100.04
- 20% return entry: no trades, CAGR 0%, end value $10,000
The stop width controls how long the rule stays in. With a 5% stop the rule is shaken out often, and the CAGR drops to 3.86%. The drawdown is shallow at 6.09%, but the gains are cut short on every pullback. With a 15% stop the rule holds on longer, with a deeper drawdown of 17.79% and a lower Sharpe of 0.815 than the published 0.91. The published 10% stop gave the best Sharpe and the highest CAGR of the three stops, and it sits between the two on drawdown.
The 20% entry never fired. SPY did not gain 20% in 20 sessions at any point in the data. The best single day was 9.39% on 2025-04-09, and the window's biggest burst was well below a 20% gain in four weeks. The result is $10,000 and nothing else: a rule with an entry that is never met is a rule that does not trade. That is the reason the 59-fund median CAGR is 0%.
The variants show that the trailing stop has a larger effect than the entry on SPY, within the range tested. The published stop is also one of three points on a short grid, tested on one window, so the figures describe the sensitivity of this single run.
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 |
How SPY behaved
SPY returned 125.29% over the window, a CAGR of 15.2%, with annualized volatility of 16.41%. Its maximum drawdown was 24.51%, from 2022-01-03 to 2022-10-12, and it recovered on 2023-12-13 after 488 sessions underwater. The calendar years were 30.46% in 2021, -18.16% in 2022, 26.18% in 2023, 24.86% in 2024, 17.72% in 2025 and 13.77% in 2026 so far.
The fund closed up on 54.4% of its 1,444 sessions. The average up day and the average down day were both 0.74%, in size. The best days were 9.39% on 2025-04-09, 5.48% on 2022-11-10 and 3.29% on 2025-05-12. The worst were -5.98% on 2025-04-04, -4.78% on 2025-04-03 and -4.34% on 2022-09-13. The overnight share of its return was 62.46% and the intraday share 37.54%, with an average gap of 0.44% and an average range of 1.15%.
This rule needs a 10% rise in 20 sessions, and SPY's trend is slow. It rose above its 200-day average on 77.99% of sessions and crossed it 30 times. A steady climb of one or two percent a month never meets the entry, and the 2021 record shows it. The bursts came out of declines: the summer of 2022, the November 2022 rebound, the late 2023 rally and the recovery after April 2025. The fund had 11 events with a fall of 10% or more from a 20-day high, spread over 23 days, which is a useful count of how often large swings occurred.
RSI(14) fell below 30 on 18 sessions, and the median return after them was 3.74% over five days and 2.86% over twenty, against baselines of 0.42% and 1.73%. RSI(2) fell below 10 on 146 sessions with medians of 0.89% and 2.29%. SPY bounced after oversold readings in this window, which helps explain why the RSI(2) snapback ranked second here with a 13.17% CAGR while the breakout ranked fifth.
SPY's correlation to QQQ was 0.94, with a beta of 0.69, and to TLT 0.08, with a beta of 0.08. Its most similar funds are VOO and SSO at 1, and the inverse funds SDS, SH and SPDN sit at -1. Among the broad index funds the breakout made 9.34% on VV, 9.19% on VOO and 9.09% on SPY, each with 3 round trips. On QQQ it made 7.84% with 8 round trips and a 26.54% drawdown.
The rules
Buy after a +10% four-week burst and let a 10% trailing stop manage the exit.
- WHEN the market opens · IF not invested AND the 20-day return > +10% · THEN buy with 98% of the sleeve
- WHILE invested · a managed trailing stop follows 10% below the position's high-water mark
Momentum entry, trailing-stop exit. A +10% gain over 20 sessions marks a burst of momentum. The template buys the strength and exits on a 10% trailing stop that ratchets up beneath the highest close and never moves down. There is no profit target, so winners run until the trail is hit.
Good for: high-momentum assets where trends extend, such as semiconductor and leveraged tech ETFs.
Watch out: buying strength means buying high; when a burst immediately reverses, the trail exits about 10% below the entry.
How the breakout rule fits an index fund
The rule buys at the open with 98% of the sleeve when the 20-day return is above 10%. While it holds, a trailing stop follows 10% below the highest close and only moves up. There is no profit target and no other exit, so every position ends at the stop.
On a diversified index the entry is rare and the stop is rarely hit in a rising market, so the rule behaves like a late-starting buy-and-hold with an exit. That describes SPY: three round trips in 5.74 years, an average hold of 281.3 days, and 64.6% exposure. On leveraged or sector funds with larger bursts the same rule trades far more often.
The other templates on SPY did better on CAGR. The weekly 7% target made 13.88% with a 24.1% drawdown and the RSI(2) snapback 13.17% with 12.69%. The monthly cycle made 12.84% and the EMA 12/26 10.2% with 11.84%. This rule is fifth at 9.09%. Behind it come the golden cross at 8.71%, the 200-day regime filter at 8.3%, the 3-month momentum at 8.21% and the SMA 10/50 at 7.94%.
The trend with trailing stop made 5.45% with a 31.15% drawdown, the deepest of the 12, and the RSI mean reversion and dip buyer made 4.37% and 2.61%. On drawdown the breakout's 13.14% sits below the 24.1% of the weekly target and above the 11.84% of the EMA rule.
The full table for this rule shows how it did on other funds. The limits of this page are the same as any single backtest: one window, one fund, daily decisions and no fees in the headline run. Four entries do not tell how the rule would act over a different decade.
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 momentum breakout beat buy-and-hold on SPY?
Over 2021-01-04 to 2026-10-02, momentum breakout on SPY returned 9.1% annualized vs 14.6% for buy-and-hold: it trailed buy-and-hold by 5.5% per year, with a maximum drawdown 10.8 points shallower than holding (13.1% vs 24.0%).
How many trades did it make?
3 completed round trips over 5.7 years (7 fills), with 67% of round trips closing profitably.
How does the trailing stop work in the backtest?
The stop sits 10% below the highest price since entry and only ratchets up. When a bar trades through it, the position sells at the stop, or at the open if the price gaps below it. Trailing-stop exits can be backtested now; deploying them live is not available yet.
Did the 20-day momentum breakout beat buy-and-hold on SPY?
No. The rule made a CAGR of 9.09% and ended at $16,474.94, while holding made 14.56% and ended at $21,820.48. The rule's maximum drawdown was 13.14% against 23.99%, and it beat holding only in 2022.
Why did the rule not trade in 2021?
The entry needs a gain of more than 10% over 20 sessions, and SPY did not move that fast in 2021 or in the first part of 2022. The first buy was on 2022-08-11. The rule returned 0% in 2021 while holding returned 29.6%.
How often did the momentum breakout trade SPY?
Three round trips closed and a fourth was open at the end. Two of the three closed trades won, a win rate of 67%, with an average win of 14.39% and an average loss of -8.13%. The profit factor was 3.36.
What is the open position worth?
The position entered on 2025-05-06 at an adjusted $549.06 was up 40.18% at the close on 2026-10-02. It is unrealised, and the 10% trailing stop sits below the highest close since the entry.
What happens with a 5% or 15% trailing stop?
A 5% stop gave a CAGR of 3.86% with a 6.09% drawdown and 5 trades. A 15% stop gave 8.65% with a 17.79% drawdown and 2 trades. The published 10% stop made 9.09% with a 13.14% drawdown.
Do trading costs matter for this rule on SPY?
Very little. With 5 basis points per fill the CAGR was 9.05% and with 10 basis points 9.01%. The rule made 7 fills in the whole window.
Which strategy did best on SPY?
The weekly 7% target had the highest CAGR at 13.88%, followed by the RSI(2) snapback at 13.17% and the monthly cycle at 12.84%. The momentum breakout ranked fifth of the 12 at 9.09%.
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.