200-Day SMA Regime Filter on UDN
Invesco DB US Dollar Index Bearish Fund: profits when the US dollar weakens against major currencies. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
The 200-day regime filter owns the fund after a close over its 200-day average and sits in cash after a close under it. The fund here is UDN, Invesco's bearish dollar fund, which rises when the dollar weakens against major currencies. Between 2021-01-04 and 2026-10-02 the account went from $10,000 to $10,745.15: 7.45% in total, 1.26% a year, a worst drawdown of 5.38% and a Sharpe ratio of 0.3.
A holder of UDN lost money over those dates. The fund ended at $9,375.49, a CAGR of -1.12%, after a 22.74% maximum drawdown, with a Sharpe ratio of -0.12. The filter ended $1,369.66 higher, 2.38 CAGR points better and 17.36 drawdown points shallower. Third of 12 templates is its rank on UDN, and UDN is 33rd of 59 funds for this rule.
Of 20 round trips, 10 won and 10 lost. Winners averaged 1.25% and losers -0.48%, a profit factor of 2.5, with money invested on 49.7% of sessions and holds averaging 52.4 days. Both averages are small, and one 364-day trade that returned 7.26% carries much of the total.
The sample is one fund and one 5.74-year window. The rules are daily and run on minute data, and the headline run has no fees or slippage. Results are hypothetical. With annualized volatility of only 7.06%, UDN leaves little room, so small changes in rules or costs move the result noticeably.
Year by year
| Year | 200-day regime filter | buy & hold |
|---|---|---|
| 2021 | 0.0% | −6.9% |
| 2022 | 1.2% | −7.8% |
| 2023 | 3.9% | 4.6% |
| 2024 | −3.2% | −4.3% |
| 2025 | 7.5% | 12.1% |
| 2026 | −1.8% | −2.3% |
Four years ahead of holding, two behind
The strategy returned 0% in 2021, 1.2% in 2022, 3.9% in 2023, -3.2% in 2024, 7.5% in 2025 and -1.8% in 2026 so far. Holding the fund gave -6.9%, -7.8%, 4.6%, -4.3%, 12.1% and -2.3%. That put the rule in front for 2021, 2022, 2024 and 2026 and behind for 2023 and 2025.
The two big gaps in the rule's favour are 2021, at 6.9 points, and 2022, at 9 points. Both come from the same fact: the account held cash while UDN fell. In 2022 the strategy still made 1.2%, entirely from the December entry, while the fund lost 7.8%. These two years are where the whole advantage over holding was built.
The gaps against the rule are smaller. In 2023 holding gained 4.6% and the strategy 3.9%, a gap of 0.7 points. In 2025 holding gained 12.1% and the strategy 7.5%, a gap of 4.6 points. The 2025 gap has a specific cause. The 2025 return came from the 364-day trade entered 2025-03-05, so the rule held cash in January and February and missed whatever the fund did then. It did catch the fund's best days of the year, +1.7% on 2025-04-03 and +2.09% on 2025-04-10.
2024 is a year where the rule beat holding while losing money, -3.2% against -4.3%, a gap of 1.1 points. There were 8 round trips with 5 winners that year. Small whipsaws in February, April and May were each less than 1%, and the larger damage came in October 2024 at -2.86% and November at -1.45%.
2026 is close, -1.8% against -2.3%, a gap of 0.5 points, with 10 round trips and 4 winners. The year has the most trades and the smallest edge over holding.
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% | 0.0% | 0.0% | 0.0% | 0.0% | 1.2% |
| 2023 | 1.5% | −2.5% | 2.5% | 1.1% | −2.2% | 1.4% | 1.3% | −1.5% | −0.8% | 0.0% | 0.9% | 2.2% |
| 2024 | −1.8% | −0.6% | −0.1% | −1.2% | 0.1% | −0.4% | 1.7% | 2.4% | 1.0% | −2.9% | −1.4% | 0.0% |
| 2025 | 0.0% | 0.0% | 0.5% | 4.5% | 0.4% | 2.6% | −3.1% | 2.5% | 0.2% | −2.0% | 0.6% | 1.3% |
| 2026 | 1.2% | −0.4% | −2.2% | 0.8% | −0.4% | −0.5% | 0.0% | 0.3% | −0.6% | 0.0% | – | – |
Months in cash and the large months
The month grid is blank through November 2022 and the first entry registers as 1.22% in December 2022. Cash months also appear in October 2023, December 2024 through February 2025, and July 2026. Every other month has a number.
The best month was 2025-04 at 4.48%, and the worst was 2025-07 at -3.15%. Other large months were 2025-06 at 2.63%, 2025-08 at 2.53%, 2023-03 at 2.5%, 2024-08 at 2.44% and 2023-12 at 2.24%, against losses in 2024-10 at -2.86%, 2023-02 at -2.5%, 2023-05 at -2.24%, 2026-03 at -2.22% and 2025-10 at -1.99%. The strategy's month-to-month swings were up to about 4.5%, a large range for a fund with 7.06% annualized volatility.
Holding had its best month in 2022-11 (5.38%) and its worst in 2022-04 (-4.68%), and the strategy sat in cash for both because its first entry came in December 2022. The fund's best day, 2.37% on 2022-11-10, therefore fell before entry too.
Averaged by calendar month, UDN did best in November (1.11%) and December (0.72%) and worst in September (-1.32%) and October (-0.88%), from 5 or 6 samples each. The strategy's own September and October results in 2023 and 2024 were small losses, in line with that, but the sample is too small to be a pattern.
Every trade
200-day regime filter on UDN made 20 closed round trips, an average hold of 52 days, an average winner of 1.25%, an average loser of −0.48%, a profit factor of 2.50, a longest losing streak of 2. It held a position at the close on 49.7% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2022-12-02 | $15.97 | 2022-12-06 | $15.94 | −0.2% | 4 |
| 2022-12-08 | $15.98 | 2023-09-05 | $16.32 | 2.1% | 271 |
| 2023-11-15 | $16.43 | 2024-02-14 | $16.48 | 0.3% | 91 |
| 2024-02-15 | $16.53 | 2024-04-02 | $16.54 | 0.1% | 47 |
| 2024-04-04 | $16.66 | 2024-04-11 | $16.51 | −0.9% | 7 |
| 2024-05-06 | $16.58 | 2024-05-08 | $16.46 | −0.7% | 2 |
| 2024-05-10 | $16.51 | 2024-06-24 | $16.55 | 0.2% | 45 |
| 2024-06-25 | $16.53 | 2024-06-27 | $16.56 | 0.2% | 2 |
| 2024-07-03 | $16.57 | 2024-11-07 | $16.85 | 1.7% | 127 |
| 2024-11-08 | $16.83 | 2024-11-11 | $16.68 | −0.9% | 3 |
| 2025-03-05 | $16.95 | 2026-03-04 | $18.18 | 7.3% | 364 |
| 2026-03-05 | $18.13 | 2026-03-06 | $18.10 | −0.2% | 1 |
| 2026-03-10 | $18.24 | 2026-03-12 | $18.07 | −0.9% | 2 |
| 2026-04-09 | $18.21 | 2026-05-18 | $18.22 | 0.1% | 39 |
| 2026-05-19 | $18.15 | 2026-05-20 | $18.14 | −0.1% | 1 |
| 2026-05-21 | $18.13 | 2026-05-22 | $18.18 | 0.3% | 1 |
| 2026-05-29 | $18.23 | 2026-06-03 | $18.15 | −0.4% | 5 |
| 2026-08-06 | $18.15 | 2026-08-07 | $18.20 | 0.3% | 1 |
| 2026-08-10 | $18.17 | 2026-08-13 | $18.14 | −0.2% | 3 |
| 2026-08-17 | $18.21 | 2026-09-17 | $18.13 | −0.4% | 31 |
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.
Twenty trades, mostly small
The list has 20 closed round trips (40 fills) and nothing open at the end. A typical trade returned 0.05% over 5 days. Holds ran from 1 day to 364 days, and the run of consecutive winners peaked at 3 against 2 for losers.
The five best trades were 7.26% (2025-03-05 at an adjusted $16.95 to 2026-03-04 at $18.18, 364 days), 2.13% (2022-12-08 at $15.98 to 2023-09-05 at $16.32, 271 days), 1.69% (2024-07-03 to 2024-11-07, 127 days), 0.3% (2023-11-15 to 2024-02-14, 91 days) and 0.3% (2026-08-06 to 2026-08-07, 1 day). The five worst were -0.9% (2026-03-10 to 2026-03-12), -0.9% (2024-04-04 to 2024-04-11), -0.89% (2024-11-08 to 2024-11-11), -0.72% (2024-05-06 to 2024-05-08) and -0.44% (2026-08-17 to 2026-09-17).
Worst loss -0.9%, best gain 7.26%. The rule's losses are small because UDN barely moves against a position in a day, and the long trend trade is where the gain is. Three trades above 1.5% account for most of the total return, and the other 17 are close to zero. All prices are adjusted and read lower than the quotes of the day.
The first trade, entered 2022-12-02 at $15.97 and sold 2022-12-06 at $15.94, lost 0.19% in 4 days. The account re-entered two days later and held through September 2023. The last trade, 2026-08-17 at $18.21 to 2026-09-17 at $18.13, lost 0.44% over 31 days.
Look at March and May 2026. The rule bought on 2026-03-05 and sold 2026-03-06 for -0.17%, bought again 2026-03-10 and sold 2026-03-12 for -0.9%. In May it bought on 2026-05-19 and sold the next day for -0.06%, then bought 2026-05-21 and sold 2026-05-22 for 0.28%. These are the clusters of buy-sell pairs the description warns about. Each is small, and together they cost the account fills it paid slippage on in the cost runs below.
By exit year, 2024 had 8 round trips with 5 winners and 2026 had 10 with 4 winners. 2022 and 2023 had one each, and 2025 had none because the 364-day trade spanned the whole year.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2023-07-13 | 2024-06-26 | −5.4% | 349 | 2024-08-27 | 62 |
| 2024-09-27 | 2024-11-11 | −4.6% | 45 | 2025-04-14 | 154 |
| 2026-01-27 | 2026-09-16 | −4.4% | 232 | not yet | – |
Buy-and-hold's deepest drawdown ran from 2021-01-06 to 2022-09-27 and reached −22.7%.
Three drawdowns between 4% and 5.4%
The deepest drawdown was 5.38%. The equity peak was 2023-07-13, the low came on 2024-06-26 after 349 days, and equity recovered on 2024-08-27, 62 days later. The second, 4.64%, ran from 2024-09-27 to 2024-11-11, 45 days, and took 154 days to recover, on 2025-04-14. The third, 4.42%, started on 2026-01-27 and reached its low on 2026-09-16, 232 days on, still open at 2026-10-02.
Each drawdown is shallow and long. The first spent nearly a year falling, and the 2024 whipsaws in February to June account for much of it. The second was a pair of losing trades in October and November. The third spans the 2026 cluster of short trades after the long winner closed on 2026-03-04.
Holding the fund lost 22.74% between 2021-01-06 and 2022-09-27 (629 days) and recorded no recovery afterwards. The rule's maximum is 17.36 points shallower, and most of that difference is the time the account spent in cash during the 2021 and 2022 decline.
On closing prices the fund's own maximum drawdown is 23.24%, and its longest drawdown ran 1,441 sessions. A holder at the January 2021 peak had not recovered by the end of the data.
The drawdowns are small in dollar terms: 5.38% of a $10,000 account is a few hundred dollars. The rule's protection is real in this window, and the window contains one large decline in the fund, which the rule avoided by entering after it.
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) | 1.3% | −5.4% | $10,745 | 0.30 |
| 5 basis points | 0.9% | −5.9% | $10,538 | 0.22 |
| 10 basis points | 0.6% | −6.5% | $10,333 | 0.15 |
A rule with small trades is sensitive to slippage
Charging 5 basis points a fill takes CAGR from 1.26% to 0.92%, drawdown from 5.38% to 5.94%, final value from $10,745.15 to $10,537.96 and Sharpe from 0.3 to 0.222. Charging 10 basis points gives 0.57%, 6.49%, $10,333.27 and 0.147.
That is a large effect for 40 fills. Most trades are worth less than a percent, with a median of 0.05%, so a charge of 0.05% or 0.1% on each side is comparable to the typical trade. The rule still beats holding, which ended at $9,375.49, at both cost levels. It does so by a smaller margin, and at 10 basis points the CAGR is 0.57% against -1.12%.
UDN trades thinly: $2,009,419 of average daily dollar volume and 400 shares in the median minute, so a $10,000 sleeve is comparable to a minute's volume and a fixed charge may understate what a market order costs. The intraday range averaged 0.4% and the overnight gap 0.25%, so the open can sit a few cents from the prior close on a fund priced near $18.
The cost sensitivity comes from the 2024 and 2026 clusters. The long trades pay slippage twice over a year or more. The short trades pay it twice over a day or two for a result near zero.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 1.3% | −5.4% | 20 | 50% | $10,745 |
| 100-day SMA | 1.6% | −4.5% | 25 | 40% | $10,967 |
| 150-day SMA | 0.8% | −6.0% | 28 | 25% | $10,460 |
| 250-day SMA | 0.6% | −7.0% | 22 | 41% | $10,375 |
Shorter and longer averages
The window length was changed three ways. At 100 days the CAGR was 1.62% with a 4.52% drawdown, 25 trades, 10 wins, a final value of $10,967 and a Sharpe ratio of 0.379. At 150 days it was 0.79% with a 6.03% drawdown, 28 trades, 7 wins and $10,460.45. At 250 days it was 0.64% with a 6.97% drawdown, 22 trades, 9 wins and $10,374.76.
The 100-day window beat the published 200-day on CAGR, drawdown and Sharpe. The 150-day and 250-day versions fell behind it. CAGR fell as the window grew, from 1.62% at 100 days to 0.79% at 150 and 0.64% at 250, though the 200-day setting at 1.26% sits out of order between them. Three points on one fund are not enough to claim a trend across window length.
The trade counts, 25, 28 and 22 against 20, show that all three variants traded more than the published rule.
The test stops at three windows on one fund. The published 200-day setting is the classic version and was not chosen to fit UDN, and every variant still made a small positive CAGR.
How UDN behaved
| Measure | UDN |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | −6.0% |
| Annualized volatility | 7.1% |
| Deepest drawdown | −23.2% (2021-01-06 to 2022-09-27) |
| Up days | 44.8% |
| Average daily range | 0.40% |
| Average overnight gap | 0.25% |
| Correlation to SPY | 0.28 |
| Correlation to QQQ | 0.24 |
| Correlation to TLT | 0.23 |
| Sessions above the 200-day average | 57.6% |
| Crossings of the 200-day average | 40 |
| Falls of 10% or more from a 20-day high | 0 |
How UDN behaved
The fund itself fell 5.99% across the 1,444 sessions, which is a CAGR of -1.07% at 7.06% annualized volatility. Its worst drawdown was 23.24% (2021-01-06 to 2022-09-27). Up days were 44.84% of the total and averaged 0.37%, and down days averaged -0.35%. Intraday range was 0.4% and the overnight gap 0.25%.
Calendar years ran -7.07%, -7.95%, 4.69%, -4.36%, 12.42% and -2.36% (2026 partial). Overnight moves summed to a log return of -4.68% and intraday moves to -1.87%, so both halves of the day were slightly negative.
UDN tracks other currencies and opposes the dollar fund: 0.96 with FXE and -0.9 with USDU. Next in line were IAU (0.44), EEM (0.43), IGIB (0.41) and IEI (0.4). Further down, EEV sat at -0.43, KMLM at -0.29, SDS at -0.28 and SH at -0.27. Against SPY the correlation was 0.28, with QQQ 0.24 and with TLT 0.23, and betas were 0.12, 0.08 and 0.1.
Momentum and mean reversion both showed little. Lag-1 autocorrelation was 0. Across the 61 sessions with RSI(14) under 30, the median move was 0.25% over 5 days and 0.48% over 20, against baselines of -0.05% and -0.11%. RSI(2) was below 10 on 200 sessions, with medians of 0.03% and -0.3%. After RSI(14) oversold readings the median moves sat above the baselines, though by fractions of a percent.
Its largest one-day falls came on 2022-09-23 (-1.59%), 2022-09-13 (-1.42%), 2025-05-12 (-1.36%), 2022-07-05 (-1.31%) and 2023-03-07 (-1.3%). Its largest gains came on 2022-11-10 (2.37%), 2025-04-10 (2.09%), 2022-11-04 (1.96%), 2025-04-03 (1.7%) and 2023-11-14 (1.6%). No 20-day fall of 10% or more occurred, so the dip rules on this fund had nothing to act on. A fund that never falls fast is a better fit for a slow filter than for a dip rule.
The rules
Own the asset when price closes above its 200-day average; hold cash when it closes below.
- WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
- 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.
One rule, one number, applied to a currency fund
Only two orders exist. Each open, the account buys with 98% of the sleeve if flat and the previous close was over the 200-day average, and sells everything if invested and the previous close was under it. The template description frames the idea as price above the long average going with better returns and calmer markets, with no crossovers and no oscillators. Its stated weakness is whipsaw near the line at volatile bottoms, which creates clusters of buy-sell pairs, and some traders add a buffer band.
UDN is a good test of that caveat. On 57.59% of sessions UDN closed above the average, and over 1,444 sessions it crossed the line 40 times. Forty crossings is the raw material for churn, and the strategy's 20 round trips (40 fills) are the part of it that produced a signal.
The churn is clustered. Ten of the 20 round trips closed in 2026, and eight closed in 2024. In those two years price kept crossing the average. 2023 and 2025 each show one long trade instead: the 2022-12-08 entry held 271 days and the 2025-03-05 entry held 364 days. The same rule is a slow trend follower when UDN trends and a rapid in-and-out trader when it does not.
The strategy shows nothing for 2021 because the 200-day average needs 200 sessions of history before it exists, and price then had to close above it. The first entry was 2022-12-02. Through 2021 and most of 2022 UDN was in the decline that took it to the 2022-09-27 low, and the account stayed in cash.
The 200-day filter among the 12 templates and three currency funds
Third of 12 is the filter's place on UDN. Ahead of it were the trend plus trailing stop (1.88% CAGR, 8.28% drawdown) and the SMA 10/50 trend (1.53%, 6.05%). Behind it: EMA 12/26 trend 0.99%, RSI mean reversion 0.62%, RSI(2) snapback 0.4% and weekly 7% target 0.26%. Two templates, the dip buyer and the momentum breakout, never traded. Three lost money: 3-month momentum at -0.47%, monthly cycle at -0.67% and golden cross at -1.06%.
The regime filter has the smallest drawdown among the templates that traded, at 5.38%. Trend templates held the top four places, which suits a fund that drifted instead of spiking, while the mean-reversion and dip templates ranked lower or never traded.
In the currency category, USDU returned 2.71% with an 11.18% drawdown over 17 round trips and FXE returned 1.29% with a 6.39% drawdown over 17 round trips. UDN at 1.26% sits just under FXE, which matches their correlation of 0.96. The category median was 1.29% and the median over 59 funds was 1.84%. The strategy hub carries the full table and the UDN hub the comparison of all 12 rules on this fund.
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 UDN?
Over 2021-01-04 to 2026-10-02, 200-day regime filter on UDN returned 1.3% annualized vs −1.1% for buy-and-hold: it beat buy-and-hold by 2.4% per year, with a maximum drawdown 17.4 points shallower than holding (5.4% vs 22.7%).
How many trades did it make?
20 completed round trips over 5.7 years (40 fills), with 50% 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 UDN?
Yes. It finished at $10,745.15 (CAGR 1.26%) against $9,375.49 (CAGR -1.12%) for holding, and its worst drawdown was 5.38% against 22.74%.
How many trades did it make?
It closed 20 round trips over 40 fills, and half of them won. The typical hold was 5 days, and the longest, at 364 days, returned 7.26%.
Why did most trades close in 2024 and 2026?
Price crossed the 200-day average repeatedly in those years. 8 round trips closed in 2024 and 10 in 2026, many lasting 1 to 3 days, which is the cluster of buy-sell pairs the template warns about.
How do trading costs change the result?
The 5 basis point run gave a CAGR of 0.92% and $10,537.96, and the 10 basis point run 0.57% and $10,333.27. The median trade returned only 0.05%, so costs eat a large share of each.
Would a different moving-average window have done better?
At 100 days the CAGR was 1.62% with a 4.52% drawdown, at 150 days 0.79% and at 250 days 0.64%. All three finished above holding on CAGR. The test covers one fund and one window.
Why did the account hold cash through 2021 and most of 2022?
UDN stayed below its 200-day average while it fell to the 2022-09-27 low, and the first entry came on 2022-12-02. The 200-day average also needs 200 sessions of history before the first signal.
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.