Learn › Strategies › EMA 12/26 Trend › TLT

EMA 12/26 Trend on TLT

iShares 20+ Year Treasury Bond ETF: long-duration Treasuries, one of the most rate-sensitive bond ETFs. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.

Result: EMA 12/26 trend on TLT turned $10,000 into $9,619 (−3.8% total, −0.7% CAGR): it beat buy-and-hold by 7.6% per year, with a maximum drawdown 26.9 points shallower than holding (15.9% vs 42.8%).

The EMA 12/26 trend rule on TLT finished the window slightly below where it started: $10,000 became $9,619, a total return of -3.81% and a CAGR of -0.67%. Holding TLT over the same days did much worse. The buy-and-hold run ended at $6,106 with a CAGR of -8.23% and a maximum drawdown of 42.77%. The rule's maximum drawdown was 15.92%. The window covers 2021-01-04 to 2026-10-02, starting from $10,000, and the headline run charges nothing per trade.

TLT is the iShares 20+ Year Treasury Bond ETF, among the most rate-sensitive bond funds. It lost money in four of the six calendar years here. This rule holds only while its 12-day exponential average is above the 26-day one, and that could not turn the fund into a winner. It did cut the loss and the drawdown, and it ranked second of 12 templates on TLT.

The rule won 6 of its 21 round trips, a win rate of 29%, and its profit factor was 0.85. The winners were larger than the losers, an average of 3.78% against an average loser of -1.71%. The rest of the analysis connects those figures to how TLT behaved. This is a historical test of one window and says nothing about what a bond fund will do next.

−0.7%CAGR
−8.2%buy & hold CAGR
−15.9%max drawdown
-0.03Sharpe ratio
21round trips
29%win rate
■ EMA 12/26 trend   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

YearEMA 12/26 trendbuy & hold
20213.7%−4.4%
2022−0.2%−30.2%
20235.4%2.7%
2024−8.3%−7.7%
2025−2.7%4.0%
2026−1.1%−7.7%

Year by year against holding TLT

The strategy returned 3.7% in 2021, -0.2% in 2022, 5.4% in 2023, -8.3% in 2024, -2.7% in 2025 and -1.1% so far in 2026. Buy-and-hold returned -4.4%, -30.2%, 2.7%, -7.7%, 4% and -7.7% in those years. Ahead in 2021, 2022, 2023 and 2026, the rule lagged in 2024 and 2025.

Most of the gap comes from 2022. TLT lost 31.21% as a price series, and buy-and-hold lost 30.2% in the run. The strategy lost 0.2%. The entry signal did not fire between the start of the year and 2022-07-14, so the account sat in cash through the steepest part of the fall. One 35-day trade, from 2022-07-14 at $97.39 to 2022-08-18 at $97.57, made 0.18%, and the next from 2022-11-21 at $86.05 to 2022-12-29 at $85.70 lost 0.41%. No other year has a gap this wide in the strategy's favour.

2021 was a small positive for the rule at 3.7%, against -4.4% for the fund. The three trades that closed in 2021 returned -1.98%, 4.64% and 1.2%. The 123-day trade from 2021-05-28 to 2021-09-28 is the one that carried the year.

2023 is the year with the most trades that closed, four, and none of them won. The strategy lost on the entries of 2023-01-10, 2023-03-15, 2023-05-03 and 2023-06-22, at -0.19%, -1.91%, -2.41% and -2.11%. Even so the year closed at 5.4%, because the trade that began on 2023-11-10 at $77.91 and ran until 2024-01-22 at $84.3 returned 8.2%, and December 2023 alone added 8.44%. That one trade was the best in the test.

In 2024 the strategy fell behind, at -8.3% against -7.7%. It had five trades close that year, and two won. The losing entries of 2024-02-02, 2024-03-07 and 2024-12-03 returned -1.83%, -3.69% and -3.54%. 2025 was the other year behind: the fund gained 4% and the rule lost 2.7%, with the -3.85% trade from 2025-02-06 to 2025-04-11 being the single worst in the record. 2026 is partial, with two losing trades and -1.1% for the year.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%−0.6%−1.5%4.4%3.7%−0.3%−2.9%0.0%3.9%−2.6%
20220.0%0.0%0.0%0.0%0.0%0.0%2.1%−1.9%0.0%0.0%2.0%−2.3%
20232.5%−2.6%−0.2%0.4%−4.3%0.3%−2.3%0.0%0.0%0.0%3.7%8.4%
2024−4.0%−1.8%−3.6%0.0%−1.9%1.7%3.5%2.1%1.9%−2.8%0.0%−3.5%
20250.0%2.8%−1.2%−5.2%0.0%2.4%−2.8%−0.0%2.3%1.4%−0.5%−1.4%
20260.0%3.0%−3.8%0.0%0.0%1.6%−1.9%0.0%0.0%0.0%––

Month by month

Many cells in the monthly table read zero. Those are months spent entirely in cash, consistent with the 42.2% exposure. The first three months of 2021 read 0%, as do the first six months of 2022 and August to October 2023.

The best month was December 2023 at 8.44%, followed by June 2021 at 4.36%, November 2021 at 3.9% and November 2023 at 3.72%. The worst was April 2025 at -5.19%, then May 2023 at -4.33% and January 2024 at -4%. The fund itself peaked in November 2023 at 9.49% and its worst in April 2022 at -9.19%. Because the strategy was in cash in April 2022, it avoided that month entirely.

April 2025 is the month where the trend rule did the most damage. The entry on 2025-02-06 at $83.45 was still open when the fund sold off in early April, and the exit on 2025-04-11 at $80.24 locked in the -3.85%. The worst days for the fund in that period include 2025-04-07 at -3.05% and 2025-04-10 at -2.72%. An exponential average that reacts in days still has to wait for the cross, and the exit came after the drop.

The pattern of small losses and a few larger gains fits a rule with a 29% win rate and larger average winners. The sign of the total depends on whether the winners are big enough, and over this window they were not quite.

Every trade

EMA 12/26 trend on TLT made 21 closed round trips, an average hold of 43 days, an average winner of 3.78%, an average loser of −1.71%, a profit factor of 0.85, a longest losing streak of 5. It held a position at the close on 42.2% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-04-21$115.792021-05-12$113.50−2.0%21
2021-05-28$115.152021-09-28$120.494.6%123
2021-11-01$122.062021-12-30$123.521.2%59
2022-07-14$97.392022-08-18$97.570.2%35
2022-11-21$86.052022-12-29$85.70−0.4%38
2023-01-10$89.852023-02-14$89.68−0.2%35
2023-03-15$91.952023-05-02$90.19−1.9%48
2023-05-03$92.052023-05-09$89.83−2.4%6
2023-06-22$89.302023-07-06$87.42−2.1%14
2023-11-10$77.912024-01-22$84.308.2%73
2024-02-02$85.882024-02-07$84.31−1.8%5
2024-03-07$86.192024-03-19$83.01−3.7%12
2024-05-16$83.142024-10-07$86.944.6%144
2024-12-03$86.502024-12-17$83.44−3.5%14
2025-02-06$83.452025-04-11$80.24−3.9%64
2025-06-20$81.162025-07-16$80.61−0.7%26
2025-07-30$82.022025-09-03$81.83−0.2%35
2025-09-04$82.862025-11-14$86.103.9%71
2025-11-28$86.772025-12-02$85.26−1.7%4
2026-02-11$85.432026-03-13$84.64−0.9%30
2026-06-05$83.702026-07-10$83.50−0.2%35

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 21 round trips

The strategy made 21 closed round trips, 42 fills and no open position at the end. Holds averaged 42.5 days, the median 35 days, the longest 144 days and the shortest 4 days. The median return of a trade was -0.68%. Six trades won and fifteen lost, The longest run of wins was 3 and the longest run of losses was 5.

The winners came from a few long holds. The 8.2% trade of 2023-11-10 lasted 73 days. The 4.64% trade of 2021-05-28 lasted 123 days, the 4.57% trade of 2024-05-16 lasted 144 days, and the 3.91% trade of 2025-09-04 lasted 71 days. The fifth best was 1.2% over 59 days. Every strong winner needed more than two months of the fund trending up.

The losers were mostly short and shallow. Six trades lasted 14 days or less: the 6-day trade of 2023-05-03 lost 2.41%, the 14-day trade of 2023-06-22 lost 2.11%, the 5-day trade of 2024-02-02 lost 1.83%, the 12-day trade of 2024-03-07 lost 3.69%, the 14-day trade of 2024-12-03 lost 3.54%, and the 4-day trade of 2025-11-28 lost 1.74%. These are whipsaws, where the fast average poked above the slow one and dropped back inside a couple of weeks. TLT's average daily range was only 0.94%, so a small bounce was enough to flip the signal.

The first trade, from 2021-04-21 at $115.79 to 2021-05-12 at $113.5, lost 1.98%, and the last, from 2026-06-05 at $83.7 to 2026-07-10 at $83.5, lost 0.24%. Prices in the trade list are split and dividend adjusted, which is why they sit below the quotes of the day. By exit year the count ran 3, 2, 4, 5, 5 and 2 from 2021 to 2026. Losses were more frequent in 2023 and 2025, years where TLT moved sideways inside a downtrend.

A profit factor of 0.85 summarizes the record: the dollars lost on the losers exceeded the dollars won on the winners, by a modest amount.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2022-12-072025-09-02−15.9%1000not yet–
2021-09-222021-11-23−5.6%622021-12-0310
2021-12-032022-07-19−4.9%2282022-12-01135

Buy-and-hold's deepest drawdown ran from 2021-01-04 to 2023-10-19 and reached −42.8%.

Drawdowns

The deepest drawdown of the strategy started on 2022-12-07 and reached 15.92% on 2025-09-02. The low took 1,000 days to arrive, and the account had not regained the peak by the final bar. The fund's own drawdown started on 2021-01-04, bottomed at 42.77% on 2023-10-19 and never recovered either. The strategy's worst point was much shallower: 15.92% against 42.77%.

The second drawdown was 5.58%, from 2021-09-22 to 2021-11-23, with a recovery on 2021-12-03, and the third was 4.93%, from 2021-12-03 to 2022-07-19, recovered on 2022-12-01. Both belong to the first two years, when the rule was shallow and mostly in cash.

The long drawdown from late 2022 is the product of the string of small losses in 2023, 2024 and 2025. No single trade was larger than 3.85%, so no one event caused it. The drawdown accumulated through the whipsaws listed above, and the winners of 2023-11-10 and 2024-05-16 only partly offset them. A reader should know that the account was underwater for the last stretch of the test even though the fund was lower still.

This is the main use of the rule on TLT in these results. It limited the loss when the fund was falling and it did not make money when the fund was flat. A bond fund that falls for 1,018 days from peak to trough is a hard setting for any long-only rule.

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)−0.7%−15.9%$9,619-0.03
5 basis points−1.0%−16.8%$9,427-0.06
10 basis points−1.4%−17.9%$9,237-0.10

Trading costs

Costs bite harder here than for most templates because the rule trades often for a fund that moves slowly. Charging 5 basis points a fill gave a CAGR of -1.02%, the maximum drawdown 16.84% and the final value $9,427. At 10 basis points the CAGR was -1.37%, the drawdown 17.85% and the final value $9,237. The Sharpe ratio moved from -0.03 in the headline run to -0.064 and -0.101.

With 42 fills, each charge applies 42 times. TLT's average trade return is small, so 10 basis points at each end takes a visible share of a 0.2% or 0.4% result. The trades with returns between -0.41% and 0.18%, such as 2022-07-14 and 2023-01-10, are the ones where costs would decide the sign.

Liquidity is not the issue: average daily dollar volume was 2,159,787,473 and median minute volume 35,636. The 5 and 10 basis point charges are stand-ins. The runs do not model the bid-offer spread in a specific session, and they cannot say what a real fill would have been. They do show the direction: costs make a flat result worse, and a rule that was already below zero ends further below it.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules−0.7%−15.9%2129%$9,619
EMA 8/21−3.1%−22.5%4030%$8,350
EMA 20/50−4.3%−27.4%1429%$7,767
EMA 12/50−3.1%−23.6%1926%$8,365

Other speeds of the same crossover

Three variants alter the pair. EMA 8/21, the faster one, returned -3.09% a year with a drawdown of 22.47%, a final value of $8,350 and 40 trades, of which 12 won. EMA 20/50, slower, returned -4.31% with a drawdown of 27.45%, ended at $7,767 and made 14 trades, 4 of them winners. EMA 12/50 holds the fast leg and stretches the slow leg, returning -3.06% with a drawdown of 23.56%, $8,365 and 19 trades, 5 of them wins.

Each variant finished behind the published 12/26 settings, which returned -0.67% with a drawdown of 15.92%. That is the opposite of the usual warning about overfitting, because here the published rule is better than every variant tested. It is also a small test of three alternatives on one fund. The published rule could be ahead by chance, and a different window could reorder the four.

The pattern across the variants is that speeds either side of 12/26 did not help. The faster pair traded far more often and lost more. The slower pairs made fewer trades, and the drawdown went up. In a fund with no sustained uptrend, there was no speed that caught one.

The Sharpe ratios of the variants were -0.292, -0.453 and -0.292, against -0.03 for the published rule. None of the four had a positive risk-adjusted return, which agrees with TLT's own buy-and-hold Sharpe of -0.52.

How TLT behaved

MeasureTLT
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold−40.5%
Annualized volatility15.3%
Deepest drawdown−44.1% (2021-01-04 to 2023-10-19)
Up days49.0%
Average daily range0.94%
Average overnight gap0.54%
Correlation to SPY0.08
Correlation to QQQ0.09
Sessions above the 200-day average35.2%
Crossings of the 200-day average95
Falls of 10% or more from a 20-day high3

How TLT behaved

As a price series TLT lost 40.49% over the window, a CAGR of -8.64%, with an annualized volatility of 15.33%. The maximum drawdown was -44.06%, from 2021-01-04 to 2023-10-19, and the fund never got back to its first-day level. Its longest drawdown ran 1,443 sessions, close to the full test. By calendar year it returned -4.53%, -31.21%, 2.79%, -8.07% and 4.23% for 2021 to 2025, then -8.01% in 2026 to date.

The fund rose on 49% of days; up days averaged 0.74% and down days -0.77%. The average daily range was 0.94%. The worst single day was 2022-03-02 at -3.47% and the best 2022-11-10 at 3.9%. That is a quiet fund by equity standards, and the shortfall came from persistence in one direction, not from violent days.

Only 35.18% of TLT's sessions closed above the 200-day average, and price crossed that line 95 times. That count of crossings is the key number for a trend rule. Every crossing is a chance for a trend signal to fire and then reverse, and TLT gave many. Correlation to SPY was 0.08, to QQQ 0.09, and beta to SPY 0.07, so stocks did not drive it. The closest matches were TMF at 1, BND and AGG at 0.92 and IEF at 0.91.

The RSI figures show how little bounce the fund gave. RSI(14) dropped under 30 on 61 sessions; the median 20-day return afterwards was -1.63% against a baseline of -0.6%. The 2-day RSI fell below 10 on 203 sessions with a median 20-day return of -0.65%. Mean reversion had no tailwind here, yet RSI(2) snapback was the only template that finished positive on TLT.

The rules

Hold while the 12-day exponential average is above the 26-day, the core of the MACD used as a position switch.

  1. WHEN the market opens · IF not invested AND EMA(12) > EMA(26) · THEN buy with 98% of the sleeve
  2. 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 the rules met this fund

The rule switches between long and flat on a single fund, deciding once a day. Flat, it buys 98% of the sleeve at the open once EMA(12) is above EMA(26). Long, it sells everything when EMA(12) falls below EMA(26).

Recent days carry more weight in an exponential average, so this pair turns sooner than simple averages of equal length. A hard-trending fund rewards that speed. On TLT it produced entries that failed. The fund spent 2022 falling hard, and the rule did well by being out of the market for most of the decline. It spent 2023 to 2025 in a wide range, and the rule paid for that with a run of small losses.

Other templates on TLT give a yardstick. SMA 10/50 trend returned -0.85% with a drawdown of 14.24%, close to this rule. The momentum breakout returned -1.2% with a drawdown of 10.32%. The golden cross returned -2.46%, the 200-day regime filter -7.58% and the monthly cycle -8.08%. The dip buyer lost 4.32% a year with a drawdown of 27.81%.

The template's median CAGR was 2.76% over all 59 funds and 1.02% over bond funds. TLT ranked 44th of 59 for this strategy. Among the bond peers, SGOV returned 3.21%, IGIB 2.35%, AGG 1.07% and BND 1.02%, while IEF returned -0.39% and TLT -0.67%. Funds with shallower falls and lower volatility fared better for this rule. Full tables are on the strategy hub and the TLT page.

Testing ends with a single 5.74 year window in which long Treasuries fell. A rule that has no short side can only be flat, and results from a period where bonds rose would look different.

Run EMA 12/26 trend on TLT 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 EMA 12/26 trend beat buy-and-hold on TLT?

Over 2021-01-04 to 2026-10-02, EMA 12/26 trend on TLT returned −0.7% annualized vs −8.2% for buy-and-hold: it beat buy-and-hold by 7.6% per year, with a maximum drawdown 26.9 points shallower than holding (15.9% vs 42.8%).

How many trades did it make?

21 completed round trips over 5.7 years (42 fills), with 29% 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.

Did the EMA 12/26 trend beat buy-and-hold on TLT?

Both lost money, but the rule lost less. It returned -0.67% a year against -8.23% for holding, and ended at $9,619 against $6,106. Its maximum drawdown was 15.92% against 42.77%. It was ahead in 2021, 2022, 2023 and 2026.

Why is the win rate only 29%?

Only six of 21 round trips made money. Many entries reversed within days, and six of the losers were closed after 14 days or less. The average loser was -1.71% and the average winner 3.78%, so the result was close to flat.

What was the biggest trade?

The entry on 2023-11-10 at $77.91, sold on 2024-01-22 at $84.3, returned 8.2% over 73 days. The worst was 2025-02-06 to 2025-04-11 at -3.85%. No trade lost more than that.

Do other EMA settings work better on TLT?

None did. EMA 8/21 returned -3.09%, EMA 20/50 -4.31% and EMA 12/50 -3.06%, each under the published -0.67%. Three alternatives on one fund is a thin sample.

How much do trading costs matter here?

More than for slow rules. A 5 basis point charge cut the CAGR to -1.02%, and 10 basis points to -1.37%. The strategy made 42 fills, and many trades returned less than 1% before costs.

Why did the rule hold up in 2022?

The fund dropped 31.21% that year while the strategy sat in cash until its entry on 2022-07-14. The strategy ended 2022 down 0.2%, and holding lost 30.2%. No other year shows a wider gap.

Related

EMA 12/26 Trend on all 59 ETFsfull results table All strategies on TLT12 templates compared RSI(14) Mean Reversion on TLTsame ETF, different rulesRSI(2) Dip Snapback on TLTsame 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.