SMA-200 Trend + 15% Trailing Stop on IAU
iShares Gold Trust: physical gold exposure, a common crisis hedge. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
This template buys a fund when yesterday's close is above its 200-day average and then lets a 15% trailing stop decide the exit. The stop sits 15% below the highest price the position has reached. IAU, the iShares Gold Trust, holds physical gold and is the only commodity fund in the test. Gold climbed in a long run through 2024 and 2025, and a stop that is slow to trigger suits that kind of run.
From 2021-01-04 to 2026-10-02 the trend plus trailing stop rule made 13.09% a year on IAU. A $10,000 account became $20,263.74, a total return of 102.64%, with a maximum drawdown of 30.44% and a Sharpe ratio of 0.84. The record has 4 closed round trips and 1 win, and a fifth position open at the end of the data.
Buy-and-hold made 13.66% a year and ended at $20,857.05, so the rule finished $593.31 behind, with 0.57 points less CAGR. The drawdown was deeper than holding's, 30.44% against 26.16%, because the rule was exiting and re-entering at worse prices in 2026. The Sharpe ratio, 0.84 against 0.8, was slightly higher.
The rule was invested for 75% of sessions. On IAU it ranks 2nd of 12 strategies, and IAU ranks 8th of 59 funds for this template. The template's median CAGR across all 59 funds is 2.61%, so IAU was well above the typical fund. A single trade of 162% produced almost all of the result.
Year by year
| Year | trend + trailing stop | buy & hold |
|---|---|---|
| 2021 | 1.9% | −6.0% |
| 2022 | −1.8% | −0.6% |
| 2023 | 12.5% | 12.6% |
| 2024 | 26.3% | 26.3% |
| 2025 | 62.9% | 62.9% |
| 2026 | −12.6% | −3.9% |
Year by year
The rule returned 1.9% in 2021, -1.8% in 2022, 12.5% in 2023, 26.3% in 2024, 62.9% in 2025 and -12.6% so far in 2026. Buy-and-hold returned -6%, -0.6%, 12.6%, 26.3%, 62.9% and -3.9%.
In 2024 and 2025 the two columns match: 26.3% and 62.9% for both. The rule was holding the same position all year, so it took the same return. In 2023 it was 0.1 point behind at 12.5% against 12.6%, a gap that comes from investing 98% of the sleeve instead of all of it.
2021 is the one year the rule won. The fund fell 6% and the rule made 1.9%, a lead of 7.9 points. The rule stayed in cash until 2021-10-26, so it missed the fund's early-year slide, which left it ahead. 2022 was close, with the fund at -0.6% and the rule at -1.8%. The rule held a position from late 2021 into July 2022 and lost 1.97% on it.
2026 is where the rule fell behind. The fund lost 3.9% in the partial year and the rule lost 12.6%, a shortfall of 8.7 points. Gold peaked on 2026-01-29, fell 10.09% on 2026-01-30 and kept sliding into July. The rule held through January, stopped out on 2026-01-30, bought back in on 2026-02-02 above the 200-day average, and then stopped out twice more. Each re-entry cost a few percent, and the trade list shows the amounts.
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.6% | −0.7% | 3.2% |
| 2022 | −1.6% | 6.0% | 1.4% | −2.1% | −3.2% | −1.6% | −2.4% | 0.0% | 0.0% | 0.0% | 0.0% | 2.1% |
| 2023 | 5.6% | −5.2% | 7.7% | 0.9% | −1.3% | −2.2% | 2.3% | −1.3% | −4.7% | 7.2% | 2.5% | 1.3% |
| 2024 | −1.4% | 0.4% | 8.5% | 3.0% | 1.6% | −0.1% | 5.3% | 2.1% | 5.0% | 4.3% | −3.1% | −1.4% |
| 2025 | 6.7% | 1.9% | 9.3% | 5.4% | −0.1% | 0.4% | −0.6% | 4.9% | 11.6% | 3.6% | 5.3% | 2.2% |
| 2026 | 9.3% | 11.2% | −12.8% | −1.4% | −1.5% | −8.5% | 0.0% | −0.4% | −6.5% | −0.2% | – | – |
Month by month
The best month was September 2025 at 11.64%, and the worst was March 2026 at -12.76%. Buy-and-hold's best was January 2026 at 12.4% and its worst June 2026 at -11.59%.
The grid shows a long run of gains. From December 2022 to January 2026 the rule was invested through one position. Months in 2024 ran from -3.1% in November to 8.52% in March, and 2025 from -0.55% in July to 11.64% in September. Of the 12 months of 2025, 10 were positive. Only May 2025 at -0.05% and July 2025 at -0.55% were negative.
The 2026 months run the other way: January 9.25%, February 11.18%, then March -12.76%, April -1.44%, May -1.49%, June -8.54%, July 0%, August -0.43%, September -6.55% and 0.21% lost in early October. The first two months show how the rule was positioned for a continuation, and the rest show what a reversal does to a rule that keeps re-entering above the 200-day average.
Month 0% means no position. 2021 has nine zeros, and August to November 2022 has four more in a row, which is the stretch between the first trade's exit on 2022-07-06 and the second entry on 2022-12-02.
What happened inside the 1,155-day hold
The long trade is not a smooth line. Inside it the rule's monthly returns swung from 7.74% in March 2023 and 7.22% in October 2023 to -5.22% in February 2023 and -4.66% in September 2023. March 2024 added 8.52% and March 2025 added 9.26%. In 2024 and 2025 the only monthly loss beyond 3% was November 2024 at -3.1%, and the rule sat through the smaller dips without a stop firing.
The 15% stop did not fire in any of those dips because none of them reached 15% from a running high. The deepest dip inside the hold before 2026 was the 9.94% drawdown from 2025-10-20 to 2025-11-04, which included the -6.17% day on 2025-10-21. A 10% stop would have been close to that line, and the variant with a 10% stop made 9 trades and ended at $19,329.75, below the base rule. The narrower stop paid in churn for a protection that the main window did not need until 2026.
The 2022 months show the other regime. The first trade lost 1.61% in January 2022, made 5.98% in February and then lost 2.08%, 3.16%, 1.6% and 2.44% from April to July before the exit on 2022-07-06. Four losing months in a row inside a 253-day trade that returned -1.97% is the shape of a slow slide that a 15% trail does not catch early.
Every trade
trend + trailing stop on IAU made 4 closed round trips and one position still open at the end of the test, an average hold of 384 days, an average winner of 162.00%, an average loser of −5.51%, a profit factor of 4.19, a longest losing streak of 2. It held a position at the close on 75.0% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-10-26 | $34.13 | 2022-07-06 | $33.46 | −2.0% | 253 |
| 2022-12-02 | $33.87 | 2026-01-30 | $88.74 | 162.0% | 1155 |
| 2026-02-02 | $88.92 | 2026-03-19 | $85.69 | −3.6% | 45 |
| 2026-03-20 | $87.61 | 2026-06-10 | $78.05 | −10.9% | 82 |
| 2026-08-20 | $84.09 | open | – | −7.3% | – |
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 five trades
This record is short, and each trade matters.
The first, 2021-10-26 at an adjusted $34.13 to 2022-07-06 at $33.456, lost 1.97% over 253 days. The stop triggered late in a slow decline. The fund had been flat to slightly down through the period, and the rule gave up little.
The second made the account. It began on 2022-12-02 at $33.87 and ended on 2026-01-30 at $88.74, a gain of 162% over 1,155 days. A 15% trailing stop that never fired during three years of rising gold is the reason the rule matched holding in 2024 and 2025. The exit came the day gold fell 10.09%, the worst day in the fund's record, and the stop sat 15% under a high-water mark that had risen for years, so the position was sold well above where it started.
Then came three losses in a row. The third trade, 2026-02-02 at $88.92 to 2026-03-19 at $85.6885, lost 3.63% over 45 days. The fourth, 2026-03-20 at $87.61 to 2026-06-10 at $78.05, lost 10.91% over 82 days, the worst trade in the record. The fifth was bought on 2026-08-20 at $84.09 and stood at -7.3% at the end of the data.
The win rate was 25%, with 1 winner out of 4. The average win was 162% and the average loss was -5.51%, giving a profit factor of 4.19. The longest loss streak was 2, and median return was -1.97%. Median numbers on 4 trades describe a typical loser, and the account result comes from one outlier. A reader who looked only at the win rate would miss that.
The template's caveat names the pattern: after a stop-out, the rule re-enters above the 200-day average repeatedly. Price was still above the 200-day average right after each stop-out, so the rule bought back in twice, and each purchase met further decline. Holding for the same period lost 3.9%. The rule was whipsawed and lost 12.6%.
The three 2026 exits and what each re-entry paid
The second exit shows the cost of the sequence. The rule sold on 2026-03-19 at $85.69, a day on which the fund fell 4.15%, and bought again on 2026-03-20 at $87.61, a higher price. The next position then fell to $78.05 by 2026-06-10, the exit that produced the worst trade at -10.91%.
The third re-entry came on 2026-08-20 at $84.09, above the June exit, one day after the fund gained 3.82%. By the last session it stood at -7.3%. The monthly table shows July at 0% with no position, then -0.43% in August and -6.55% in September. The rule's sequence in 2026 is a sale at $88.74, a purchase at $88.92, a sale at $85.69, a purchase at $87.61, a sale at $78.05 and a purchase at $84.09. Each purchase was above the previous sale, so the churn cost the account at every turn, and the three completed 2026 trades add up to a loss in a year when holding lost less.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2026-01-29 | 2026-09-28 | −30.4% | 242 | not yet | – |
| 2022-03-08 | 2022-12-05 | −14.8% | 272 | 2024-03-04 | 455 |
| 2025-10-20 | 2025-11-04 | −9.9% | 15 | 2025-12-22 | 48 |
Buy-and-hold's deepest drawdown ran from 2026-01-29 to 2026-07-16 and reached −26.2%.
Drawdowns
The deepest drawdown was 30.44%. Equity peaked on 2026-01-29, hit its low on 2026-09-28 after 242 days and had not recovered. It is the account's current drawdown, and it includes the stopped-out exits and the open position's -7.3%. The second was 14.81%, from 2022-03-08 to 2022-12-05, recovering on 2024-03-04 after 455 days. The third was 9.94%, from 2025-10-20 to 2025-11-04 over 15 days, recovering on 2025-12-22.
Buy-and-hold's drawdowns were 26.16% (from 2026-01-29 to 2026-07-16, not recovered), 20.53% (from 2022-03-08 to 2022-09-26, recovered 2023-12-01) and 13.6% (from 2021-01-05 to 2021-03-08, recovered 2022-03-04). The fund's own maximum drawdown was 26.36%, with the longest stretch below a prior high lasting 436 sessions.
The rule's 2022 drawdown, 14.81%, was shallower than holding's 20.53%. Both peaked on 2022-03-08. The stop exited on 2022-07-06, and the rule sat out the rest of the fund's slide into September. The rule's 2026 drawdown was deeper than holding's, and the reason is the whipsaw. A 15% trail gave back a large part of the gain at the exit, and the re-entries added losses on top. This is the cost the template's description gives: the position gives back 15% from every peak.
The exit and the entry use different clocks. The entry waits for a close over a 200-day average, which changes slowly. The exit follows a high-water mark that moves up every day the position makes a new high. In a long advance the stop therefore trails the price closely from behind and almost never fires. In the 2026 reversal the same stop fired within a day of the peak, and the average was still below price, so the entry condition came true again within days. That mismatch between a slow entry and a fast exit is what created the three small losing trades.
For a reader comparing this rule with a plain hold, the useful figures are the 162% trade, which equals the fund's own advance for most of the period, and the three losses that followed. Holding avoided the losses by not trading. The rule avoided a few weeks of decline in 2022 by trading.
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) | 13.1% | −30.4% | $20,264 | 0.84 |
| 5 basis points | 13.0% | −30.6% | $20,198 | 0.83 |
| 10 basis points | 12.9% | −30.9% | $20,120 | 0.83 |
Cost runs
At 5 basis points the rule made 13.03% a year with a 30.63% drawdown, ending at $20,198.15 with a Sharpe ratio of 0.833. At 10 basis points it made 12.95% with a 30.86% drawdown and $20,119.84, with a Sharpe ratio of 0.827.
The cost effect is small. The rule has 9 fills in 5.74 years, and one long hold carries most of the capital gain, so a flat charge takes a thin slice. Liquidity is ample for a small account: IAU traded an average of $383,606,697 a day, with a median minute volume of 7,446 shares. The cost runs add a fixed charge and do not model the spread on days such as 2026-01-30, when the fund lost 10.09% in a session.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 13.1% | −30.4% | 4 | 25% | $20,264 |
| 10% trailing stop | 12.2% | −30.5% | 9 | 44% | $19,330 |
| 20% trailing stop | 13.8% | −26.1% | 2 | 50% | $21,029 |
| 25% trailing stop | 13.8% | −28.9% | 1 | 100% | $20,990 |
Trailing stop variants
Three variants change the width of the stop. A wider stop did better on this fund.
A 10% stop made 12.16% a year with a 30.47% drawdown, 9 trades and 4 wins, ending at $19,329.75. A 20% stop made 13.82% with a 26.07% drawdown, 2 trades and 1 win, ending at $21,028.84 with a Sharpe ratio of 0.853. A 25% stop made 13.79% with a 28.9% drawdown, 1 trade and 1 win, ending at $20,990.22 with a Sharpe ratio of 0.865.
The narrow stop was shaken out by ordinary dips and traded 9 times, giving the lowest result. The 20% and 25% stops each beat both buy-and-hold's 13.66% and the base rule's 13.09%. The 25% variant made a single trade, which is a buy-and-hold with a late entry. The 20% variant has 2 trades. These results show how the width of one stop can shift the outcome by about a point of CAGR on a fund with one long trend, and they describe this window only. A fund with choppier price action, or a different start date, would reorder them.
How IAU behaved
| Measure | IAU |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 110.3% |
| Annualized volatility | 18.3% |
| Deepest drawdown | −26.4% (2026-01-29 to 2026-07-16) |
| Up days | 53.3% |
| Average daily range | 0.98% |
| Average overnight gap | 0.61% |
| Correlation to SPY | 0.16 |
| Correlation to QQQ | 0.16 |
| Correlation to TLT | 0.21 |
| Sessions above the 200-day average | 78.0% |
| Crossings of the 200-day average | 44 |
| Falls of 10% or more from a 20-day high | 7 |
How IAU behaved
IAU returned 110.28% in total, 13.82% a year, with annualized volatility of 18.26%. Calendar returns were -6.12% in 2021, -0.57% in 2022, 12.83% in 2023, 26.84% in 2024, 63.89% in 2025 and -3.96% so far in 2026. Beta to SPY was 0.18 and correlation 0.16. Correlation to TLT was 0.21. The fund moved mostly on its own.
IAU was up on 53.29% of days, with up and down days both averaging 0.83%. Intraday range averaged 0.98% and the average overnight gap was 0.61%. The overnight log return was 81.29% and the intraday log return was -6.66%, so the entire gain, and more, came between the close and the open. A rule that buys at the open and holds through the night gets those gaps. Lag-1 autocorrelation was -0.02.
The fund spent 77.99% of sessions above its 200-day average and crossed it 44 times. That is a lot of crossings for a fund with a strong long trend, and it is why a rule that re-enters on every cross can be whipsawed. Month-of-year averages were highest in January at 4.39% and October at 3.02%, and lowest in June at -3.72%, each from 5 or 6 years.
The best days were 6.23% on 2026-02-03, 4.13% on 2026-08-05, 3.87% on 2026-01-28, 3.82% on 2026-08-19 and 3.81% on 2026-01-20. The worst were -10.09% on 2026-01-30, -6.17% on 2025-10-21, -4.42% on 2026-03-03, -4.36% on 2025-12-29 and -4.15% on 2026-03-19. Both lists are crowded into 2025 and 2026, which matches the rise in volatility toward the end of the data. The rule's 2025-10-20 drawdown of 9.94% lines up with the -6.17% day.
RSI(14) fell below 30 on 45 sessions, with median forward returns of 0.64% over 5 days and 2.8% over 20, against baselines of 0.31% and 1.01%. RSI(2) under 10 happened on 152 sessions, with 0.18% and 1.59%. A 10% drop inside 20 sessions happened 7 times, over 20 days. Gold dips were shallow and short, which is why the dip buyer lost 0.78% a year on IAU.
Weekdays and the stop width side by side
IAU's average return by weekday was 0.03% on Monday, 0.06% on Tuesday, 0.11% on Wednesday, 0.04% on Thursday and 0.05% on Friday, all small beside a 0.98% average daily range. The fund's weakest calendar month, June at -3.72%, matches the rule's June 2026 at -8.54% and the fund's own June 2026 at -11.59%.
The Sharpe ratios of the stop widths are close to one another: 0.807 for the 10% stop, 0.84 for 15%, 0.853 for 20% and 0.865 for 25%. Buy-and-hold scored 0.8. The ratio rises steadily as the stop widens, while the trade count falls from 9 to 4 to 2 to 1. On a fund with a strong trend and one large reversal, the width of the stop mostly decides how many times the rule is stopped out and re-enters. The 20% variant had the shallowest drawdown at 26.07%, just under the 26.16% of the buy-and-hold run, and the 25% variant, with one trade, had 28.9%.
The rules
Enter when price is above the 200-day average; exit only when a 15% trailing stop is hit.
- WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
- 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.
The rule against the other 11
The trend plus trailing stop ranks 2nd of 12 on IAU. The weekly 7% target led at 16.35% with a 27.66% drawdown. The 200-day regime filter made 12.98% with a 20.02% drawdown, and the EMA 12/26 trend 12.5% with 14.97%. The monthly cycle made 11.85%, the golden cross 10.79% and the SMA 10/50 trend 10.75%. The 3-month momentum made 8.51%, the momentum breakout 7.06%, the RSI mean reversion 4.99% and the RSI(2) snapback 4.74%.
The 200-day regime filter reached nearly the same CAGR, 12.98%, with a drawdown of 20.02% against 30.44%. The EMA 12/26 trend gave 12.5% with 14.97%. On a risk basis, both beat the trailing stop rule on this fund. The trailing stop version won on return by a small margin and lost on drawdown by a wide one, because its exit waits for a 15% fall. A crossover exits sooner and gives back less.
IAU is the only fund in the commodity category, so there are no category peers to compare. The category median CAGR in the facts is IAU's own 13.09%. Across all 59 funds the median for this template was 2.61%, and IAU's rank of 8th puts it in the top group.
The test covers one window of 5.74 years, daily-decision rules on minute bars, no margin and no fees in the headline run. The results are hypothetical, and 4 closed trades is too few to treat as a pattern.
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 IAU?
Over 2021-01-04 to 2026-10-02, trend + trailing stop on IAU returned 13.1% annualized vs 13.7% for buy-and-hold: it trailed buy-and-hold by 0.6% per year, with a maximum drawdown of 30.4% (buy-and-hold: 26.2%).
How many trades did it make?
4 completed round trips over 5.7 years (9 fills), with 25% 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.
How did the trend plus trailing stop perform on IAU?
It made 13.09% a year from 2021-01-04 to 2026-10-02 and turned $10,000 into $20,263.74. The maximum drawdown was 30.44% and the Sharpe ratio was 0.84. It closed 4 round trips and won 1.
Did it beat buy-and-hold on IAU?
Slightly behind. Holding made 13.66% a year and ended at $20,857.05. The rule matched holding in 2024 and 2025 and beat it only in 2021. Its drawdown was 30.44% against 26.16%.
Why is the win rate only 25% when the CAGR is 13%?
One trade, from 2022-12-02 to 2026-01-30, gained 162% over 1,155 days. The other three closed trades lost 1.97%, 3.63% and 10.91%. A trend rule with a wide stop takes small losses and holds winners.
What went wrong in 2026?
Gold fell 10.09% on 2026-01-30 and kept sliding into July. The stop exited that day, and the rule re-entered above the 200-day average on 2026-02-02 and 2026-03-20, losing 3.63% and 10.91%. A fifth position bought on 2026-08-20 was down 7.3% at the end.
Is a 15% trailing stop the right width for IAU?
In this window, wider stops did a little better. A 20% stop made 13.82% a year and a 25% stop made 13.79%, while a 10% stop made 12.16%. The 25% variant made only 1 trade, so the comparison is thin.
How much do costs matter?
Little. At 5 basis points the rule made 13.03% a year and at 10 basis points 12.95%. There were 9 fills, and IAU traded an average of $383,606,697 a day.
Does this rule beat the other strategies on IAU?
It ranks 2nd of 12 on CAGR, behind the weekly 7% target at 16.35%. The 200-day regime filter and EMA 12/26 trend had shallower drawdowns, at 20.02% and 14.97%.
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.