Learn › Strategies › 20-Day Momentum + Trailing Stop › SOXX

20-Day Momentum + Trailing Stop on SOXX

iShares Semiconductor ETF: the semiconductor industry, a high-momentum sector. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.

Result: momentum breakout on SOXX turned $10,000 into $24,308 (143.1% total, 16.7% CAGR): it trailed buy-and-hold by 14.4% per year, with a maximum drawdown 14.8 points shallower than holding (30.2% vs 45.1%).

Run on SOXX, the iShares Semiconductor ETF, the 20-day momentum with trailing stop template grew $10,000 to $24,308 between 2021-01-04 and 2026-10-02. That is a CAGR of 16.73%, a maximum drawdown of 30.23% and a Sharpe ratio of 0.78. SOXX bought and held over the same 5.74 years ended at $47,348, a CAGR of 31.11% with a drawdown of 45.06%. The strategy made money and kept less than the fund by a wide margin.

The rule has an entry and a managed exit. At the open, if the fund is not held and its 20-session return is above 10%, the rule buys with 98% of the sleeve. While it is held, a trailing stop sits 10% below the highest close since entry and only moves up. There is no profit target, so a winner stays open until the fund falls 10% from its peak.

SOXX is one of the better homes for this rule. It ranks fourth of 59 funds for the strategy, and it ranks ninth of the 12 strategies on SOXX. Both facts are true at once because SOXX was a strong fund for almost everything: the top strategies here, led by the weekly 7% target at 30.54%, got close to the fund's own return, and the momentum rule was in the lower part of that group. The median result for this strategy across all 59 funds is a CAGR of 0%, and for the sector category it is 6.99%, so a 16.73% result stands well above its peers in absolute terms.

The figures below cover the calendar years, the 19 trades, the three drawdowns, the cost runs and the parameter variants, tied to what SOXX did. Everything is hypothetical, from one window, with daily-decision rules and no fees or slippage in the headline run.

16.7%CAGR
31.1%buy & hold CAGR
−30.2%max drawdown
0.78Sharpe ratio
18round trips
61%win rate
■ momentum breakout   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yearmomentum breakoutbuy & hold
202114.0%43.6%
2022−14.3%−34.5%
202316.5%65.3%
2024−1.2%12.8%
202534.3%40.1%
202660.9%95.0%

Year by year against the fund

The rule's yearly returns were 14% in 2021, -14.3% in 2022, 16.5% in 2023, -1.2% in 2024, 34.3% in 2025 and 60.9% so far in 2026. The fund returned 43.6%, -34.5%, 65.3%, 12.8%, 40.1% and 95%.

2022 is the one year the rule came out ahead, by 20.2 percentage points. The fund lost 34.5% and the rule lost 14.3%. The rule was flat in February, March, May, June, September and October of that year, which are the months a 20-day burst above 10% was missing or the stop had already fired. It still lost 14.3% because it made four round trips in 2022 and only two won. The 2022-04-05 entry lost 9.71% in 6 days, a case of buying a burst that reversed at once.

2023 is the largest gap in the other direction. The fund gained 65.3% and the rule 16.5%. A momentum trigger needs a 10% gain in 20 sessions, so the rule entered on 2023-01-24 and exited on 2023-04-25 for 0.34%. It then entered on 2023-05-26 for 3.24%. The big trade of the year, 26.91% from 2023-11-17 to 2024-03-19, started late in the year and closed in 2024. That trade closed in 2024, so its gain counts toward 2024 and not 2023.

2024 was the fund's quiet year at 12.8%, and the rule lost 1.2% with four round trips and two wins. Two of the losses were fast: the 2024-09-03 entry lost 10% by 2024-09-06, and 2025-01-23 lost 8.45% by 2025-01-27. In both cases the fund had a sharp one-day drop soon after the rule bought into a burst.

2025 and 2026 supply the profit. The 2025-05-05 entry, one month after the April 2025 low, turned into the best trade of the run: 49.7% over 193 days. Five round trips closed in 2026 and four of them won. The rule made 60.9% so far this year, against 95% for the fund, a gap of 34.1 points. Even in the best year the rule gave up a large part of the fund's gain, because each entry waits for a 10% burst and each exit waits for a 10% pullback.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%−5.1%−4.0%4.7%0.5%2.4%−4.4%6.3%11.2%2.7%
2022−7.1%0.0%0.0%−9.5%0.0%0.0%2.0%−6.1%0.0%0.0%14.7%−7.2%
20230.8%1.4%8.7%−9.7%1.6%6.4%5.2%−9.4%0.0%0.0%0.5%12.1%
20241.7%11.0%−0.7%0.0%1.5%5.3%−2.4%0.0%−9.7%−4.8%−1.6%0.0%
2025−8.3%0.0%0.0%0.0%8.5%16.5%0.5%2.1%10.7%12.8%−8.3%−1.5%
202614.6%−5.3%0.0%19.5%16.0%5.3%−8.9%−2.9%10.9%3.5%––

Monthly returns

The best month was April 2026 at 19.52%, when the fund itself gained 40.13%. The worst was September 2024 at a loss of 9.73%, which came from the 10% loss in 3 days on the 2024-09-03 entry. The fund's worst month was July 2026 at a loss of 21.13%, and the rule lost 8.95% in the same month, so the trailing stop kept the loss well below the fund's fall.

The rule was flat in many months, which shows as exact zeros: the first three months of 2021, February and March 2022, May and June 2022, September and October 2022, and several more in 2023 to 2025. The rule's exposure was 51.4% of days, so about half the calendar was spent in cash, and that cash was a drag in the strong years and a protection in 2022.

Two runs of consecutive wins stand out. May 2025 to October 2025 was positive in every month from 8.51% in May, 16.53% in June, up to 12.82% in October, and the November figure of -8.34% ended it. January 2026, April 2026 and May 2026 gave 14.61%, 19.52% and 16.04%. The rule makes most of its return in a few long positive streaks, and the loss months tend to come as single events of 8% to 10% rather than long slides.

November 2022 was the fund's recovery month, and the rule captured 14.66% of it after entering on 2022-11-09, a few weeks after the fund's 2022-10-14 low. The same month in the fund's own statistics shows SOXX averaging 8.44% in November across the five Novembers in the window.

Every trade

momentum breakout on SOXX made 18 closed round trips and one position still open at the end of the test, an average hold of 58 days, an average winner of 13.72%, an average loser of −7.37%, a profit factor of 2.96, a longest losing streak of 3. It held a position at the close on 51.4% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-04-05$142.442021-05-04$129.43−9.1%29
2021-06-11$138.752022-01-19$161.7716.6%222
2022-04-05$150.322022-04-11$135.72−9.7%6
2022-07-22$128.742022-08-29$123.14−4.3%38
2022-11-09$109.542022-12-16$116.786.6%37
2023-01-24$130.262023-04-25$130.700.3%91
2023-05-26$152.822023-08-14$157.783.2%80
2023-11-17$167.462024-03-19$212.5226.9%123
2024-05-17$227.512024-07-18$237.474.4%62
2024-09-03$223.322024-09-06$200.99−10.0%3
2024-10-07$227.402024-11-15$212.36−6.6%39
2025-01-23$229.472025-01-27$210.08−8.4%4
2025-05-05$186.852025-11-14$279.7249.7%193
2025-12-22$305.282026-02-04$326.857.1%44
2026-04-10$383.092026-05-19$479.8325.3%39
2026-05-20$507.532026-06-05$556.339.6%16
2026-06-12$582.832026-06-24$589.971.2%12
2026-06-26$600.182026-07-02$580.07−3.4%6
2026-08-27$526.33open–11.9%–

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 19 trades

There were 19 trades, 18 closed and one open. Eleven of the 18 closed round trips won, a rate of 61%. The average winner returned 13.72% and the average loser lost 7.37%, which gives a profit factor of 2.96. The median trade returned 3.24% and the median hold was 39 days. The longest hold was 222 days and the shortest was 3 days. The longest win streak was 5 trades and the longest loss streak was 3.

The best five, in order: 49.7% from 2025-05-05 to 2025-11-14 over 193 days, 26.91% from 2023-11-17 to 2024-03-19 over 123 days, 25.25% from 2026-04-10 to 2026-05-19 over 39 days, 16.59% from 2021-06-11 to 2022-01-19 over 222 days, and 9.61% from 2026-05-20 to 2026-06-05 over 16 days. Four of those five lasted more than a month and three lasted more than four months. The rule earns its return from a few long holds where the 10% trail stayed below the price for months.

The worst five were -10% from 2024-09-03 to 2024-09-06, -9.71% from 2022-04-05 to 2022-04-11, -9.13% from 2021-04-05 to 2021-05-04, -8.45% from 2025-01-23 to 2025-01-27 and -6.61% from 2024-10-07 to 2024-11-15. The worst loss is almost exactly the stop distance. The 10% trail sits under the entry price, so a burst that reverses immediately costs about 10%, and the losses cluster at that level. The worst trade of -10% and the average loss of -7.37% both reflect it. A single trade cannot lose much more than the trail distance, apart from overnight gaps, and none of the 18 closed trades did.

The first trade, entered on 2021-04-05 at an adjusted price of 142.44, lost 9.13% in 29 days. The last closed trade lost 3.35% from 2026-06-26 to 2026-07-02, in the middle of the fund's July 2026 drop. An open position was bought on 2026-08-27 at 526.33 and showed a gain of 11.89% at the end of the window. It is not in the win rate.

Winners were larger than losers in size and in count, and that pairing is what holds the profit factor near 3. The strategy's entries are late, since the fund must already be up 10% in 20 sessions, and still most of the entries worked. On a fund that gained 388.35% in total, a late entry into a burst was often followed by more strength.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2024-07-102025-05-06−30.2%3002025-09-22139
2021-12-272022-11-09−22.5%3172024-01-19436
2026-06-222026-09-14−17.3%84not yet–

Buy-and-hold's deepest drawdown ran from 2021-12-27 to 2022-10-14 and reached −45.1%.

Drawdowns

The largest drawdown was 30.23%, from a peak on 2024-07-10 to a trough on 2025-05-06, which is 300 days down. The account recovered on 2025-09-22, 139 days after the trough. The fund's own fall from the same peak was 40.93%, from 2024-07-10 to 2025-04-08, with recovery on 2025-09-18. The rule's trough came about a month after the fund's. The 2025-01-23 entry lost 8.45% inside that stretch, and the September to November 2024 losses were part of the slide.

The second drawdown was 22.54%, from 2021-12-27 to 2022-11-09, 317 days, with recovery on 2024-01-19. The fund fell 45.06% in the same period, its worst of the window, from the same 2021-12-27 peak to 2022-10-14, and did not recover until 2023-12-13. The rule's drawdown was much shallower than the fund's. This is the case the trailing stop is built for, and the numbers show it working in the 2022 bear market.

The third drawdown began on 2026-06-22 and reached 17.29% by 2026-09-14, and had not recovered at the end of the data. The fund's equivalent fall was 28.99% by 2026-07-29. The rule's maximum drawdown is 14.83 points smaller than the fund's. That is the main thing the stop bought. The price was a CAGR gap of 14.38 points a year and a lower Sharpe ratio, 0.78 against 0.92.

A trailing stop at 10% cannot stop a gap. SOXX's worst days were -10.45% on 2026-06-05, -10.11% on 2025-04-03 and -8.34% on 2025-04-10. When one of those days arrives while the rule is invested, the loss already exceeds the stop distance before the next open. The strategy's worst closed trade was -10%, so the run did not suffer a gap loss far beyond the stop, but the test is one window and the fund had days of this size.

With trading costs

The headline run fills at the bar price. These runs charge slippage on every fill.

Slippage per fillCAGRMax drawdownFinal valueSharpe
None (headline)16.7%−30.2%$24,3080.78
5 basis points16.3%−30.4%$23,8280.76
10 basis points16.0%−30.8%$23,4140.75

Cost runs

Adding 5 basis points per trade moved the CAGR from 16.73% to 16.33% and ending equity from $24,308 to $23,828. The maximum drawdown went from 30.23% to 30.4% and the Sharpe ratio from 0.78 to 0.764. At 10 basis points the CAGR was 15.97%, ending equity $23,414, drawdown 30.77% and Sharpe 0.749.

The result changes slowly with cost. The rule makes 37 fills over 5.74 years, and a 10 basis point charge on each fill does not alter the picture. SOXX trades over $1 billion in dollar volume on an average day, with a median minute volume of 5,853 shares. The cost runs use fixed assumptions and do not measure of what a given broker charges.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules16.7%−30.2%1861%$24,308
5% trailing stop14.3%−22.6%4854%$21,546
15% trailing stop14.0%−34.9%1258%$21,230
20% return entry6.0%−22.4%1030%$13,964

Parameter variants

The tested variants change one setting each.

Tightening the stop to 5% cut the drawdown from 30.23% to 22.61% and raised the Sharpe ratio above the standard setting, to 0.819 from 0.78, but trading went up to 48 trades and the CAGR fell. Loosening the stop to 15% gave a deeper drawdown and a lower Sharpe ratio on 12 trades. Both directions gave less CAGR than the 10% stop, which gave the best return of the three stop settings. The 10% setting sits between a tight stop that gets shaken out and a loose stop that gives back too much.

The 20% entry threshold is the weakest variant. Requiring a 20% gain in 20 sessions produced only 10 trades and 3 wins, and it ended at $13,964. A burst that large was rare on SOXX, and the entries that did occur came after much of the move.

These variants are neighbours of the default, tested on the same window as the default. The 5% stop has the best Sharpe ratio and the 10% stop has the best CAGR, so the ranking depends on which measure is used. No setting here has been tested outside this window.

How SOXX behaved

MeasureSOXX
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold388.4%
Annualized volatility38.1%
Deepest drawdown−45.8% (2021-12-27 to 2022-10-14)
Up days53.9%
Average daily range2.58%
Average overnight gap1.07%
Correlation to SPY0.79
Correlation to QQQ0.87
Correlation to TLT0.05
Sessions above the 200-day average70.7%
Crossings of the 200-day average38
Falls of 10% or more from a 20-day high43

How SOXX behaved

SOXX returned 388.35% over the window, a CAGR of 31.81% on price, with annualized volatility of 38.08%. Calendar returns were 44.66% in 2021, -35.07% in 2022, 66.96% in 2023, 13% in 2024, 40.68% in 2025 and 95.9% so far in 2026. The maximum drawdown was 45.81% from 2021-12-27 to 2022-10-14, with recovery on 2023-12-13, and the longest stretch below a prior high ran 493 sessions.

The fund moves with technology but harder. Its beta to SPY was 1.84 and to QQQ 1.49, with correlations of 0.79 and 0.87. Against TLT the beta was 0.11. A fund with that beta turns an ordinary market swing into a large one, which is why a 10% gain in 20 sessions was common enough to trigger 19 trades. The same rule on XLK made 11.62% a year with 9 round trips, and on XLF, XLY, VOX and XLP it made less.

Average daily moves are large: the up days averaged 1.78% and the down days -1.78%, with an average intraday range of 2.58%. SOXX rose on 53.92% of sessions. There were 43 episodes in which the fund fell 10% within 20 sessions, spread over 197 days, so a 10% trail was touched often. The rule's 18 closed trades are consistent with that.

Trend persistence supports the rule. The fund spent 70.68% of sessions above its 200-day average and crossed that line 38 times. Lag-1 autocorrelation was -0.09, slightly negative, so there is no strong day-to-day persistence, and the profit came from multi-week bursts and not from daily follow-through.

The overnight versus intraday split is unusual. The overnight log return was 136.36% and the intraday log return was 21.22%, so overnight gaps carried 86.53% of the fund's return. The rule buys at the open, which means it misses the overnight gap that produces the burst and enters afterward. That fits the lag between the fund's moves and the rule's gains.

The fund's best day was 18.84% on 2025-04-09, and its second-best was 10.49% on 2022-11-10. The rule entered on 2025-05-05, nearly four weeks after the biggest single day, and on 2022-11-09, a day before the second. The 2022 entry is the closest the rule came to catching a major day, and it earned 6.61% in 37 days on that trade. The best calendar months for SOXX, May at 11.44% and November at 8.44% on average, matched where the rule's big trades fell, though each average rests on only five or six observations.

The rules

Buy after a +10% four-week burst and let a 10% trailing stop manage the exit.

  1. WHEN the market opens · IF not invested AND the 20-day return > +10% · THEN buy with 98% of the sleeve
  2. 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 rules fit SOXX

The entry needs +10% in 20 sessions. With volatility of 38.08%, SOXX meets that bar often, and the entry fired 19 times. On XLK it fired fewer times, and on XLP only twice, with a CAGR of -1.87%. The rule suits a fund that has bursts, and SOXX has them.

The comparison inside SOXX is useful. The weekly 7% target returned 30.54% with a drawdown of 22.76%, the monthly cycle returned 29.17% with a drawdown of 44.51%, the golden cross returned 28.24% with 28.82%, and the dip buyer returned 27.48% with 39.25%. All four did better than the momentum rule on return. The trend plus trailing stop rule returned 19.81%, the EMA 12/26 trend 17.96%, and the RSI(2) snapback 17.01% with a drawdown of 23.81%. The 3-month momentum switch returned 14.3%, RSI mean reversion 12.78% and the SMA 10/50 trend 7.65%.

Rules that spent more time in the fund did better in this window, because SOXX rose strongly after 2022. The momentum rule was invested 51.4% of the time and waited for confirmation twice, once for the burst and once for the stop. That patience kept the drawdown lower than most of the rules above it, but it did not match the buy-and-hold result.

The data also shows what the stop did that RSI rules could not. After RSI(14) fell below 30, which happened on only 7 sessions, the median 20-day forward return was 11.58% against a baseline of 2.11%, so dip buying worked, but the sample is small. The momentum rule used a different signal and the same fund and found 18 completed trades.

The limits are the usual ones. One window, 5.74 years, with the fund up 388.35% and a strong finish. Daily-decision rules, minute-bar fills, no costs in the headline. A semiconductor fund in a window with a semiconductor boom favours any rule that stays long, and the results would differ on a window that began at a peak.

Run momentum breakout on SOXX yourself, free →

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 SOXX?

Over 2021-01-04 to 2026-10-02, momentum breakout on SOXX returned 16.7% annualized vs 31.1% for buy-and-hold: it trailed buy-and-hold by 14.4% per year, with a maximum drawdown 14.8 points shallower than holding (30.2% vs 45.1%).

How many trades did it make?

18 completed round trips over 5.7 years (37 fills), with 61% 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.

What did the 20-day momentum with trailing stop return on SOXX?

A: A CAGR of 16.73% from 2021-01-04 to 2026-10-02, taking $10,000 to $24,308, with a maximum drawdown of 30.23% and a Sharpe ratio of 0.78. Buy-and-hold on SOXX returned 31.11% a year and ended at $47,348. The figures are hypothetical and exclude fees and slippage.

How many trades did the strategy make on SOXX?

A: It made 19 trades, with 18 closed and one open at the end of the window. Eleven of the 18 won, a win rate of 61%, and the profit factor was 2.96. The median hold was 39 days.

Did the trailing stop reduce the drawdown on SOXX?

A: Yes, in this window. The strategy's maximum drawdown was 30.23% against 45.06% for the fund. In 2022 the fund lost 34.5% and the strategy lost 14.3%. The cost was a lower return, because the stop and the entry rule left it out of part of the rally.

What happens if the trailing stop is 5% or 15%?

A: A 5% stop returned 14.3% a year with a 22.61% drawdown and 48 trades. A 15% stop returned 14.01% with a 34.89% drawdown and 12 trades. The 10% stop gave the highest CAGR of the three, at 16.73%.

How much do trading costs matter for this strategy on SOXX?

A: Little. At 5 basis points the CAGR was 16.33% and at 10 basis points it was 15.97%. The rule made 37 fills in the window, so costs have few chances to add up.

Is SOXX a good fit for the momentum breakout rule?

A: It ranks fourth of 59 funds for this strategy in the test. SOXX has high volatility and frequent 10% bursts, which is what the entry looks for. The same rule on the [consumer staples fund XLP](/learn/strategies/momentum-breakout-trail/xlp/) returned -1.87% a year.

Which strategy did best on SOXX?

A: The weekly 7% target returned 30.54% a year with a 22.76% drawdown, the highest of the 12. The momentum breakout ranked ninth. See the [SOXX page](/learn/etf/soxx/) for the full table.

Related

20-Day Momentum + Trailing Stop on all 59 ETFsfull results table All strategies on SOXX12 templates compared RSI(14) Mean Reversion on SOXXsame ETF, different rulesRSI(2) Dip Snapback on SOXXsame ETF, different rules

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.