Learn › Strategies › EMA 12/26 Trend › SGOV

EMA 12/26 Trend on SGOV

iShares 0-3 Month Treasury Bond ETF: T-bills, often used as the cash leg of rotation strategies. 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 SGOV turned $10,000 into $11,991 (19.9% total, 3.2% CAGR): it trailed buy-and-hold by 0.0% per year, with a maximum drawdown of 0.1% (buy-and-hold: 0.0%).

The EMA 12/26 trend rule holds a fund while the 12-day exponential moving average sits above the 26-day average, and sells everything when it drops below. SGOV, the iShares 0-3 Month Treasury Bond ETF, is a fund of Treasury bills, and the test data calls it the cash leg of rotation strategies. Putting a trend rule on it is an unusual pairing, because there is almost no trend to measure: the fund's annualized volatility over the test was 0.24%.

The result from 2021-01-04 to 2026-10-02 was $10,000 grown to $11,991.11, a total return of 19.91% and a CAGR of 3.21%. Buy-and-hold on the same fund finished at $11,995.79 with a CAGR of 3.22%. The rule trailed by $4.68 in ending value. Its maximum drawdown was 0.05% and the buy-and-hold figure was 0.02%. The rule made 17 round trips, 8 of them winners, for a win rate of 47%, and it was invested on 95% of days.

The page is a measurement of what a moving-average switch does when the price series is almost flat. The short answer is that it did nothing useful and almost nothing harmful. The longer answer is in the trade list, the cost runs and the parameter variants, where a tiny fund move meets a rule that reacts to small changes.

3.2%CAGR
3.2%buy & hold CAGR
−0.1%max drawdown
13.86Sharpe ratio
17round trips
47%win rate
■ EMA 12/26 trend   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

YearEMA 12/26 trendbuy & hold
20210.0%0.0%
20221.5%1.5%
20235.0%5.0%
20245.2%5.2%
20254.1%4.1%
20262.7%2.7%

Every year matched buy-and-hold

The yearly returns for the rule and for buy-and-hold are the same in each of the six years: 0.0% in 2021, 1.5% in 2022, 5.0% in 2023, 5.2% in 2024, 4.1% in 2025 and 2.7% in 2026, a partial year. The rule never beat buy-and-hold in a year, and it never trailed in a year at the precision shown. The gap is hidden at one decimal place, and it is $4.68 in final equity over the whole window.

The profile of the fund itself explains the pattern. SGOV's calendar-year returns were 0.05% in 2021, 1.57% in 2022, 5.12% in 2023, 5.29% in 2024, 4.23% in 2025 and 2.76% in 2026. The 2021 figure is close to zero and the later years climb to about 5%. The rule's own yearly figures are slightly below those, because it held cash in the sleeve for 5% of days and because the buy rule puts 98% of the account into the fund, not the whole account.

The year-by-year comparison shows why a trend filter has little to add here. A filter earns its keep by stepping aside before a large decline and returning after it. SGOV's worst calendar year was a gain, and the fund had no sessions in which it fell 10% from a 20-day high. In this data set the filter had no decline to avoid.

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.0%−0.0%
20220.0%0.0%0.0%0.0%0.1%0.1%0.1%0.2%0.2%0.2%0.3%0.4%
20230.3%0.3%0.4%0.3%0.4%0.5%0.4%0.5%0.4%0.4%0.5%0.4%
20240.4%0.4%0.4%0.4%0.5%0.4%0.4%0.5%0.4%0.4%0.4%0.4%
20250.3%0.3%0.3%0.3%0.3%0.3%0.3%0.4%0.3%0.3%0.3%0.3%
20260.3%0.3%0.3%0.3%0.3%0.3%0.3%0.3%0.3%0.1%––

A rising monthly return, then a plateau

The month-by-month table shows how a Treasury bill fund's return follows the level of short-term interest income. In 2021 the monthly figures were between -0.02% and 0.01%, effectively zero, with the worst month of the whole run in 2021-08 at -0.02%. In 2022 they rose from 0.0% in January to 0.01% in February, 0.02% in April, 0.06% in May, 0.07% in June and July, 0.2% in August, 0.22% in September, 0.2% in October, 0.3% in November and 0.36% in December.

From 2023 the monthly figures held in a band. January 2023 was 0.32%, and the best month of the run was 2023-08 at 0.49%. Through 2024 the months ran between 0.39% and 0.47%. In 2025 they were between 0.3% and 0.37%, and in 2026 between 0.28% and 0.33%, with a partial October 2026 at 0.06%.

The monthly returns lead to a simple picture of the fund. Over 2023 to 2026 it paid a steady few tenths of a percent each month, with no month below 0.28%, and the rule collected the same amounts as buy-and-hold. The fund's own month-of-year averages are in the same range, from 0.24% in February to 0.31% in August and December. A month-of-year pattern in a fund like this reflects the calendar position of the rate rise, since the window began with near-zero rates and ended with higher ones, and it carries no seasonal signal.

The same table is the clearest evidence that the rule's trades did not matter after early 2022. The sleeve was in the fund for the entire period from 2022-02-17, and the monthly figures track the fund.

Every trade

EMA 12/26 trend on SGOV made 17 closed round trips and one position still open at the end of the test, an average hold of 18 days, an average winner of 0.01%, an average loser of 0.00%, a profit factor of 0.75, a longest losing streak of 8. It held a position at the close on 95.0% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-02-10$83.382021-05-10$83.390.0%89
2021-05-11$83.392021-05-14$83.390.0%3
2021-05-17$83.382021-05-18$83.380.0%1
2021-05-19$83.392021-05-20$83.390.0%1
2021-05-26$83.392021-05-27$83.38−0.0%1
2021-06-01$83.392021-08-12$83.38−0.0%72
2021-08-17$83.392021-08-18$83.390.0%1
2021-08-23$83.392021-08-25$83.390.0%2
2021-09-01$83.402021-09-28$83.39−0.0%27
2021-09-30$83.392021-10-01$83.400.0%1
2021-10-11$83.402021-10-13$83.39−0.0%2
2021-10-14$83.382021-10-15$83.390.0%1
2021-10-25$83.402021-10-26$83.400.0%1
2021-11-03$83.392021-12-06$83.390.0%33
2021-12-07$83.412021-12-09$83.410.0%2
2021-12-10$83.412022-01-25$83.410.0%46
2022-01-27$83.412022-02-16$83.410.0%20
2022-02-17$83.41open–20.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.

Seventeen round trips, almost all in 2021

The rule made 18 trades counting the position still open at the end of the test, and 17 of them closed. The first entry was 2021-02-10 at an adjusted price of $83.38, and the first exit was 2021-05-10 at $83.39, a hold of 89 days that returned 0.01%. That was the best trade of the run, tied with two others at 0.01%. The worst trades were -0.01%, including a 27-day hold from 2021-09-01 at $83.40 to 2021-09-28 at $83.39, a 2-day hold from 2021-10-11 to 2021-10-13, and a 72-day hold from 2021-06-01 to 2021-08-12.

Fifteen of the round trips closed in 2021, and 3 of those were winners. Two more closed in 2022, with no winners. The median hold was 2 days, the longest was 89 days, and the shortest was 1 day. Average hold was 17.8 days. The average winner was 0.01% and the average loser was 0.00%, and the profit factor was 0.75. The longest losing streak was 8 trades, and the longest winning streak was 1.

The reason for the churn is the price series. Over most of 2021 the adjusted price of SGOV sat at $83.38 to $83.41, so the 12-day and 26-day averages differed by fractions of a cent and crossed back and forth. Entries on 2021-05-11, 2021-05-17 and 2021-05-19 came within days of each other, and each lasted from 1 to 3 days. A crossover rule reads a one-cent wiggle as a signal, and the trade list is a record of that.

The last trade tells the other half. The entry on 2022-02-17 at $83.41 never exited. It was marked at the final close of the test at a return of 20.41%. Once the adjusted price began rising steadily, the 12-day average stayed above the 26-day for the rest of the window, so the rule held through it. That single position produced nearly all of the rule's return, and the 17 closed trades together produced close to nothing. The rule's 3.21% CAGR is what buy-and-hold earned after the position went on.

The rule had a position at the close on 95% of days. The 5% in cash is almost all in 2021 and early 2022, between the early round trips, when the fund was flat and the rule was switching.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-08-042021-10-25−0.1%822022-03-30156
2021-07-302021-08-02−0.0%32021-08-042
2021-03-022021-03-03−0.0%12021-03-041

Buy-and-hold's deepest drawdown ran from 2021-03-02 to 2021-03-03 and reached −0.0%.

A drawdown measured in hundredths of a percent

The deepest drawdown of the rule was 0.05%, from a peak on 2021-08-04 to a low on 2021-10-25, 82 days later. It took 156 days to recover, on 2022-03-30. The next two were 0.02% each: a 3-day fall from 2021-07-30 that recovered by 2021-08-04, and a 1-day fall on 2021-03-02 that recovered on 2021-03-04. Buy-and-hold's deepest drawdown was 0.02%, from 2021-03-02 to 2021-03-03.

The numbers are small, and the time to recover is the notable item. A 0.05% decline took 156 days to recover while buy-and-hold's own three drawdowns lasted from 1 to 8 days to the trough and from 1 to 4 days to recover. The rule's drawdown began in August 2021 and ended in March 2022, a stretch in which the trade list shows round trips that each gained or lost a cent or less.

The fund's own deepest drawdown was 0.02%, from 2021-03-01 to 2021-03-03, with recovery on 2021-03-04, and its longest drawdown lasted 11 sessions. The worst day was -0.02%, and it occurred five times on the list, including 2021-03-03, 2021-10-12 and 2021-08-02. The best day was 0.08%, on 2023-04-05.

The Sharpe ratio is 13.86 for the rule and 13.84 for buy-and-hold. These values are large because volatility is close to zero, and they carry no information about quality here. A Sharpe ratio that high on a Treasury bill fund indicates that the return is steady, and the measurement stops there.

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)3.2%−0.1%$11,99113.86
5 basis points2.9%−1.7%$11,78810.63
10 basis points2.6%−3.4%$11,5877.36

Slippage matters more than anything else on this page

The headline run fills at the bar price. The cost runs add slippage on every fill. With 5 basis points per fill the CAGR was 2.91%, the maximum drawdown was 1.72%, the final value was $11,787.65 and the Sharpe ratio was 10.63. With 10 basis points the CAGR was 2.6%, the maximum drawdown was 3.38%, the final value was $11,586.85 and the Sharpe ratio was 7.36.

The headline run had 35 fills. Each fill pays the slippage, and a fund whose average daily range is 0.01% and whose average up day is 0.02% offers no room to absorb it. A cost of 5 basis points on a fill is large against a typical day for this fund. That is why the maximum drawdown moves from 0.05% to 1.72% to 3.38% as the cost rises, and why the CAGR falls below the fund's own return.

The cost runs show a limit of the test. The headline figure has no fees or slippage, and on this fund the rule trades often enough in the early period to pick up a measurable cost. A rule that trades once, or never, would not show that effect. The buy-and-hold CAGR of 3.22% and the 5-basis-point run at 2.91% give the scale.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules3.2%−0.1%1747%$11,991
EMA 8/213.2%−0.1%2752%$11,997
EMA 20/503.2%−0.0%450%$11,995
EMA 12/503.2%−0.1%863%$11,993

Wider averages, fewer trades, the same result

Three alternative parameter sets were run. EMA 8/21 made 27 trades with 14 wins, a CAGR of 3.22%, a maximum drawdown of 0.05%, a Sharpe ratio of 13.9 and a final value of $11,996.96. EMA 20/50 made 4 trades with 2 wins, a CAGR of 3.22%, a maximum drawdown of 0.04% and a final value of $11,994.62. EMA 12/50, which keeps the fast average and lengthens only the slow one, made 8 trades with 5 wins, a CAGR of 3.22%, a drawdown of 0.05% and a final value of $11,993.45.

All three finished within a few dollars of buy-and-hold at $11,995.79, and the published rules at $11,991.11 were the lowest of the four. The faster pair, EMA 8/21, made the most trades, 27, and had the highest final value. The slower pair, EMA 20/50, made 4 trades and kept the position for almost the entire window. The number of trades changed from 4 to 27 and the final values stayed within a few dollars of each other.

That insensitivity is useful information about the test, and says little about the rule. On a fund with almost no price movement, the parameters change when the sleeve is in or out, and since the fund rises steadily after early 2022 all four versions spent almost all of that period invested. The version with the fewest trades is the one that would suffer least from the slippage runs above.

How SGOV behaved

MeasureSGOV
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold20.5%
Annualized volatility0.2%
Deepest drawdown−0.0% (2021-03-01 to 2021-03-03)
Up days69.0%
Average daily range0.01%
Average overnight gap0.01%
Correlation to SPY-0.01
Correlation to QQQ-0.01
Correlation to TLT0.01
Sessions above the 200-day average99.5%
Crossings of the 200-day average10
Falls of 10% or more from a 20-day high0

How SGOV behaved

SGOV's data in this test runs from 2021-01-04 to 2026-10-02, 1444 sessions. Buy-and-hold returned 20.47% in total, a CAGR of 3.3%, with an annualized volatility of 0.24%. Up days were 68.95% of sessions, the average up day was 0.02% and the average down day was -0.01%. The average daily range was 0.01% and the average overnight gap was 0.01%. Of the fund's total return, 95.25% came overnight and 4.75% during the session.

The correlations are close to zero: -0.01 to SPY, -0.01 to QQQ and 0.01 to TLT, with betas of 0 to all three. The funds most correlated to it were IEI at 0.06, UDN at 0.05 and AGG, FXE and IGIB around 0.04. The least correlated were KMLM at -0.03, FAS and XLF at -0.03, and TECL and RINF at -0.02. These are all tiny numbers. The fund moves independently of equity and bond funds in the data, and carries almost no price risk of its own.

The indicator data shows why rules built on price signals have little to work with. Price was above its 200-day average on 99.52% of sessions, with 10 crossings. RSI(14) fell below 30 on 0 sessions and was above 70 on 1085. RSI(2) fell below 10 on 17 sessions, and the median 5-day return after those was 0.01%, against a baseline of 0.07%. Over 20 days the median was 0.01% against 0.32%. No session had a fall of 10% from a 20-day high.

The result is a fund where a price-based rule has no stable meaning. The average-crossing signal is created by cent-sized moves in the adjusted price, and the fund's real behavior is a slow accrual of yield. The same rank table in the data shows how each rule did on SGOV. Golden cross, 200-day regime filter and trend plus trailing stop each had a CAGR of 3.22% with a drawdown of 0.02%. The SMA 10/50 trend matched this page's 3.21% and 0.05%. The weekly 7% target had 3.2%, and the monthly cycle 2.98% with a drawdown of 0.06%.

The RSI(2) snapback had 0.02%, and RSI mean reversion, the dip buyer, momentum breakout and 3-month momentum each had 0%. Those four need an oversold reading, a 10% decline, or a large run-up, and the fund produced none of them. This rule ranked fifth of the 12 on SGOV, and SGOV ranked 27th of 59 funds for this rule.

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.

Where the rule stands against other bond funds

Across all 59 ETFs the median CAGR of the EMA 12/26 rule was 2.76%. Among the 7 bond funds it was 1.02%. SGOV's 3.21% was the best in its category. IGIB had 2.35% with a maximum drawdown of 5.33% and 20 round trips. AGG had 1.07% with 4.88% and 22, and BND had 1.02% with 4.96% and 22. IEI had 0.87% with 4.24% and 20. IEF had -0.39% with 10.63% and 26, and TLT had -0.67% with 15.92% and 21.

The category runs roughly in order of how much the funds' prices move. The longer-dated funds had the deeper drawdowns and the lower CAGRs. SGOV, with the shortest maturity, had a drawdown of 0.05%. TLT, the long-dated fund, had 15.92%. The rule's drawdown on the longer funds shows what the filter was built to face: a real decline in price. On those funds the rule had something to react to, and its record is mixed. On SGOV it had nothing to react to and it ended level with buy-and-hold.

The description of the rule warns that faster reaction means more trades and more whipsaws than a 50/200 cross. SGOV is the extreme example. The rule's 17 round trips in under six years include 15 in 2021, a year in which the fund returned 0.05%. The trade count is a feature of the rule's speed and of the flat price series, and it did not add return.

The test stops where all of these do. It covers one window of about 5.7 years that started with near-zero short-term returns and ended with higher ones, uses daily-decision rules on minute bars, and has no fees in the headline run. The results are hypothetical. They say what the rule did on a fund that barely moves, and they offer no basis for expecting the same on any other fund or period.

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

Over 2021-01-04 to 2026-10-02, EMA 12/26 trend on SGOV returned 3.2% annualized vs 3.2% for buy-and-hold: it trailed buy-and-hold by 0.0% per year, with a maximum drawdown of 0.1% (buy-and-hold: 0.0%).

How many trades did it make?

17 completed round trips over 5.7 years (35 fills), with 47% 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 rule beat buy-and-hold on SGOV?

No. The rule returned a CAGR of 3.21% and ended at $11,991.11, against 3.22% and $11,995.79 for buy-and-hold. The yearly returns matched in all six years. The gap is $4.68 in final equity.

How many trades did the rule make on SGOV?

It made 17 closed round trips and held one position open at the end of the test, with 35 fills. Fifteen of the closed trades were in 2021, and 8 of the 17 were winners. The median hold was 2 days and the longest was 89.

Why did the rule trade so much on a Treasury bill fund?

In 2021 the adjusted price of SGOV stayed between $83.38 and $83.41, so the 12-day and 26-day averages differed by fractions of a cent and crossed repeatedly. After the entry on 2022-02-17 the rule never exited.

What do trading costs do to this strategy on SGOV?

At 5 basis points of slippage per fill the CAGR fell to 2.91% and the final value to $11,787.65. At 10 basis points it fell to 2.6% and $11,586.85. The fund's average daily range is 0.01%, so the slippage is large against its normal moves.

Would a different EMA pair change the result on SGOV?

Not materially. EMA 8/21, 20/50 and 12/50 each had a CAGR of 3.22%, with final values from $11,993.45 to $11,996.96. The number of trades varied from 4 to 27.

How does the rule compare on other bond funds?

SGOV's CAGR of 3.21% was the highest of the 7 bond funds. IGIB had 2.35%, AGG 1.07%, BND 1.02%, IEI 0.87%, IEF -0.39% and TLT -0.67%. The rule's median across all 59 ETFs was 2.76%.

Related

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