Learn › Strategies › EMA 12/26 Trend › IEF

EMA 12/26 Trend on IEF

iShares 7-10 Year Treasury Bond ETF: intermediate Treasuries, a common 60/40 diversifier. 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 IEF turned $10,000 into $9,778 (−2.2% total, −0.4% CAGR): it beat buy-and-hold by 1.9% per year, with a maximum drawdown 11.1 points shallower than holding (10.6% vs 21.8%).
−0.4%CAGR
−2.3%buy & hold CAGR
−10.6%max drawdown
-0.06Sharpe ratio
26round trips
19%win rate
■ EMA 12/26 trend   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

YearEMA 12/26 trendbuy & hold
20210.2%−3.3%
2022−5.8%−14.8%
20233.0%3.5%
2024−0.5%−0.6%
20254.2%7.8%
2026−3.0%−4.5%

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%−0.6%−0.5%1.0%1.9%−0.4%−0.5%0.0%−0.6%−0.1%
2022−1.1%0.0%−1.8%0.0%−0.3%−0.3%1.1%−2.9%0.0%0.0%0.7%−1.4%
20231.0%−2.0%−0.4%0.8%−1.8%0.0%0.0%0.0%0.0%0.0%1.8%3.7%
20240.1%−1.7%−1.6%−1.3%0.0%1.2%2.8%1.3%1.3%−1.8%0.0%−0.7%
2025−0.2%2.7%0.3%1.0%−2.1%0.6%−0.6%1.6%0.7%0.7%1.0%−1.4%
2026−0.6%1.6%−1.7%−0.9%0.0%0.1%−0.8%−0.6%0.0%0.0%––

Every trade

EMA 12/26 trend on IEF made 26 closed round trips, an average hold of 39 days, an average winner of 3.35%, an average loser of −0.89%, a profit factor of 0.87, a longest losing streak of 10. It held a position at the close on 48.5% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-04-23$97.922021-04-30$97.32−0.6%7
2021-05-05$97.602021-05-13$97.16−0.5%8
2021-05-25$97.832021-09-09$100.232.5%107
2021-09-10$100.252021-09-13$100.22−0.0%3
2021-09-15$100.542021-09-20$100.22−0.3%5
2021-11-10$99.172021-11-12$98.53−0.7%2
2021-12-01$99.032022-01-04$97.73−1.3%34
2022-03-07$96.872022-03-11$95.14−1.8%4
2022-05-31$89.442022-06-02$88.92−0.6%2
2022-07-06$90.042022-08-23$88.33−1.9%48
2022-11-16$84.532022-12-30$83.96−0.7%44
2023-01-09$86.022023-02-13$85.12−1.1%35
2023-03-16$87.572023-05-22$86.25−1.5%67
2023-11-08$82.242024-02-12$85.514.0%96
2024-03-08$86.432024-03-18$84.87−1.8%10
2024-03-28$85.692024-04-02$84.66−1.2%5
2024-05-14$84.602024-10-08$88.845.0%147
2024-12-04$87.902024-12-18$87.29−0.7%14
2025-01-31$87.102025-05-14$88.611.7%103
2025-06-05$89.722025-06-10$89.20−0.6%5
2025-06-12$89.822025-12-12$93.043.6%183
2025-12-29$93.712026-01-20$92.78−1.0%22
2026-02-10$93.892026-03-16$93.72−0.2%34
2026-04-20$93.972026-04-29$93.09−0.9%9
2026-06-17$93.232026-07-13$92.53−0.8%26
2026-08-27$92.662026-08-31$92.08−0.6%4

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

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-08-032023-11-09−10.6%8282025-11-25747
2025-11-262026-08-31−4.5%278not yet–
2021-04-222021-06-03−1.2%422021-06-107

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

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.4%−10.6%$9,778-0.06
5 basis points−0.8%−11.6%$9,534-0.15
10 basis points−1.3%−12.6%$9,295-0.24

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules−0.4%−10.6%2619%$9,778
EMA 8/21−0.3%−9.4%3628%$9,806
EMA 20/50−0.3%−10.9%1436%$9,857
EMA 12/50−0.3%−9.3%1631%$9,823

How IEF behaved

MeasureIEF
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold−12.9%
Annualized volatility7.4%
Deepest drawdown−22.2% (2021-01-04 to 2023-10-19)
Up days48.5%
Average daily range0.42%
Average overnight gap0.26%
Correlation to SPY0.09
Correlation to QQQ0.10
Correlation to TLT0.91
Sessions above the 200-day average53.0%
Crossings of the 200-day average60
Falls of 10% or more from a 20-day high0

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.

Run EMA 12/26 trend on IEF 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 IEF?

Over 2021-01-04 to 2026-10-02, EMA 12/26 trend on IEF returned −0.4% annualized vs −2.3% for buy-and-hold: it beat buy-and-hold by 1.9% per year, with a maximum drawdown 11.1 points shallower than holding (10.6% vs 21.8%).

How many trades did it make?

26 completed round trips over 5.7 years (52 fills), with 19% 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.

Related

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