Learn › Strategies › 200-Day SMA Regime Filter › SOXX

200-Day SMA Regime Filter 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: 200-day regime filter on SOXX turned $10,000 into $27,422 (174.2% total, 19.2% CAGR): it trailed buy-and-hold by 11.9% per year, with a maximum drawdown 5.9 points shallower than holding (39.2% vs 45.1%).

The 200-day regime filter owns SOXX, the iShares Semiconductor ETF, while yesterday's close is above its 200-day average and holds cash when it is below. From 2021-01-04 to 2026-10-02 it turned $10,000 into $27,422, a CAGR of 19.21%, with a maximum drawdown of 39.17% and a Sharpe ratio of 0.77. Buy-and-hold on SOXX ended at $47,348, a CAGR of 31.11%, with a drawdown of 45.06%.

The filter gave up 11.90 points of CAGR a year and trimmed the worst fall by 5.89 points. Neither side of that trade is large. The rule beat the fund in only one calendar year, 2022, and it did so while winning just 5 of its 19 closed round trips, a win rate of 26%.

The low win rate has a clear source. The data shows one long winning stretch, a handful of long trades, and many one-day and one-week trades that lost a little each time price crossed the line and crossed back. The average win was 9.95% and the average loss -3.09%, which gives a profit factor of 1.04. The rule survives on two trades of 276 and 287 days.

The open position is the largest single fact on the page. It was bought on 2025-06-04 at an adjusted $213.96 and was still held at the final close, marked at +175.24%. All of the strategy's gains in 2025 and 2026 sit in that one position.

The template ranked 6th of 12 on SOXX, and SOXX ranked 5th of 59 funds for this strategy. The weekly profit target came first at 30.54%. The rules are on the 200-day regime filter strategy page, and the fund is on the SOXX page.

19.2%CAGR
31.1%buy & hold CAGR
−39.2%max drawdown
0.77Sharpe ratio
19round trips
26%win rate
■ 200-day regime filter   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year200-day regime filterbuy & hold
202118.2%43.6%
2022−28.3%−34.5%
202343.0%65.3%
2024−1.5%12.8%
202518.6%40.1%
202693.6%95.0%

Six years against a fund that more than tripled

The filter returned 18.2% in 2021, -28.3% in 2022, 43.0% in 2023, -1.5% in 2024, 18.6% in 2025 and 93.6% so far in 2026. SOXX returned 43.6%, -34.5%, 65.3%, 12.8%, 40.1% and 95.0%. The gap column reads -25.4, +6.2, -22.3, -14.3, -21.5 and -1.4 points. Only 2022 favoured the strategy.

2021 shows the cost of waiting. The strategy had no position until 2021-10-19, when it bought at $146.85. The fund gained 43.6% in the year and the filter 18.2%, so the filter missed most of the year's run, since the average needs 200 sessions of history before the rule can act. The first trade lasted 99 days and returned 4.19%.

2022 is where the rule was expected to help and where it helped least. The fund lost 34.5% and the strategy 28.3%, a gap of 6.2 points. The strategy took 8 round trips in 2022 and only 1 won. January 2022 alone cost 16.25%, and it was followed by February at -6.96% and March at -5.43%. The rule was long on 2022-01-27 at $151.17 and sold the next day at $143.61 for -5.0%, then bought again on 2022-02-01 and again on 2022-02-16 and 2022-02-28, each time losing. The strategy page's caveat describes this: price whips around the 200-day line, generating clusters of buy and sell pairs.

2023 returned 43.0% against 65.3%. The rule bought on 2023-01-12 at $124.52 and held to 2023-10-26 at $145.55 for 16.89%, a 287-day trade. It re-entered on 2023-11-03 at $153.23.

2024 is the weakest year in relative terms. The strategy lost 1.5% while the fund gained 12.8%. The 276-day trade from 2023-11-03 closed on 2024-08-05 at $190.72 for 24.47%, the best trade of the test. After that came six round trips in 2024 and 3 won, and then four in 2025 with none winning. The fund peaked on 2024-07-10 and the filter sold on 2024-08-05, then re-entered on 2024-08-09 at $209.28 and was whipsawed through autumn.

2025 returned 18.6% against 40.1%. The year contains four losing round trips, -2.7%, -7.7%, -3.3% and -2.5%, and the entry on 2025-06-04 that never exited. 2026 returned 93.6% against 95.0%, a gap of only 1.4 points, because the strategy was fully invested in the position bought in June 2025.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%3.6%11.1%2.7%
2022−16.3%−7.0%−5.4%0.6%0.0%0.0%0.0%0.0%0.0%0.0%0.0%−3.3%
20235.3%1.4%8.7%−7.2%15.2%6.5%5.3%−4.5%−6.7%−6.1%9.7%12.1%
20241.7%11.0%4.0%−5.2%9.3%5.4%−4.5%−10.4%−2.2%−5.1%−3.5%0.3%
2025−9.8%−3.2%0.0%0.0%−2.4%10.6%0.5%2.1%10.5%12.7%−3.1%1.6%
202614.6%1.7%−6.5%39.6%22.9%12.3%−21.0%1.3%11.1%3.6%––

The months with no position and the months with a big one

The strategy has 18 months with no return, shown as blanks. They are the first nine months of 2021, May to November 2022, and March and April 2025. A filter that is out of the market does not lose, and the blanks include some of the fund's worst weeks of 2022.

The best month was April 2026 at 39.62%, against 40.13% for buy-and-hold. The worst was July 2026 at -20.99%, against -21.13% for the fund. In both cases the strategy and the fund moved almost together, which is what happens when the strategy is fully invested in one long position.

The 2025-06-04 trade supplies a long run of months: June 2025 at 10.61%, July 0.51%, August 2.13%, September 10.53%, October 12.69%, November -3.08% and December 1.55%. Then January 2026 returned 14.63%, February 1.69%, March -6.51%, April 39.62%, May 22.92%, June 12.34%, July -20.99%, August 1.34% and September 11.14%. Only a few of these months are negative, and April and May 2026 are the two largest gains.

July 2026 is also the month of the strategy's third drawdown, 28.80% from 2026-06-22 to 2026-07-29, which had not recovered by the end of the data. The fund's own best days include 2026-07-30 at 8.78% and 2026-06-11 at 8.30%, and its worst include 2026-06-05 at -10.45% and 2026-06-23 at -7.87%. These are large daily moves on both sides in the final months of data.

Across the years, the losing months of 2022 and 2024 stand out. January 2025 lost 9.84%, in the middle of the 2025 whipsaw cluster, and August 2024 lost 10.36%. The fund averaged 11.44% in May and 8.44% in November across the window, against -1.61% in August, each from 5 or 6 observations.

Every trade

200-day regime filter on SOXX made 19 closed round trips and one position still open at the end of the test, an average hold of 42 days, an average winner of 9.95%, an average loser of −3.09%, a profit factor of 1.04, a longest losing streak of 7. It held a position at the close on 60.9% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-19$146.852022-01-26$153.014.2%99
2022-01-27$151.172022-01-28$143.61−5.0%1
2022-02-01$154.942022-02-14$149.85−3.3%13
2022-02-16$155.452022-02-22$148.82−4.3%6
2022-02-28$152.022022-03-02$148.50−2.3%2
2022-03-23$151.382022-03-24$150.99−0.3%1
2022-03-25$156.442022-04-01$153.03−2.2%7
2022-12-14$125.802022-12-15$121.56−3.4%1
2023-01-12$124.522023-10-26$145.5516.9%287
2023-11-03$153.232024-08-05$190.7224.5%276
2024-08-09$209.282024-09-04$208.44−0.4%26
2024-09-12$214.612024-09-19$222.903.9%7
2024-09-20$221.282024-11-01$217.75−1.6%42
2024-11-07$229.702024-11-13$219.60−4.4%6
2024-12-17$222.382024-12-18$223.100.3%1
2025-01-07$229.502025-01-08$223.31−2.7%1
2025-01-21$229.412025-01-28$211.75−7.7%7
2025-02-20$230.252025-02-24$222.60−3.3%4
2025-05-14$213.892025-05-20$208.58−2.5%6
2025-06-04$213.96open–175.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.

Nineteen losing-or-small trades and two large ones

The list has 20 trades including the open one. The median trade returned -2.32% and the median hold was 6 days. The average hold is 41.7 days, pulled up by the two trades of 276 and 287 days. The longest hold was 287 days and the shortest 1.

The five best trades are 24.5% (2023-11-03 to 2024-08-05, 276 days), 16.9% (2023-01-12 to 2023-10-26, 287 days), 4.2% (2021-10-19 to 2022-01-26, 99 days), 3.9% (2024-09-12 to 2024-09-19, 7 days) and 0.3% (2024-12-17 to 2024-12-18, 1 day). After the first two, the winners are small. The list of winners contains only 5 trades.

The five worst are -7.7% (2025-01-21 to 2025-01-28, 7 days), -5.0% (2022-01-27 to 2022-01-28, 1 day), -4.4% (2024-11-07 to 2024-11-13, 6 days), -4.3% (2022-02-16 to 2022-02-22, 6 days) and -3.4% (2022-12-14 to 2022-12-15, 1 day). The worst loss of 7.7% is small beside the fund's own drawdowns. A regime filter limits the size of each loss because it sells when price slips under the line, and the cost is the number of losses.

The losing streak is the clearest feature of the record: 7 trades in a row, the longest streak of the test, with a longest win streak of only 2. Per-year round trips were 8 in 2022, 1 in 2023, 6 in 2024 and 4 in 2025, with wins of 1, 1, 3 and 0. In 2021 and 2026 there are no closed trades, because the first entry came in October 2021 and the last one has not exited.

The open position at +175.24% is not in the win-rate figure. If it were closed at the last price, it would be the best trade by a wide margin. The rule has not yet received its exit signal, so the 26% win rate and the 9.95% average win leave out the largest gain. This page reports the numbers as the engine counts them, and the reader should keep the open trade in view when reading the profit factor of 1.04.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2024-07-102025-05-20−39.2%3142026-01-28253
2021-12-272023-01-19−31.5%3882023-12-26341
2026-06-222026-07-29−28.8%37not yet–

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

Where the filter protected and where it did not

The strategy's deepest drawdown was 39.17%, from 2024-07-10 to a low on 2025-05-20 after 314 days, recovered on 2026-01-28 after 253 more. Buy-and-hold's drawdown from the same peak, 2024-07-10, reached 40.93% at 2025-04-08 and recovered on 2025-09-18. In that episode the filter fell almost as far as the fund and recovered later. The whipsaw trades of late 2024 and early 2025 cost the strategy while the fund was falling.

The second strategy drawdown was 31.52%, from 2021-12-27 to 2023-01-19 over 388 days, recovered on 2023-12-26. The fund's largest drawdown covered the same period and was 45.06% from 2021-12-27 to 2022-10-14, recovered on 2023-12-13. Here the filter did what it is designed to do and cut the loss by a meaningful margin, though it still lost 31.52%.

The third strategy drawdown, 28.80% from 2026-06-22 to 2026-07-29 over 37 days, had not recovered at the end of the data. The fund's equivalent was 28.99% on the same dates. A filter that is fully invested after a long rise takes the same fall as the fund until the price crosses the line, and it had not crossed by the end of July 2026.

The maximum drawdown is shallower than the fund's by 5.89 points. The Sharpe ratio is 0.77 against 0.92 for the fund. On both measures the filter was behind in risk-adjusted terms in this window. The ETF profile lists SOXX's own maximum drawdown as -45.81% and its longest drawdown as 493 sessions.

Compared with the other templates on SOXX, the RSI(2) snapback had a drawdown of 23.81% and the weekly target 22.76%, both well under the filter's 39.17%. The SMA 10/50 trend was deeper at 40.32% and the monthly cycle deeper again at 44.51%.

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)19.2%−39.2%$27,4220.77
5 basis points18.8%−39.6%$26,8560.76
10 basis points18.3%−40.2%$26,2530.74

Few fills, small cost effect

The filter made 39 fills. At 5 basis points of slippage per fill the CAGR falls from 19.21% to 18.78% and the final value from $27,422 to $26,856. At 10 basis points it is 18.31% and $26,253. The maximum drawdown moves from 39.17% to 39.62% and then 40.19%, and the Sharpe ratio from 0.77 to 0.759 and 0.745.

The effect is modest because the number of fills is small. The largest contributor to the result is one trade that did not close, which does not pay an exit cost in the model.

SOXX is liquid, with average daily dollar volume of $1,048,392,630 and a median minute volume of 5,853 shares. The slippage figures are model assumptions. The filter's many one-day trades, such as the 1-day round trips on 2022-01-27, 2022-03-23, 2022-12-14, 2024-12-17 and 2025-01-07, would pay the most in practice, since each is a full round trip for a gain or loss of a few percent at most.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules19.2%−39.2%1926%$27,422
100-day SMA14.8%−45.6%3027%$22,121
150-day SMA14.8%−45.8%3027%$22,037
250-day SMA14.3%−37.1%1619%$21,504

Different lengths for the average

Three variants change the window. A 100-day average gave a CAGR of 14.83%, end equity of $22,121, a drawdown of 45.64% and a Sharpe ratio of 0.651, with 30 trades and 8 wins. A 150-day average gave 14.75%, $22,037, 45.79% and 0.641, with the same 30 trades and 8 wins. A 250-day average gave 14.27%, $21,504, 37.14% and 0.622, with 16 trades and 3 wins.

All three came in below the published 200-day rule on return, which was 19.21% with a Sharpe ratio of 0.77. The shorter windows traded more and fell further, with drawdowns of 45.64% and 45.79% against 39.17%. The 250-day window traded less and had the shallowest drawdown, 37.14%, at the lowest return of the four.

The pattern is consistent. A shorter average reacts faster, which means more crossings and more small losses. A longer one reacts later and trades less. The published 200 sits between the two on trade count and gave the best CAGR and Sharpe ratio among the four on this window. That is a result of one sample. With 16 to 30 trades per variant and most of the gain coming from a few long positions, the ranking could change in another window, and the page does not present 200 days as a best setting.

The strategy page runs the same windows across the other funds. The caveat there notes that some traders add a buffer band to reduce the churn around the line. No band is tested in these results, so no figure is available for one. The golden cross, which uses a slower pair of averages, returned 28.24% on SOXX with a 28.82% drawdown, which is a slower filter that did better.

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

What SOXX did to a long-average rule

SOXX returned 388.35% over 1444 sessions, a CAGR of 31.81%, with annualized volatility of 38.08%. Its calendar returns were 44.66% in 2021, -35.07% in 2022, 66.96% in 2023, 13.00% in 2024, 40.68% in 2025 and 95.90% so far in 2026. Beta to SPY was 1.84 and to QQQ 1.49.

The fund spent 70.68% of sessions above its 200-day average and crossed it 38 times. That gives a rule built on the line a lot of crossings to react to. There were 43 falls of 10% or more from a 20-day high, over 197 days.

Daily moves are large: the average up day was 1.78%, the average down day -1.78%, the intraday range 2.58% and the overnight gap 1.07%. The best days were 18.84% on 2025-04-09, 10.49% on 2022-11-10 and 8.78% on 2026-07-30. The worst were -10.45% on 2026-06-05, -10.11% on 2025-04-03 and -8.34% on 2025-04-10. The filter buys on yesterday's close above the line and sells on yesterday's close below it, so large reversal days arrive before any signal.

The overnight share of the total return was 86.53%. A filter that trades at the open gets the overnight gap on the day of the trade, in whichever direction it falls.

RSI(14) fell below 30 on only 7 sessions, and the median 20-day return after them was 11.58% against a baseline of 2.11%. RSI(2) below 10 happened on 133 sessions with a 20-day median of 3.58%. Oversold readings in semiconductors led to strong rebounds in this window, which suggests why the dip-buying templates did well on this fund: the dip buyer returned 27.48% and the monthly cycle 29.17%. A filter that sells below the line is selling into those readings.

Among the sector funds the same filter returned 16.81% on XLK, 6.52% on VOX, 2.06% on XLF, -0.81% on XLP and -2.16% on XLY. SOXX at 19.21% was the best of the six. The category median was 6.52% and the median across all 59 funds 1.84%.

The rules

Own the asset when price closes above its 200-day average; hold cash when it closes below.

  1. WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
  2. WHEN the market opens · IF invested AND yesterday's close < SMA(200) · THEN sell the whole position

One rule and one number. Price above the 200-day moving average has historically coincided with better returns and lower volatility than price below it. This template uses no crossovers and no oscillators, only which side of the long-term average the price is on.

Good for: a first systematic strategy, simple enough to audit every trade.
Watch out: price whips around the 200-day line during volatile bottoms, generating clusters of buy-sell pairs. Some traders add a small buffer band to reduce churn.

How a regime filter meets a momentum sector

The rules have one input and no stop. The entry is yesterday's close above SMA(200) at the open and the exit is yesterday's close below it. The position is 98% of the sleeve.

On SOXX the filter did three things. It stayed out of much of 2022 and gave back only part of that edge in the January whipsaws. It caught two long trends, from January 2023 and from November 2023, and the long open position from June 2025. It paid for those with a run of small losses whenever price oscillated around the line, 7 in a row at the longest.

The contrast with the trend-following siblings is useful. The EMA 12/26 trend returned 17.96% with a drawdown of 33.96%, and the trend plus trailing stop 19.81% with 36.41%. The filter's 19.21% and 39.17% sit between them. The momentum breakout returned 16.73%, the 3-month momentum 14.30%, the RSI mean reversion 12.78% and the SMA 10/50 trend 7.65%.

On this fund the best results came from the rules that stayed invested most of the time or bought weakness: the weekly target at 30.54%, the monthly cycle at 29.17%, the golden cross at 28.24% and the dip buyer at 27.48%. All four beat the 200-day filter by a wide margin, and none beat buy-and-hold at 31.11%.

The limits are one fund, one window of 5.74 years, daily-decision rules, no fees in the headline run, and a result that depends on one open position. It would read differently if that position had exited in 2026. The page reports what the rule did on these dates and makes no forecast.

Run 200-day regime filter 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 200-day regime filter beat buy-and-hold on SOXX?

Over 2021-01-04 to 2026-10-02, 200-day regime filter on SOXX returned 19.2% annualized vs 31.1% for buy-and-hold: it trailed buy-and-hold by 11.9% per year, with a maximum drawdown 5.9 points shallower than holding (39.2% vs 45.1%).

How many trades did it make?

19 completed round trips over 5.7 years (39 fills), with 26% of round trips closing profitably.

Why the 200-day average specifically?

It approximates a year of trading days and has been studied across decades of data. It is not the best window for every asset. The per-ETF backtests here show where it helped and where it didn't.

Did the 200-day regime filter beat buy-and-hold on SOXX?

No. From 2021-01-04 to 2026-10-02 the filter returned 19.21% a year and ended at $27,422. Buy-and-hold returned 31.11% a year and ended at $47,348. The filter beat the fund only in 2022.

Why is the win rate only 26%?

Of 19 closed round trips, 5 won. Price crossed the 200-day line and back many times in 2022 and 2024 to 2025, producing a run of small losing trades. The average win was 9.95% and the average loss -3.09%.

What is the open position at the end of the test?

The filter bought SOXX on 2025-06-04 at an adjusted $213.96 and had not sold by 2026-10-02. It was marked at +175.24%. That gain is not counted in the win rate or the average win.

What was the maximum drawdown?

39.17%, from 2024-07-10 to 2025-05-20, recovered on 2026-01-28. Buy-and-hold on SOXX fell 45.06% from 2021-12-27 to 2022-10-14.

Does a different moving-average length work better?

Not in this window. The 100-day, 150-day and 250-day versions returned 14.83%, 14.75% and 14.27% a year, below the 19.21% of the 200-day rule. The 250-day version had the shallowest drawdown at 37.14%.

How much do trading costs matter here?

Little. With 5 basis points per fill the CAGR is 18.78% and with 10 basis points it is 18.31%, against 19.21% with no costs. The strategy made 39 fills.

Related

200-Day SMA Regime Filter 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.