Learn › Strategies › SMA-200 Trend + 15% Trailing Stop › IEF

SMA-200 Trend + 15% Trailing Stop 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: trend + trailing stop on IEF turned $10,000 into $8,838 (−11.6% total, −2.1% CAGR): it beat buy-and-hold by 0.2% per year, with a maximum drawdown 0.3 points shallower than holding (21.5% vs 21.8%).

On IEF the trend plus trailing stop rule used its stop once. It bought on 2021-11-08, sold on 2022-06-13 when the 15% trailing stop was hit, bought again on 2023-01-13 and then held to the end of the test on 2026-10-02. That is one closed round trip, a loss of 14.07%, and one open position marked at +2.43%, across 3 fills. The $10,000 account finished at $8,838, a CAGR of -2.13%, with a maximum drawdown of 21.47% and a Sharpe ratio of -0.32.

IEF is the iShares 7-10 Year Treasury Bond ETF. Buy-and-hold on it ended at $8,756, a CAGR of -2.29% with a drawdown of 21.77% and a Sharpe ratio of -0.29. The strategy finished $82 ahead, 0.16 points of CAGR better. That is close to a tie, and it came from a single decision, the June 2022 exit, offset by a late re-entry.

The rule enters when yesterday's close is above the 200-day average and then exits only when the trailing stop is hit. The stop trails 15% below the position's high-water mark. IEF's own maximum drawdown was 22.23%, and its annualized volatility was 7.39%, so a 15% stop sits far outside a normal day or week for this fund. It triggered once in six years.

The template ranked 11th of 12 on IEF, ahead only of the monthly cycle at -2.69%. Across the 59 funds, IEF ranked 42nd for this strategy. The rules are on the trend plus trailing stop page and the fund is on the IEF page.

−2.1%CAGR
−2.3%buy & hold CAGR
−21.5%max drawdown
-0.32Sharpe ratio
1round trips
0%win rate
■ trend + trailing stop   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yeartrend + trailing stopbuy & hold
2021−0.2%−3.3%
2022−13.5%−14.8%
20230.0%3.5%
2024−0.6%−0.6%
20257.8%7.8%
2026−4.5%−4.5%

Almost the fund's path after the first year

The strategy returned -0.2% in 2021, -13.5% in 2022, 0% in 2023, -0.6% in 2024, 7.8% in 2025 and -4.5% so far in 2026. Buy-and-hold returned -3.3%, -14.8%, 3.5%, -0.6%, 7.8% and -4.5%. The yearly differences are 3.1, 1.3, -3.5, 0, 0 and 0 points. The strategy was ahead in 2021 and 2022, behind in 2023 and level from 2024 on.

The last three years are identical because the strategy has held one position since 2023-01-13 and the fund has been held since 2021-01-04. Once both are invested, they move together. The only differences in the table come from the period before 2023-01-13.

2021 is the strategy's best year relative to the fund. The rule waited in cash until 2021-11-08, so it missed most of the fund's 2021 loss. November returned 0.25% and December -0.48%, and the year came to -0.2% against the fund's -3.3%.

2022 is the year of the stop. The position from 2021-11-08 at an adjusted $99.11 lost 2.07% in January, 0.33% in February, 3.93% in March and 4.04% in April, gained 0.59% in May and lost 4.39% in June. It was sold on 2022-06-13 at $85.16, a loss of 14.07% over 217 days. The fund's worst day of the window, -1.77%, fell on that same date. After the exit the account sat in cash from July to December 2022, and the monthly returns for those six months are all 0. The fund lost 4.56% in September 2022 alone, so the exit saved money, and the year ended at -13.5% against -14.8%.

2023 reverses the picture. The fund returned 3.64% on its own price series and the strategy 0%, because the strategy stayed in cash until the re-entry on 2023-01-13. The re-entry price was $86.95, above the $85.16 exit price. The rule sold at the stop and bought back higher, which is the cost of exiting on a fall and re-entering on a 200-day signal. The open trade has returned 2.43% since.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.3%−0.5%
2022−2.1%−0.3%−3.9%−4.0%0.6%−4.4%0.0%0.0%0.0%0.0%0.0%0.0%
2023−0.0%−3.2%3.6%0.8%−1.4%−1.2%−0.6%−0.7%−3.1%−1.9%4.5%3.7%
20240.1%−2.0%0.7%−3.0%1.8%1.2%2.8%1.3%1.3%−3.3%1.0%−2.2%
20250.6%2.7%0.3%1.0%−1.2%1.5%−0.6%1.6%0.7%0.7%1.0%−0.8%
2026−0.2%2.4%−2.3%−0.1%−0.0%0.2%−1.4%0.1%−3.3%0.1%––

A month-by-month look at the held period

The best month was November 2023 at 4.48% and the worst was June 2022 at -4.39%. Buy-and-hold's best was the same month at 4.47% and its worst was September 2022 at -4.56%. The strategy was out of the fund for September 2022, which is why its worst month differs from the fund's.

Cash months show as 0. The first ten months of 2021 are zeros, and so are the six from July to December 2022. The strategy was therefore in the fund for 74.9% of sessions.

The run of monthly returns after the 2023 re-entry is mixed. February 2023 lost 3.23% and March gained 3.62%. September 2023 lost 3.07% and October 1.91%, taking the position to the fund's low on 2023-10-19, and then November gained 4.48% and December 3.67%. 2024 had a gain of 2.82% in July and losses of 3.27% in October and 2.19% in December. In 2025 February gained 2.73% and in 2026 February gained 2.43%, March lost 2.3% and September lost 3.29%.

The position went through the autumn 2023 fall without being stopped, so the fall from its high-water mark stayed within 15%. That is why the trailing stop shows no second closed trade. The strategy's own drawdown from 2021-12-03 to 2023-10-19 was 21.47%, a span that covers the 2022 stop-out loss and the 2023 autumn decline.

Every trade

trend + trailing stop on IEF made 1 closed round trip and one position still open at the end of the test, an average hold of 217 days, an average loser of −14.07%, a longest losing streak of 1. It held a position at the close on 74.9% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-11-08$99.112022-06-13$85.16−14.1%217
2023-01-13$86.95open–2.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.

One closed trade, one open

There are 2 rows in the trade list. The closed one ran from 2021-11-08 at $99.11 to 2022-06-13 at $85.16 for -14.07% over 217 days. The open one started on 2023-01-13 at $86.95 and was marked at +2.43% at the end of the test.

Win rate, average win, profit factor and streaks are defined by closed trades, so the table has one loss and no wins. The win rate is 0%, the profit factor 0, the longest loss streak 1, and the average loss -14.07%. With one closed trade there is no spread of returns to read.

The exit price of $85.16 is the stop fill. The loss of 14.07% from entry is a little smaller than 15%, because a trailing stop measures from the position's peak and the position had not risen far above its entry before it turned down. The stop worked as designed: it exited on a decline of about the size of the setting.

After 2023-01-13 the rule never sold. From that date to the end of the test the record is one position. Every number on this page after 2023 is therefore the fund's number, and the strategy only differs from buy-and-hold through the entry and exit dates of its first position.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-12-032023-10-19−21.5%685not yet–
2021-11-092021-11-23−1.9%142021-11-307
2021-11-052021-11-08−0.2%32021-11-091

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

The stop did not prevent a 21% drawdown

The deepest strategy drawdown was 21.47%, from a peak on 2021-12-03 to a low on 2023-10-19, 685 days later, and the position had not recovered by 2026-10-02. Buy-and-hold's was 21.77%, from the first day on 2021-01-04 to the same low on 2023-10-19, 1018 days later, also unrecovered. The two lows are the same date and the depths are 0.3 points apart.

The other two drawdowns on the strategy's list are small. One was 1.85%, from 2021-11-09 to 2021-11-23, recovered on 2021-11-30, and the other 0.23%, from 2021-11-05 to 2021-11-09, recovered the next day. Both are in the first weeks after the first entry.

A trailing stop is meant to limit drawdowns, and on IEF it did not, for two reasons. The stop exited at 14.07% below entry, which is a loss, not a protection of gains. After the exit the rule re-entered above the exit price, and the position then fell with the fund through October 2023 without reaching the stop. The drawdown that resulted is within 0.3 points of the fund's.

The Sharpe ratio is -0.32 for the strategy and -0.29 for the fund. Both are negative because neither earned a positive return over the window. The strategy's ratio is slightly lower despite its slightly higher CAGR, and the facts do not break out the strategy's volatility. The similar Sharpe ratios and the similar drawdowns point the same way: the strategy and the fund had nearly the same risk profile.

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)−2.1%−21.5%$8,838-0.32
5 basis points−2.1%−21.6%$8,824-0.33
10 basis points−2.2%−21.6%$8,811-0.33

Three fills

At 5 basis points of slippage per fill the CAGR is -2.15%, the end equity $8,824.47 and the Sharpe ratio -0.326. At 10 basis points the CAGR is -2.18%, the end equity $8,811.22 and the Sharpe ratio -0.329. The drawdown goes from 21.47% to 21.56% and then 21.65%.

The cost is negligible because there were 3 fills. A rule that traded every month would show a much larger effect. The strategy is more exposed to costs in the way it is built than in the way it ran: the stop and the 200-day entry could fire many times in a choppier market, and on IEF they fired once.

IEF traded an average of $675,908,601 a day and a median of 7,536 shares a minute. A $10,000 sleeve is small against that. The cost runs charge the same slippage on every fund, and the headline run charges none. Real spreads were not measured.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules−2.1%−21.5%10%$8,838
10% trailing stop−2.0%−17.6%20%$8,902
20% trailing stop−2.6%−20.4%10%$8,594
25% trailing stop−1.8%−19.8%0–$9,015

The stop width changed one trade

Three variants change the trailing stop. A 10% stop gave a CAGR of -2.01%, a drawdown of 17.63%, end equity of $8,901.60 and a Sharpe ratio of -0.329, with 2 trades and no wins. A 20% stop gave -2.6%, 20.44%, $8,593.90 and -0.357, with 1 trade and no wins. A 25% stop gave -1.79%, 19.8%, $9,015.10 and -0.228, with 0 closed trades.

The published 15% setting returned -2.13% with a 21.47% drawdown. The 10% stop had a shallower drawdown of 17.63% and a higher return, and it was stopped twice. The 20% stop was stopped once, later than the 15% stop, and lost more. The 25% stop never triggered, so it held the fund from its first entry to the end, and the closed-trade count is 0. Its result of -1.79% is the best of the four, and it is also a version of buy-and-hold that started after the 200-day entry condition was met.

The ordering across stops is not monotonic. A narrower stop did better than the published one, a wider one at 20% did worse, and the widest did best. Four results on one fund in one window cannot support a rule about the best stop width. The differences between -1.79% and -2.6% are less than a point of CAGR, and each rests on one or two trades.

What the four variants show together is that none made money, and none came close. Each lost less than 3 points a year, and each was within a point of the fund. The stop width changes the details of a path that is set by the fund's fall.

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

What IEF did in this window

IEF lost 12.95% over 1444 sessions, a CAGR of -2.39%, with annualized volatility of 7.39%. Its calendar returns were -3.35% in 2021, -15.16% in 2022, 3.64% in 2023, -0.63% in 2024, 8.03% in 2025 and -4.58% so far in 2026. The maximum drawdown was -22.23% from 2021-01-04 to 2023-10-19, with no recovery, and the longest drawdown covered 1443 sessions.

It rose on 48.51% of sessions, with average up and down days of 0.36% and -0.36% and an average intraday range of 0.42%. The best days were 2.26% on 2022-09-28, 2.24% on 2022-11-10, 1.83% on 2023-03-10, 1.51% on 2024-08-02 and 1.48% on 2023-11-14. The worst were -1.77% on 2022-06-13, -1.68% on 2022-09-26, -1.52% on 2022-03-02, -1.5% on 2022-09-22 and -1.45% on 2022-08-05. There were no falls of 10% or more from a 20-day high at any time.

The 200-day average matters most here, because it is the rule's entry test. IEF closed above its 200-day average on 53.01% of sessions and crossed it 60 times. A rule that flipped on every cross would have traded many times. This template uses the average only to enter, so it traded once. The 200-day regime filter, which exits on a cross below, lost 1.53% on this fund with an 11.5% drawdown.

Overnight returns made up 81.25% of the total and intraday returns 18.75%, with log returns of -11.05% and -2.55%. Beta to SPY was 0.04 with a correlation of 0.09, and beta to TLT 0.44 with a correlation of 0.91. The closest funds in the library were BND at 0.98, AGG and IEI at 0.97, UST at 0.94 and IGIB at 0.92. TBF was at -0.91.

RSI(14) fell below 30 on 64 sessions and rose above 70 on 34, and RSI(2) fell below 10 on 186. After RSI(14) readings under 30, the median 5-day return was -0.09% and the 20-day return -1%, against baselines of -0.04% and -0.02%. The 5-day return after RSI(2) readings under 10 was 0.05% and the 20-day return -0.21%. The calendar-month averages are -1.79% in September, -1.31% in October and 2.24% in November, each over 5 or 6 observations.

The rules

Enter when price is above the 200-day average; exit only when a 15% trailing stop is hit.

  1. WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
  2. WHILE invested · a managed trailing stop follows 15% below the position's high-water mark

A hybrid of the regime filter and the trailing stop. The 200-day average decides when to get in, and a 15% trail from the position's high-water mark decides when to get out. Winners can run well past the point where a crossover would have exited, and the position gives back 15% from every peak.

Good for: long trends with moderate pullbacks; the 15% trail is wide enough to survive normal corrections.
Watch out: every exit gives back 15% from the peak, and on choppy assets it re-enters above the 200-day repeatedly after each stop-out.

A stop built for equities, run on a bond fund

The rule has an entry test and an exit test that do not share a signal. Entry comes from the 200-day average and exit from the trailing stop. On a fund that trends for years, that pairing works: the stop lets the position run until a real reversal. On IEF the trend was a long decline interrupted by rallies, and the rule entered during one of the rallies in 2021, was stopped out of the decline in 2022, and entered again in 2023 near the point where the decline paused.

The comparison with the other templates on IEF puts this result in context. The RSI(2) snapback returned 1.84% with a 12.86% drawdown and the SMA 10/50 trend 1.33% with a 5.67% drawdown. The dip buyer and momentum breakout show 0%, because they did not trade. The golden cross lost 0.29%, the EMA 12/26 trend 0.39% and the RSI mean reversion 0.84%. The 3-month momentum lost 1.35%, the 200-day regime filter 1.53% and the weekly 7% target 1.54%. This template lost 2.13%, and only the monthly cycle was lower. Fast rules that left early did better than a rule that left only on a 15% fall.

Across bond funds the template had a median CAGR of -1.08%, and across all 59 funds 2.61%. SGOV returned 3.22% with a 0.02% drawdown, IEI 1.43% with 0 round trips, IGIB 0.06%, BND -1.08% and AGG -1.1%, each with 1 round trip. IEF's -2.13% sits below those peers. The longer-dated TLT returned -7.11% with a 38.76% drawdown over 3 round trips, so the stop had more to absorb there.

The limits are the usual ones. One fund, one window of 5.74 years in which bond prices fell for most of the period, daily-decision rules and no fees in the headline run. The strategy made one decision with consequences, and the page records how that decision turned out. It does not say how a 15% stop behaves over a longer sample of trades.

Run trend + trailing stop 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 trend + trailing stop beat buy-and-hold on IEF?

Over 2021-01-04 to 2026-10-02, trend + trailing stop on IEF returned −2.1% annualized vs −2.3% for buy-and-hold: it beat buy-and-hold by 0.2% per year, with a maximum drawdown 0.3 points shallower than holding (21.5% vs 21.8%).

How many trades did it make?

1 completed round trips over 5.7 years (3 fills), with 0% of round trips closing profitably.

Why 15% rather than 10%?

A wider trail survives routine corrections and gives back more at the end. Both numbers are one-field edits in DeployQuant, so you can backtest both and compare.

Does a trailing stop help on IEF?

It did not help much here. The trend plus trailing stop ended at $8,838 with a CAGR of -2.13%, against $8,756 and -2.29% for buy-and-hold. The stop was hit once, on 2022-06-13, and the drawdown of 21.47% was within 0.3 points of the fund's.

How many trades did trend plus trailing stop make on IEF?

One closed round trip, from 2021-11-08 to 2022-06-13 for -14.07%, and one open position bought on 2023-01-13 at $86.95 and marked at +2.43%. That is 3 fills in total.

Why did the strategy lose money on IEF?

IEF itself lost 12.95% over the window, a CAGR of -2.39%. The strategy held the fund for 74.9% of sessions, including most of the 2022 decline and the autumn 2023 low, so it took most of the loss.

Why did the strategy only trade once after 2022?

The rule exits only when a trailing stop 15% below the high-water mark is hit. After the 2023-01-13 entry the fund never fell that far from its high, so the position was never stopped.

Would a 25% trailing stop have been better?

In this window it returned -1.79%, the best of the tested stops, with a drawdown of 19.8%. It never triggered, so it was the fund held from its first entry. The 10% stop returned -2.01% and the 20% stop -2.6%, so the ordering is not a clear rule.

How much do trading costs matter here?

Almost nothing. With 3 fills, 5 basis points of slippage per fill moves the CAGR from -2.13% to -2.15% and 10 basis points to -2.18%.

Related

SMA-200 Trend + 15% Trailing Stop 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.