SMA-200 Trend + 15% 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.
SMA-200 Trend + 15% Trailing Stop on SOXX, the iShares Semiconductor ETF, turned $10,000 into $28,222 between 2021-01-04 and 2026-10-02. That is a CAGR of 19.81%, with a maximum drawdown of 36.41% and a Sharpe ratio of 0.77. Holding SOXX over the same window ended at $47,348, a CAGR of 31.11% with a deeper 45.06% drawdown and a Sharpe ratio of 0.92. The strategy gave up a large part of the return and took a smaller worst fall.
The rule buys with 98% of the sleeve at the open when yesterday's close is above the 200-day average. After that it holds until a trailing stop 15% below the position's high-water mark is hit. It has no other exit. The strategy made 14 closed round trips and one trade was still open at the end, 29 fills in all. It won 8 of the 14, a win rate of 57%, with an average win of 21.94% and an average loss of 9.67%. The profit factor was 2.28. It was invested 69% of the time and the average hold was 98.9 days.
SOXX is a high-momentum sector fund with annualized volatility of 38.08%, and a 15% stop is within the range of its ordinary swings. The stop fired often enough to cost the strategy the early part of several large moves, and the data below shows where. The rule ranks 5th of 12 strategies on SOXX, and SOXX ranks 2nd of the 59 ETFs tested with this rule. Those placements are both good, and buy-and-hold still finished well ahead.
The headline run has no fees or slippage. Cost runs of 5 and 10 basis points are covered further down. The window is one stretch of one fund, and 14 closed trades are a small sample.
Year by year
| Year | trend + trailing stop | buy & hold |
|---|---|---|
| 2021 | 18.2% | 43.6% |
| 2022 | −32.9% | −34.5% |
| 2023 | 64.8% | 65.3% |
| 2024 | 4.9% | 12.8% |
| 2025 | 28.4% | 40.1% |
| 2026 | 60.4% | 95.0% |
How each year compared with holding SOXX
In 2021 the strategy returned 18.2% against 43.6% for the fund. The first entry did not come until 2021-10-19 at an adjusted price of 146.85, because the close was not above the 200-day average before then. The strategy missed most of the year's rise and made 4.04% on its first trade, which ran 94 days to 2022-01-21. The gap of 25.4 points in the fund's favour is the largest of the first four years.
In 2022 the strategy lost 32.9% and the fund lost 34.5%, so the rules finished 1.6 points ahead. The stop did not protect much. The strategy re-entered on 2022-01-24 at 148.54 and sold on 2022-03-07 at 138.7965 for a loss of 6.56%, re-entered on 2022-03-23 at 151.38 and sold on 2022-04-11 at 136.09 for a loss of 10.1%, and then sat in cash from April until December. The monthly table shows losses of 8.79%, 1.17%, 8.31% and 10.13% from January to April 2022, and a loss of 9.7% in December after re-entering on 2022-12-14 at 125.8. Staying out from April to early December avoided the fund's low on 2022-10-14, and it also missed the best day of 10.49% on 2022-11-10.
In 2023 the strategy gained 64.8% against 65.3%. The 2022-12-14 entry lasted 313 days, the longest hold, and returned 18.41% when the stop sold on 2023-10-23 at 148.96. The strategy bought again the same day at 149.23 because the price was still above the 200-day average, and that second trade lasted 179 days to 2024-04-19 and made 34.66%, the second-best trade of the run. Monthly returns of 15.48% in January, 8.7% in March, 15.22% in May, 15.84% in November and 12.1% in December came from those holds. The stop exit and same-day re-entry show a feature of the rule: a stop-out in an uptrend is followed by a new entry as soon as the price is still above the average.
In 2024 the strategy returned 4.9% against 12.8%. The trade from 2024-04-22 at 197.55 to 2024-07-25 at 224.2725 made 13.53%, then the re-entry on 2024-07-25 at 224.01 lost 14.84% in 11 days, selling on 2024-08-05 at 190.77. That is the worst trade of the test. The next entry on 2024-08-09 at 209.28 held 203 days and sold on 2025-02-28 at 202.2915 for a loss of 3.34%. The fund was in a drawdown for much of that period, and the strategy was long through it, with monthly losses in August, October, November and the following February.
In 2025 the strategy gained 28.4% against 40.1%, a gap of 11.7 points. It was out of the market from 2025-02-28 until 2025-05-14, which kept it away from the April 2025 low, but it also missed the fund's best day, 18.84% on 2025-04-09. The entry at 213.89 on 2025-05-14 held 191 days and made 23.91% until 2025-11-21. June 2025 returned 16.37% and September and October returned 10.57% and 12.73%. The next trade, from 2025-11-24 at 272.84 to 2026-03-30 at 312.953, made 14.7%.
In 2026 so far the strategy returned 60.4% against 95% for the fund, a gap of 34.6 points, the largest of any year. The entry on 2026-03-31 at 316.23 ran 70 days to 2026-06-09 at 525.419 and returned 66.15%, the best trade of the test. April 2026 returned 39.23%, the best month, and May returned 22.75%. After that the pattern turned. The strategy re-entered on 2026-06-10 at 556.55 and sold on 2026-07-02 at 557.192, a gain of 0.12%. It then lost 12.58% on a trade from 2026-07-06 at 581.05 to 2026-07-17 at 507.9685, and 10.62% on a trade from 2026-07-20 at 533.3 to 2026-07-29 at 476.6885. July 2026 lost 29.44%, the worst month, against a loss of 21.13% for the fund. The strategy lost more than the fund in that month because it bought and sold into the fall in three separate trades. The entry on 2026-07-30 at 492.19 was open at the end, 19.65% higher.
The strategy beat the fund only in 2022. In every other year it trailed. The gaps were smallest in 2023, at 0.5 points, and largest in 2026.
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% | 3.6% | 11.1% | 2.7% |
| 2022 | −8.8% | −1.2% | −8.3% | −10.1% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | −9.7% |
| 2023 | 15.5% | 1.4% | 8.7% | −7.2% | 15.2% | 6.5% | 5.3% | −4.5% | −6.7% | −6.7% | 15.8% | 12.1% |
| 2024 | 1.7% | 11.1% | 4.0% | −3.7% | 9.2% | 5.3% | −4.4% | −10.1% | −0.0% | −5.2% | −1.2% | 0.2% |
| 2025 | 1.2% | −6.3% | 0.0% | 0.0% | −4.9% | 16.4% | 0.5% | 2.1% | 10.6% | 12.7% | −5.8% | 1.5% |
| 2026 | 14.6% | 1.7% | −7.5% | 39.2% | 22.8% | 5.9% | −29.4% | 1.3% | 11.0% | 3.5% | – | – |
The monthly pattern
SOXX months are large. The fund's average up day is 1.78% and its average down day minus 1.78%, and the strategy's monthly returns run from minus 29.44% to plus 39.23%. The largest gains come from the long holds in 2023, 2025 and 2026: 15.48% in January 2023, 15.22% in May 2023, 15.84% in November 2023, 16.37% in June 2025, 14.59% in January 2026, 39.23% in April 2026 and 22.75% in May 2026.
The losing months cluster around stop exits. January to April 2022 lost four months in a row. August 2023 to October 2023 lost 4.46%, 6.7% and 6.73% before the 313-day trade ended on 2023-10-23. August 2024 lost 10.14%, October 2024 lost 5.16% and February 2025 lost 6.25%. In each case the stop did not fire until the fund had already given back a lot. A 15% trail from the high-water mark means a position can fall that far before it sells, and the losing months leading into each exit show that cost.
The fund's average May return was 11.44% and its average November return was 8.44%, with six and five observations. The strategy's May 2023 and November 2023 were both strong, and its May 2025 lost 4.89% because it was entered only on 2025-05-14.
Every trade
trend + trailing stop on SOXX made 14 closed round trips and one position still open at the end of the test, an average hold of 99 days, an average winner of 21.94%, an average loser of −9.67%, a profit factor of 2.28, a longest losing streak of 2. It held a position at the close on 69.0% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-10-19 | $146.85 | 2022-01-21 | $152.78 | 4.0% | 94 |
| 2022-01-24 | $148.54 | 2022-03-07 | $138.80 | −6.6% | 42 |
| 2022-03-23 | $151.38 | 2022-04-11 | $136.09 | −10.1% | 19 |
| 2022-12-14 | $125.80 | 2023-10-23 | $148.96 | 18.4% | 313 |
| 2023-10-23 | $149.23 | 2024-04-19 | $200.96 | 34.7% | 179 |
| 2024-04-22 | $197.55 | 2024-07-25 | $224.27 | 13.5% | 94 |
| 2024-07-25 | $224.01 | 2024-08-05 | $190.77 | −14.8% | 11 |
| 2024-08-09 | $209.28 | 2025-02-28 | $202.29 | −3.3% | 203 |
| 2025-05-14 | $213.89 | 2025-11-21 | $265.02 | 23.9% | 191 |
| 2025-11-24 | $272.84 | 2026-03-30 | $312.95 | 14.7% | 126 |
| 2026-03-31 | $316.23 | 2026-06-09 | $525.42 | 66.2% | 70 |
| 2026-06-10 | $556.55 | 2026-07-02 | $557.19 | 0.1% | 22 |
| 2026-07-06 | $581.05 | 2026-07-17 | $507.97 | −12.6% | 11 |
| 2026-07-20 | $533.30 | 2026-07-29 | $476.69 | −10.6% | 9 |
| 2026-07-30 | $492.19 | open | – | 19.6% | – |
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.
Fourteen closed trades and one open
The strategy opened 15 trades. 14 are closed and one was open at the end, entered on 2026-07-30 at 492.19 and up 19.65%. Of the 14 closed trades, 8 won. The median return was 4.04% and the median hold was 94 days. The shortest hold was 9 days and the longest was 313.
The five best trades were:
- 2026-03-31 to 2026-06-09, 70 days, plus 66.15%.
- 2023-10-23 to 2024-04-19, 179 days, plus 34.66%.
- 2025-05-14 to 2025-11-21, 191 days, plus 23.91%.
- 2022-12-14 to 2023-10-23, 313 days, plus 18.41%.
- 2025-11-24 to 2026-03-30, 126 days, plus 14.7%.
The five worst were minus 14.84% from 2024-07-25, minus 12.58% from 2026-07-06, minus 10.62% from 2026-07-20, minus 10.1% from 2022-03-23 and minus 6.56% from 2022-01-24. All five lasted 9 to 42 days. The worst loss of 14.84% is close to the 15% trail, and it happened in 11 days around the 2024-08-05 drop.
The longest winning streak was 4 trades and the longest losing streak was 2. Per exit year, 2022 had 3 round trips and 1 win, 2023 had 1 and 1 win, 2024 had 3 and 2 wins, 2025 had 2 and 1 win, and 2026 had 5 and 3 wins. Total return was 182.22%, against 373.48% for the fund.
The profit factor of 2.28 comes from the shape of the trades. The average win of 21.94% is larger than the average loss of 9.67%, and wins carried the result. That dependence on a few large trades is typical of a trend rule, and with 14 trades the sample cannot say how stable it is.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-12-27 | 2022-12-28 | −36.4% | 366 | 2023-07-31 | 215 |
| 2024-07-10 | 2025-05-23 | −33.0% | 317 | 2025-10-27 | 157 |
| 2026-06-22 | 2026-07-29 | −32.6% | 37 | not yet | – |
Buy-and-hold's deepest drawdown ran from 2021-12-27 to 2022-10-14 and reached −45.1%.
Three drawdowns above 30%
The deepest drawdown was 36.41%, from a peak on 2021-12-27 to a trough on 2022-12-28, 366 days later, with recovery on 2023-07-31. The fund peaked on the same day, 2021-12-27, and fell 45.06% to 2022-10-14, recovering on 2023-12-13. The strategy's shallower fall came from being in cash for most of the middle of 2022. Its trough came later, on 2022-12-28, after it re-entered on 2022-12-14 and lost 9.7% in December.
The second drawdown was 33.02% from 2024-07-10 to 2025-05-23, which took 317 days to reach the bottom and recovered on 2025-10-27. The fund's matching drawdown was 40.93% from the same peak date to 2025-04-08. The strategy's low came later than the fund's, on 2025-05-23, after the trade that ended on 2025-02-28 and the re-entry on 2025-05-14.
The third drawdown is 32.58% from 2026-06-22 to 2026-07-29, 37 days, and had not recovered by the end of the window. The fund's matching drawdown was 28.99%. This is the one place where the strategy fell further than the fund. The strategy made three trades in that stretch, and the fund's own decline over the same dates was shallower.
A 15% trail is wide for most assets and ordinary for SOXX. The fund has had 43 episodes with a 10% fall inside 20 sessions, over 197 days in total, so a 15% pullback is a normal event, and the rule treats it as an exit. The three worst days for the fund, minus 10.45% on 2026-06-05, minus 10.11% on 2025-04-03 and minus 8.34% on 2025-04-10.
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) | 19.8% | −36.4% | $28,222 | 0.77 |
| 5 basis points | 19.4% | −36.6% | $27,668 | 0.75 |
| 10 basis points | 19.1% | −36.8% | $27,329 | 0.75 |
What 5 and 10 basis points change
At 5 basis points per trade the CAGR falls from 19.81% to 19.39%, the ending value from $28,222 to $27,668 and the Sharpe ratio from 0.77 to 0.753, with the drawdown at 36.65%. At 10 basis points the CAGR is 19.14%, the ending value is $27,329, the Sharpe ratio is 0.746 and the drawdown is 36.77%. There are only 29 fills, so cost has a small effect. SOXX trades an average of $1,048,392,630 a day and a median of 5,853 shares a minute, and a $10,000 sleeve is tiny against it. The cost runs apply the same fixed charge to every fill and do not model gaps.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 19.8% | −36.4% | 14 | 57% | $28,222 |
| 10% trailing stop | 10.4% | −42.2% | 36 | 39% | $17,639 |
| 20% trailing stop | 24.3% | −37.7% | 5 | 40% | $34,833 |
| 25% trailing stop | 18.0% | −46.2% | 5 | 40% | $25,846 |
Trailing stop width
Three alternative stop widths were tested while keeping the 200-day entry. A 10% stop returned a CAGR of 10.39% with 36 trades and 14 wins, ending at $17,639 with a drawdown of 42.16% and a Sharpe ratio of 0.493. The tight stop fired often on SOXX and the strategy paid for it in whipsaws.
A 20% stop returned 24.28%, ended at $34,833, and made 5 trades with 2 wins. Its drawdown was 37.66% and its Sharpe ratio was 0.87. That is a much better result than the 15% default, and the best of the four stop widths. A 25% stop returned 17.99%, ended at $25,846, made 5 trades with 2 wins, and had a drawdown of 46.23% and a Sharpe ratio of 0.688.
The pattern is not monotonic. The result improves from 10% to 20% and then falls at 25%. The 20% and 25% variants both made 5 trades, and their different results come from where the stop fell inside a few large moves. With 5 trades each, the comparison is mostly about which single exit landed on a better price. The step from a 15% to a 20% stop changed the result a lot, and that sensitivity is a limit on the headline number. The default 15% result does not show what a 15% stop would do in another period, and the best-looking width in one window is partly a product of the window.
How SOXX behaved
| Measure | SOXX |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 388.4% |
| Annualized volatility | 38.1% |
| Deepest drawdown | −45.8% (2021-12-27 to 2022-10-14) |
| Up days | 53.9% |
| Average daily range | 2.58% |
| Average overnight gap | 1.07% |
| Correlation to SPY | 0.79 |
| Correlation to QQQ | 0.87 |
| Correlation to TLT | 0.05 |
| Sessions above the 200-day average | 70.7% |
| Crossings of the 200-day average | 38 |
| Falls of 10% or more from a 20-day high | 43 |
How SOXX behaved
SOXX returned 388.35% over the window, a CAGR of 31.81%, with annualized volatility of 38.08% and a maximum drawdown of 45.81% from 2021-12-27 to 2022-10-14, recovering on 2023-12-13. The longest drawdown lasted 493 sessions. It rose on 53.92% of sessions. Calendar-year returns were 44.66% in 2021, minus 35.07% in 2022, 66.96% in 2023, 13% in 2024, 40.68% in 2025 and 95.9% in 2026 so far.
The fund's beta to SPY is 1.84 with a correlation of 0.79, and its beta to QQQ is 1.49 with a correlation of 0.87. It correlates at 1 with SOXL, 0.9 with XLK and TECL, and minus 1 with SOXS. It sat above its 200-day average on 70.68% of sessions and crossed that line 38 times. The rule enters whenever the close is above the average and no position is open, so a stop-out in an uptrend is followed by a new entry.
The gap between overnight and intraday returns is large. The overnight log return was 136.36% with a share of 86.53%, and the intraday log return was 21.22%. Most of SOXX's gain in this window came overnight, and the average overnight gap was 1.07% against an average intraday range of 2.58%. The strategy trades at the open, so each position takes the overnight move on days it is held, and each entry pays for the gap.
The statistics after oversold readings were strong in this window. RSI(14) fell below 30 on only 7 sessions, and the median 5-day return afterward was 6.1% against 0.63% for all days. The median 20-day return was 11.58% against 2.11%. RSI(2) below 10 appeared on 133 sessions, with a median 5-day return of 0.89% and a median 20-day return of 3.58%. Dips in SOXX bounced. The lag-1 autocorrelation of minus 0.09 suggests day-to-day moves reverse a little. That fits the ranking on SOXX, where the dip buyer returned 27.48% and the weekly profit target 30.54%, both above this rule.
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.
A wide stop on a fund that swings this much
The rule is meant for long trends with moderate pullbacks, and SOXX had long trends with large pullbacks. The 2022 decline of 35.07% and the 2024 to 2025 drawdown of 40.93% both ran past the stop distance. The long trends in 2023, 2025 and early 2026 paid for the whole rule, and the stop let them run.
Compared with the other 11 strategies on SOXX, the weekly profit target returned 30.54% with a 22.76% drawdown, the monthly cycle returned 29.17%, the golden cross returned 28.24% with a 28.82% drawdown, and the dip buyer returned 27.48%. This rule came fifth at 19.81%, ahead of the 200-day regime filter at 19.21%, EMA 12/26 trend at 17.96% and RSI(2) snapback at 17.01%. The lowest was SMA 10/50 trend at 7.65%. The 200-day filter and this rule differ in the exit, and the two results are close.
Among sector ETFs the same rule returned 19.81% on SOXX, 12.49% on XLK, 8.57% on VOX, 2.62% on XLF, 1.82% on XLP and minus 4.4% on XLY. SOXX had 14 round trips, XLK 7 and XLP 2. The category median was 8.57% and the median across all 59 ETFs was 2.61%. SOXX placed second of 59 for the rule, which says the rule suits high-momentum sectors better than the defensive ones. See XLK for the closest peer, the rule's hub at SMA-200 Trend + 15% Trailing Stop, and the fund at SOXX.
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 SOXX?
Over 2021-01-04 to 2026-10-02, trend + trailing stop on SOXX returned 19.8% annualized vs 31.1% for buy-and-hold: it trailed buy-and-hold by 11.3% per year, with a maximum drawdown 8.7 points shallower than holding (36.4% vs 45.1%).
How many trades did it make?
14 completed round trips over 5.7 years (29 fills), with 57% 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.
How did SMA-200 Trend + 15% Trailing Stop perform on SOXX?
It ended at $28,222 from $10,000, a CAGR of 19.81% with a maximum drawdown of 36.41% and a Sharpe ratio of 0.77. It closed 14 round trips and won 8, with one trade open at the end. The headline run has no fees or slippage.
Did it beat buy-and-hold on SOXX?
No on return. Holding SOXX ended at $47,348, a CAGR of 31.11%, with a drawdown of 45.06%. The strategy had a smaller worst drawdown, 36.41%, and finished ahead of the fund only in 2022.
What was the best trade?
The entry on 2026-03-31 at an adjusted price of 316.23, sold on 2026-06-09 at 525.419, a gain of 66.15% in 70 days.
What was the worst month?
July 2026, at minus 29.44%. The fund lost 21.13% in the same month. The strategy entered and was stopped out three times that month.
Does a wider trailing stop work better on SOXX?
A 20% stop returned 24.28% and ended at $34,833, while a 10% stop returned 10.39% and a 25% stop returned 17.99%. The 20% and 25% runs made only 5 trades each, so the ordering rests on a few exits in one window.
How much do trading costs matter here?
Little. At 5 basis points per trade the CAGR is 19.39% and at 10 basis points it is 19.14%. The strategy has only 29 fills.
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.