EMA 12/26 Trend 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 EMA 12/26 trend rule on UDN turned $10,000 into $10,584.75 between 2021-01-04 and 2026-10-02. That is a total return of 5.85% and a CAGR of 0.99%, with a maximum drawdown of 9.91% and a Sharpe ratio of 0.23. It made 22 round trips and 44 fills. Buy and hold on UDN, the Invesco DB US Dollar Index Bearish Fund, lost 6.25% and ended at $9,375.49 with a drawdown of 22.74% that never recovered. The rule beat buy and hold by 2.11% a year and finished $1,209.26 ahead.
The result needs two readings. Against the fund it traded, the rule came out ahead because it sat in cash for most of the time while UDN fell. As a trading system it was a weak one: 5 of its 22 trades won, a 23% win rate, and the median trade lost 0.57%. The five winners carry all of the profit, and the February to July 2025 hold made the largest single gain.
UDN is a currency fund that profits when the US dollar weakens against major currencies. It moves little: annualized volatility was 7.06% and the average daily range was 0.4%. A fast crossover on a fund this quiet crosses back and forth often, and each cross costs a small loss. The UDN hub ranks all 12 templates on this fund.
Year by year
| Year | EMA 12/26 trend | buy & hold |
|---|---|---|
| 2021 | −1.5% | −6.9% |
| 2022 | −0.3% | −7.8% |
| 2023 | 3.8% | 4.6% |
| 2024 | 0.1% | −4.3% |
| 2025 | 7.4% | 12.1% |
| 2026 | −3.4% | −2.3% |
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | 0.0% | 0.0% | −0.2% | 1.4% | −1.9% | 0.0% | 0.0% | −0.8% | 0.0% | 0.0% | 0.0% |
| 2022 | −2.6% | −0.9% | 0.0% | 0.0% | 0.0% | −0.7% | 0.0% | −1.2% | 0.0% | −0.8% | 3.9% | 2.3% |
| 2023 | 1.5% | −2.0% | 0.5% | 1.1% | −1.6% | −0.4% | 1.3% | −0.5% | 0.0% | 0.0% | 1.6% | 2.2% |
| 2024 | −1.8% | 0.0% | −0.7% | 0.0% | 0.1% | −0.8% | 1.4% | 2.4% | 1.0% | −1.5% | 0.0% | 0.0% |
| 2025 | −0.4% | −0.6% | 3.4% | 4.5% | 0.4% | 2.6% | −3.0% | 0.4% | 0.2% | −1.0% | 0.0% | 0.8% |
| 2026 | 0.0% | −0.4% | −1.7% | 0.0% | −1.2% | 0.0% | 0.0% | 0.5% | −0.8% | 0.0% | – | – |
Every trade
EMA 12/26 trend on UDN made 22 closed round trips, an average hold of 43 days, an average winner of 4.00%, an average loser of −0.80%, a profit factor of 1.44, a longest losing streak of 8. It held a position at the close on 45.2% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-04-20 | $18.65 | 2021-06-17 | $18.51 | −0.8% | 58 |
| 2021-09-07 | $18.33 | 2021-09-17 | $18.19 | −0.8% | 10 |
| 2022-01-13 | $17.79 | 2022-01-27 | $17.32 | −2.6% | 14 |
| 2022-02-08 | $17.60 | 2022-02-15 | $17.50 | −0.6% | 7 |
| 2022-02-17 | $17.58 | 2022-02-22 | $17.52 | −0.3% | 5 |
| 2022-06-03 | $16.47 | 2022-06-09 | $16.35 | −0.7% | 6 |
| 2022-08-12 | $15.91 | 2022-08-17 | $15.71 | −1.3% | 5 |
| 2022-10-28 | $15.14 | 2022-11-04 | $15.01 | −0.9% | 7 |
| 2022-11-08 | $15.24 | 2023-02-17 | $16.12 | 5.8% | 101 |
| 2023-03-22 | $16.37 | 2023-05-19 | $16.36 | −0.1% | 58 |
| 2023-06-20 | $16.55 | 2023-08-09 | $16.63 | 0.5% | 50 |
| 2023-11-06 | $16.32 | 2024-01-23 | $16.66 | 2.1% | 78 |
| 2024-03-06 | $16.74 | 2024-03-26 | $16.62 | −0.7% | 20 |
| 2024-05-15 | $16.63 | 2024-06-21 | $16.51 | −0.7% | 37 |
| 2024-07-09 | $16.62 | 2024-10-08 | $17.19 | 3.4% | 91 |
| 2025-01-29 | $16.35 | 2025-02-03 | $16.17 | −1.1% | 5 |
| 2025-02-05 | $16.45 | 2025-07-31 | $17.80 | 8.2% | 176 |
| 2025-08-14 | $18.16 | 2025-10-08 | $18.09 | −0.4% | 55 |
| 2025-12-05 | $18.09 | 2026-01-15 | $18.05 | −0.2% | 41 |
| 2026-01-23 | $18.27 | 2026-03-03 | $18.09 | −1.0% | 39 |
| 2026-04-14 | $18.36 | 2026-05-20 | $18.14 | −1.2% | 36 |
| 2026-08-03 | $18.15 | 2026-09-21 | $18.10 | −0.3% | 49 |
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.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-05-25 | 2022-11-03 | −9.9% | 527 | 2023-12-21 | 413 |
| 2025-07-01 | 2026-09-21 | −6.0% | 447 | not yet | – |
| 2023-12-27 | 2024-06-21 | −3.7% | 177 | 2024-08-20 | 60 |
Buy-and-hold's deepest drawdown ran from 2021-01-06 to 2022-09-27 and reached −22.7%.
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.0% | −9.9% | $10,585 | 0.23 |
| 5 basis points | 0.6% | −10.5% | $10,360 | 0.15 |
| 10 basis points | 0.2% | −11.2% | $10,138 | 0.07 |
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 1.0% | −9.9% | 22 | 23% | $10,585 |
| EMA 8/21 | 1.7% | −12.0% | 28 | 46% | $10,997 |
| EMA 20/50 | 0.8% | −6.3% | 13 | 38% | $10,492 |
| EMA 12/50 | 1.6% | −5.4% | 13 | 54% | $10,964 |
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 |
The rules
Hold while the 12-day exponential average is above the 26-day, the core of the MACD used as a position switch.
- WHEN the market opens · IF not invested AND EMA(12) > EMA(26) · THEN buy with 98% of the sleeve
- WHEN the market opens · IF invested AND EMA(12) < EMA(26) · THEN sell the whole position
The 12/26 exponential moving average pair is the core of the MACD indicator. Exponential averages weight recent days more than simple averages, so this crossover reacts faster than an SMA pair of the same length. Used as a long/flat switch, it gives you a position you can hold and measure.
Good for: traders who like MACD logic but want it expressed as a simple, testable long/flat rule.
Watch out: faster reaction means more trades and more whipsaws than a 50/200 cross; check the trade count on each backtest page.
How each year played out
The strategy returned -1.5% in 2021, -0.3% in 2022, 3.8% in 2023, 0.1% in 2024, 7.4% in 2025 and -3.4% in 2026 to date. Buy and hold returned -6.9%, -7.8%, 4.6%, -4.3%, 12.1% and -2.3%. The rule beat the fund in 2021, 2022 and 2024, and lost to it in 2023, 2025 and 2026. The gaps in its favour were 5.4 points in 2021, 7.5 in 2022 and 4.4 in 2024. The gaps against it were 0.8 in 2023, 4.7 in 2025 and 1.1 in 2026.
The pattern is typical of a trend switch on a fund with a long decline and a short rally. In 2021 and 2022 the dollar-bearish fund slid, the crossover was long only for short spells, and each spell lost a little. The six round trips that closed in 2022 all lost money, and the two that closed in 2021 lost as well, so the first eight trades of the test were all small losses. The strategy still ended 2022 only 0.3% down because it was out of the market for most of the year while buy and hold lost 7.8%.
The recovery began in the final quarter of 2022. The strategy bought on 2022-11-08 at 15.24 and sold on 2023-02-17 at 16.12, a gain of 5.77%. That single trade gave 2023 most of its 3.8%. In 2024 the rule was long for a stretch from 2024-07-09 to 2024-10-08 and made 3.43%, but its short trades in March and May lost, so the year ended at 0.1% while the fund fell 4.3%. The year 2025 was the best of the test. It returned 7.4% against 12.1% for the fund, and the long hold from 2025-02-05 to 2025-07-31 produced 8.21%. In 2026 the rule lost 3.4%, with all four closed trades losing, while the fund lost 2.3%. This is the one partial year in the test, with data to 2026-10-02.
Which months carried the result
The best month was April 2025 at 4.49%, followed by November 2022 at 3.85% in the list of positive months and March 2025 at 3.39%. The worst was July 2025 at -3.05%, then January 2022 at -2.59% and February 2023 at -2.02%. June 2021 lost 1.87% and January 2024 lost 1.79%.
The monthly table is sparse. In many months the strategy held no position and returned 0.0%, which fits an exposure of 45.2%. The rule was positive in months such as May 2021 at 1.37%, December 2022 at 2.29%, January 2023 at 1.51%, April 2023 at 1.07%, July 2023 at 1.31%, November 2023 at 1.62% and December 2023 at 2.24%. These came in runs because the position was held through them.
July 2025 shows the usual cost of this rule. The long position bought in February 2025 was still open at the start of July. In that month the fund turned lower and the strategy gave back 3.05%, before the crossover exited on 2025-07-31 at 17.8. The exit was lagged by the averaging, so a part of the gain went back first. The 2025 hold still closed at a gain of 8.21%, so the lag cost money without making the trade a loser.
For UDN's own seasonal pattern, September averaged -1.32% and October -0.88% over the sample, and November averaged 1.11%. Those are five or six observations per month in a fund that moves 0.37% on an average up day, so they describe this window only.
Twenty-two trades, five winners
The strategy made 22 round trips. Five won, which is 23%, and 17 lost. The average win was 4% and the average loss was -0.8%, which gives a profit factor of 1.44. The longest winning streak was 2 trades and the longest losing streak was 8. The median trade lost 0.57%, the median hold was 39 days, the longest hold was 176 days and the shortest was 5 days. The average hold was 43.1 days.
The five best trades were:
- 2025-02-05 to 2025-07-31, from 16.45 to 17.8, a gain of 8.21% over 176 days.
- 2022-11-08 to 2023-02-17, from 15.24 to 16.12, a gain of 5.77% over 101 days.
- 2024-07-09 to 2024-10-08, from 16.62 to 17.19, a gain of 3.43% over 91 days.
- 2023-11-06 to 2024-01-23, from 16.32 to 16.66, a gain of 2.08% over 78 days.
- 2023-06-20 to 2023-08-09, from 16.55 to 16.63, a gain of 0.48% over 50 days.
Trade prices here are split and dividend adjusted. The worst trade was entered on 2022-01-13 at 17.79 and sold on 2022-01-27 at 17.32, a loss of 2.64% in 14 days. The next worst were 2022-08-12 to 2022-08-17 at -1.26%, 2026-04-14 to 2026-05-20 at -1.2%, 2025-01-29 to 2025-02-03 at -1.1% and 2026-01-23 to 2026-03-03 at -0.96%.
The losses come in clusters. In February 2022 the rule bought on the 8th and sold on the 15th for -0.57%, then bought on the 17th and sold on the 22nd for -0.34%. In 2025 it sold on 2025-02-03 at a loss of 1.1% and bought again two days later, on 2025-02-05, which became the best trade of the test. A rule that flips quickly pays for every false signal, and it also catches the real turns when they come. The second trade shows why the rule is kept in the test: the false signal on 2025-01-29 cost 1.1% and the next signal made 8.21%.
By exit year the closed trades were 2 in 2021 with no wins, 6 in 2022 with none, 3 in 2023 with 2 wins, 4 in 2024 with 2 wins, 3 in 2025 with 1 win and 4 in 2026 with none. All 5 winners came in the three years from 2023 to 2025, and the first eight trades and all the 2026 trades lost. The last trade closed on 2026-09-21 at 18.1 after being entered on 2026-08-03 at 18.15, a loss of 0.28%. No position was open at the end.
The three drawdowns
The deepest drawdown on the strategy was 9.91%. It started at the peak on 2021-05-25, hit the trough on 2022-11-03 after 527 days and recovered on 2023-12-21, 413 days later. The second drawdown, 6%, began at the peak on 2025-07-01 and reached its trough on 2026-09-21 after 447 days. It had not recovered by the last day of the test. The third, 3.73%, ran from 2023-12-27 to a trough on 2024-06-21 and recovered on 2024-08-20, 60 days after the trough.
Buy and hold had one drawdown that covered the window: 22.74% from the peak on 2021-01-06 to a trough on 2022-09-27, 629 days later, with no recovery. The rule's maximum drawdown was 12.83 points shallower. That is the clearest benefit of the rule on this fund. It stood aside for most of the decline. The fund's own series shows -23.24% over the same dates and a longest drawdown of 1,441 sessions.
The rule's drawdown did not come from a crash. It came from slow bleeding: a run of small losses between 2021 and 2022, then a second run from July 2025. The second drawdown is the one still open. At the end of the test the strategy was down 6% from its July 2025 peak, which came while the best trade was still open.
What slippage does to a rule with a small edge
With no slippage the CAGR was 0.99%, the maximum drawdown 9.91%, the final value $10,584.75 and the Sharpe ratio 0.23. At 5 basis points per fill the CAGR fell to 0.62%, the drawdown rose to 10.53%, the final value was $10,359.93 and the Sharpe ratio was 0.154. At 10 basis points the CAGR was 0.24%, the drawdown was 11.15%, the final value $10,137.81 and the Sharpe ratio 0.074.
The rule makes 44 fills over the window, so costs act on many small trades with an average win of 4% and an average loss of -0.8%. The cost run at 10 basis points leaves a CAGR of 0.24%, close to zero. This is a strategy whose edge over cash is thin even before costs, and friction removes most of what is left. A fund with a median minute volume of 400 shares, as UDN has, also suggests fills could be worse than the cost runs assume. Its average daily dollar volume was about $2,009,419, which is small next to the large equity ETFs in the library. The two cost runs are an assumption about friction and not a measurement of UDN's spreads.
Other speeds of the same average pair
Three alternatives were run against the published 12/26 setting. EMA 8/21 returned a CAGR of 1.67% with a maximum drawdown of 11.98%, a final value of $10,997.19, a Sharpe ratio of 0.37 and 28 trades, 13 of them wins. EMA 20/50 returned 0.84% with a drawdown of 6.35%, $10,492.07, a Sharpe ratio of 0.207 and 13 trades with 5 wins. EMA 12/50 returned 1.62% with a drawdown of 5.41%, $10,963.52, a Sharpe ratio of 0.378 and 13 trades with 7 wins.
Two of the three variants beat the published rule on both return and Sharpe ratio, and the slow-pair variants cut the number of trades. Lengthening the slow average to 50 in EMA 12/50 cut the trade count from 22 to 13 and lifted the CAGR from 0.99% to 1.62%, with a shallower drawdown of 5.41% against 9.91%. EMA 20/50 had the same 13 trades and a lower return of 0.84%. The faster EMA 8/21 had the most trades, 28, and the highest CAGR, 1.67%, with the deepest drawdown of the group at 11.98%.
The variants do not agree on a direction, since the fastest and a slow one both beat the default. With results between 0.84% and 1.67% on a fund that fell over the window, these differences are small in dollars. The final values run from $10,492.07 to $10,997.19 and the published rule's $10,584.75 sits inside that range. Picking the best variant from this table after the fact would be fitting to one window, which is why the published rules are the ones reported in the headline.
What UDN did over the window
UDN returned -5.99% in total over 1,444 sessions, a CAGR of -1.07%, with annualized volatility of 7.06%. Fewer than half of its sessions closed up, at 44.84%. A typical up session added 0.37% and a typical down session took off 0.35%. Within a day the fund spanned 0.4% from low to high, and the gap from one close to the next open averaged 0.25%. The fund's own calendar-year line starts with a loss of 7.07% in 2021 and ends with a gain of 12.42% in 2025.
The single largest daily gain was 2.37% on 2022-11-10, and the largest daily loss was -1.59% on 2022-09-23. No day moved the fund by more than 2.4% in either direction, so no single session could rescue or ruin a trade by itself. The rule bought on 2022-11-08, after the 1.96% day of 2022-11-04 and two days before the 2.37% day of 2022-11-10, so it caught most of that rally.
UDN trends in spells and drifts sideways between them. The lag-one autocorrelation was 0 and the share of up days was well under half. UDN spent 57.59% of sessions above its 200-day average and crossed it 40 times. The 14-day RSI was below 30 on 61 sessions and the median forward 5-day and 20-day returns after those were 0.25% and 0.48%, against baseline medians of -0.05% and -0.11%.
Its correlation to SPY was 0.28, to QQQ 0.24 and to TLT 0.23. FXE was the closest match among the library's funds at 0.96, and USDU the sharpest opposite at -0.9. That USDU figure matches the fund's design, since UDN is built to move opposite to the dollar. That link makes USDU the natural comparison, and FXE the near twin.
How a 12/26 crossover fits a low-volatility currency fund
The entry waits for the 12-day exponential average to sit above the 26-day while the account is flat, then puts 98% of the sleeve into UDN at the next open. The exit sells everything at an open once the 12-day line drops under the 26-day line. Because recent days carry more weight in an exponential average, this pair turns sooner than a simple pair of similar length, and the cost of turning sooner is more false signals.
On UDN the whipsaws are visible. The two averages sit close together because the fund moves 0.37% on a typical up day. A small wiggle moves the 12-day average across the 26-day. The result was 22 round trips in 5.74 years, with 17 small losses. A fund that trended harder would give the rule longer holds. Here the winners came when the dollar weakened for months, as in early 2025.
The same strategy across the currency category had a median CAGR of 1.32%. USDU returned 3.17% with a 4.28% drawdown and 23 round trips. FXE returned 1.32% with an 11.59% drawdown and 21 round trips. UDN returned 0.99% with 9.91% and 22. The strategy's median CAGR across all 59 funds is 2.76%, so UDN sat below the all-fund median and below the category median. It ranks 38 of 59 funds for this strategy.
On this fund the EMA rule ranks 4 of 12 templates. Ahead of it were the trend with a trailing stop at 1.88% with an 8.28% drawdown, the SMA 10/50 trend at 1.53% with 6.05% and the 200-day regime filter at 1.26% with 5.38%. Behind it were the RSI mean reversion at 0.62%, the RSI(2) snapback at 0.4% and the weekly 7% target at 0.26%. The dip buyer and the momentum breakout made no trades at 0%. The 3-month momentum lost 0.47%, the monthly cycle lost 0.67% and the golden cross lost 1.06%. Slower trend rules had lower drawdowns than the EMA pair here, with the 200-day filter at 5.38% against 9.91%.
Where the test stops
This is one fund over 5.74 years. A CAGR of 0.99% from 22 trades, 5 of them winners, has wide error bars, and a different start date would change which trades are in the sample. The headline run has no fees or slippage, the cost runs cover only 5 and 10 basis points, and UDN's low volume means real fills might differ. Backtests are hypothetical and are not a forecast or advice.
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 EMA 12/26 trend beat buy-and-hold on UDN?
Over 2021-01-04 to 2026-10-02, EMA 12/26 trend on UDN returned 1.0% annualized vs −1.1% for buy-and-hold: it beat buy-and-hold by 2.1% per year, with a maximum drawdown 12.8 points shallower than holding (9.9% vs 22.7%).
How many trades did it make?
22 completed round trips over 5.7 years (44 fills), with 23% of round trips closing profitably.
Is this the same as trading MACD signals?
It uses the MACD's underlying trend component. Classic MACD trades the signal-line crossover of the 12/26 spread. This template trades the spread's sign directly, which is simpler and can be built fully in blocks.
How did the EMA 12/26 trend rule do on UDN?
It returned a CAGR of 0.99% and ended at $10,584.75 from $10,000, with a maximum drawdown of 9.91% and 22 round trips. Buy and hold lost 6.25% over the same window. The rule beat it by 2.11% a year.
What is the win rate of the EMA 12/26 rule on UDN?
Five of 22 round trips won, a win rate of 23%. The average win was 4% and the average loss was -0.8%, which gives a profit factor of 1.44. The longest losing streak was 8 trades.
Which trade made the most money?
The hold from 2025-02-05 at 16.45 to 2025-07-31 at 17.8, a gain of 8.21% over 176 days. The second best was 2022-11-08 to 2023-02-17 at 5.77%. Prices are adjusted for splits and dividends.
How much did trading costs reduce the result?
At 5 basis points per fill the CAGR was 0.62% and the final value $10,359.93. At 10 basis points the CAGR was 0.24% and the final value $10,137.81. The rule makes 44 fills, so friction takes a large share of a small edge.
Did a different EMA pair do better on UDN?
EMA 8/21 returned 1.67% with 28 trades and EMA 12/50 returned 1.62% with 13 trades and a 5.41% drawdown. EMA 20/50 returned 0.84%. These are single-window results and the spread between them is small.
Why did the rule lose money in so many trades on UDN?
UDN's average daily range was 0.4% and the two averages sit close together, so small moves flip the signal. Eight losing trades in a row ran from April 2021 to November 2022. The five winners came between 2022-11 and 2025-07 in longer rallies.
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.