EMA 12/26 Trend on VV
Vanguard Large-Cap ETF: broad US large-cap exposure beyond just the S&P 500. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
EMA 12/26 trend holds VV while the 12-day exponential average sits above the 26-day, and holds cash otherwise. Between 2021-01-04 and 2026-10-02 it turned $10,000 into $17,138, a 9.84% CAGR. Buying VV on the first day and holding it turned the same $10,000 into $21,500, a 14.26% CAGR. The rule trailed the fund by 4.42% a year and finished $4,361 behind in dollars.
The price of that gap was a shallower fall. The rule's maximum drawdown was 13.43%, and holding the fund went through 25.21%. The Sharpe ratio was 0.94 for the rule and 0.92 for buy-and-hold, so per unit of volatility the two were close. The rule made 20 closed round trips and held a position at the close on 70.3% of trading days.
Among the 12 templates tested on VV, this one ranked fourth by CAGR. The weekly 7% target returned 14.94%, the RSI(2) snapback returned 12.55% and the monthly cycle returned 12.44%. Across all 59 funds, VV ranked 14th for this rule, and the median CAGR of the rule over those funds was 2.76%. VV is a good fund for it by that measure, though the rule still did not beat the fund it traded.
The test is one window of 5.74 years on daily decisions, so the numbers describe what the rule did in this stretch. They do not forecast anything.
Year by year
| Year | EMA 12/26 trend | buy & hold |
|---|---|---|
| 2021 | 10.6% | 28.3% |
| 2022 | −8.9% | −19.4% |
| 2023 | 16.0% | 26.8% |
| 2024 | 16.9% | 24.7% |
| 2025 | 19.7% | 17.8% |
| 2026 | 4.7% | 13.5% |
How each year compared with holding VV
The rule beat buy-and-hold in two of the six calendar years, 2022 and 2025. In the other four it lagged.
2021 was the clearest lag. The rule returned 10.6% while the fund returned 28.3%. The rule's first entry came on 2021-02-10, and that trade closed at a loss of 2.74% on 2021-03-08. The rule then bought again on 2021-03-11 and held until 2021-09-21 for a gain of 12.3%. That single trade accounts for most of the year. The rule's January 2021 return was 0.0%, so it started the window in cash, and the gap for the year was 17.7 points.
2022 was the year the rule was built for. VV lost 19.4% in buy-and-hold terms, and the rule lost 8.9%. It made four round trips that year and lost on all four, each by a small amount: 1.4%, 2.1%, 1.6% and 1.9%. Four small losses cost far less than the fund's fall, and the rule spent long stretches in cash. The 2022 gap in its favour was 10.5 points.
2023 went back to the fund. VV returned 26.8% and the rule returned 16.0%. The rule re-entered on 2023-01-13 and exited on 2023-03-01 for a gain of 0.8%, re-entered on 2023-03-31 and held to 2023-08-17 for 9.7%, took a 3.5% loss from 2023-09-01 to 2023-09-21, and then entered on 2023-11-09 for the 16.4% trade that ran into April 2024.
2024 returned 16.9% for the rule and 24.7% for the fund. The rule held that large trade from the start of the year until 2024-04-17, then made two more trades, 4.2% and 6.4%.
2025 is the second year the rule won, 19.7% against 17.8%. The fund fell in the early spring, with its worst two days on 2025-04-03 and 2025-04-04, and the rule was in cash after its exit on 2025-02-27. It re-entered on 2025-05-05 at $254.93 and held until 2025-11-20 at $307.51, a gain of 20.6%, the best trade of the whole test.
2026 is a partial year. The rule returned 4.7% and the fund 13.5%. The rule made four round trips in 2026 and won three. The last trade is still open: bought on 2026-09-22 at $357.21 and marked at a loss of 0.65% on the last close.
The pattern across the years is plain. The rule gave up return in rising years, where it lagged by 17.7, 10.8, 7.8 and 8.8 points, and made it back in the one year that fell. Over six years, that was not enough to close the gap.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | −3.3% | 1.7% | 5.2% | 0.5% | 2.6% | 2.3% | 2.9% | −2.9% | 2.1% | −1.0% | 0.4% |
| 2022 | −3.8% | 0.0% | 1.1% | −3.1% | 0.0% | 0.0% | 3.1% | −3.9% | −0.7% | −0.2% | 5.3% | −6.5% |
| 2023 | 3.4% | −2.3% | 0.9% | 1.4% | 0.8% | 6.4% | 3.3% | −3.7% | −3.4% | 0.0% | 4.2% | 4.5% |
| 2024 | 1.6% | 5.1% | 3.0% | −3.3% | 2.1% | 3.6% | 1.1% | −2.0% | 2.0% | −0.7% | 5.9% | −2.4% |
| 2025 | 0.0% | −1.0% | 0.0% | 0.0% | 4.8% | 5.1% | 2.4% | 1.9% | 3.6% | 2.4% | −1.4% | 0.6% |
| 2026 | 1.1% | −3.5% | 0.0% | 4.3% | 5.3% | −1.0% | −1.1% | 0.8% | −1.9% | 0.9% | – | – |
The months
The best month was June 2023 at 6.38%. The worst was December 2022 at -6.55%. The rule had entered on 2022-10-31 at $167.56 and exited on 2022-12-20 at $164.46, a loss of 1.9% on the trade, and December 2022 is the month that closed it out.
The table has many months of 0.0%, which are months fully in cash: January 2021, February 2022, May and June 2022, January, March and April 2025, and March 2026. In those months EMA(12) stayed below EMA(26) the whole time. A run of zeros is the visible form of the rule's exposure of 70.3%. The rule was in the market on most days and out on the rest.
The buy-and-hold fund's best month was April 2026 at 10.43%, and its worst was September 2022 at -9.02%. In April 2026 the rule returned 4.3%, because it entered on 2026-04-14 at $314.52, well into the month, and missed the first half of the rise. This delay shows up across the monthly table. A crossover rule confirms a trend after the move has started, so it tends to miss the first days of a rally and to hold through the first days of a decline.
In November the rule had 5.3% in 2022, 4.2% in 2023 and 5.9% in 2024, which fits the fund's own calendar: VV's average November return over the window was 4.0%. The fund's average September return was -2.16%. The rule lost 2.9% in September 2021, 0.7% in September 2022 and 3.4% in September 2023, then made 2.0% in 2024 and 3.6% in 2025. These are small samples, five or six of each month, and the averages should not be read as a seasonal rule.
Every trade
EMA 12/26 trend on VV made 20 closed round trips and one position still open at the end of the test, an average hold of 73 days, an average winner of 7.23%, an average loser of −2.08%, a profit factor of 4.46, a longest losing streak of 5. It held a position at the close on 70.3% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-02-10 | $171.19 | 2021-03-08 | $166.50 | −2.7% | 26 |
| 2021-03-11 | $170.13 | 2021-09-21 | $191.12 | 12.3% | 194 |
| 2021-10-19 | $196.65 | 2021-12-06 | $198.17 | 0.8% | 48 |
| 2021-12-09 | $203.65 | 2021-12-21 | $199.87 | −1.9% | 12 |
| 2021-12-22 | $201.54 | 2022-01-18 | $198.72 | −1.4% | 27 |
| 2022-03-23 | $193.54 | 2022-04-19 | $189.48 | −2.1% | 27 |
| 2022-07-22 | $172.30 | 2022-09-01 | $169.53 | −1.6% | 41 |
| 2022-10-31 | $167.56 | 2022-12-20 | $164.46 | −1.9% | 50 |
| 2023-01-13 | $170.54 | 2023-03-01 | $171.99 | 0.8% | 47 |
| 2023-03-31 | $176.64 | 2023-08-17 | $193.70 | 9.7% | 139 |
| 2023-09-01 | $199.17 | 2023-09-21 | $192.14 | −3.5% | 20 |
| 2023-11-09 | $193.54 | 2024-04-17 | $225.24 | 16.4% | 160 |
| 2024-05-08 | $229.54 | 2024-08-02 | $239.06 | 4.2% | 86 |
| 2024-08-20 | $249.86 | 2025-01-02 | $265.85 | 6.4% | 135 |
| 2025-01-22 | $273.83 | 2025-02-27 | $269.53 | −1.6% | 36 |
| 2025-05-05 | $254.93 | 2025-11-20 | $307.51 | 20.6% | 199 |
| 2025-12-01 | $310.35 | 2026-02-06 | $310.80 | 0.1% | 67 |
| 2026-02-10 | $316.97 | 2026-02-13 | $310.41 | −2.1% | 3 |
| 2026-04-14 | $314.52 | 2026-07-28 | $339.19 | 7.8% | 105 |
| 2026-08-04 | $349.62 | 2026-09-17 | $350.94 | 0.4% | 44 |
| 2026-09-22 | $357.21 | open | – | −0.7% | – |
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.
What the 21 trades looked like
The rule made 20 closed trades and held one at the end. Eleven of the 20 closed with a gain and nine with a loss, a win rate of 55%. The average winner returned 7.23% and the average loser returned -2.08%, which gives a profit factor of 4.46. The median trade returned 0.38%, well below the mean, because a few large winners pulled the average up and many small trades sat close to zero.
The best five trades carried the result. The 20.6% trade from 2025-05-05 to 2025-11-20 held for 199 days, the longest of the test. The 16.4% trade from 2023-11-09 to 2024-04-17 held for 160 days. The 12.3% trade of 2021 held for 194 days, and the 9.7% trade of 2023 held for 139 days. The 7.8% trade from 2026-04-14 to 2026-07-28 held for 105 days. All five of the largest gains were held for months, and the median hold was 48 days against an average of 73. The shortest hold was 3 days, the entry on 2026-02-10 that exited on 2026-02-13 for -2.1%.
The worst trade lost 3.53%, the entry on 2023-09-01 at $199.17 that closed on 2023-09-21 at $192.14. A worst trade of 3.53% shows how the rule limits losses. The exit comes when the 12-day average crosses under the 26-day, which happens quickly after a turn, so the loss is usually a few percent. The longest losing streak was 5 trades, and all of them fall between the entry of 2021-12-09 and the exit of 2022-12-20. The longest winning streak was 3.
The trade list also shows a cluster of near-zero results: 0.8% on 2021-10-19, 0.8% on 2023-01-13, 0.1% on 2025-12-01 and 0.4% on 2026-08-04. These are trades where the crossover signalled in and out within a narrow price range. The rule paid a round trip for no gain, and that is the whipsaw the strategy's own caveat warns about.
By exit year, 2021 had 4 round trips with 2 wins, 2022 had 4 with none, 2023 had 3 with 2, 2024 had 2 with 2, 2025 had 3 with 2, and 2026 had 4 with 3. The rule's win rate was lowest in the one falling year and rose in the years that trended up. The EMA 12/26 trend page for all 59 funds puts these counts beside the other funds.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-11-16 | 2022-11-03 | −13.4% | 352 | 2023-07-18 | 257 |
| 2024-07-16 | 2024-09-06 | −8.3% | 52 | 2024-11-06 | 61 |
| 2023-07-31 | 2023-11-09 | −7.9% | 101 | 2023-12-14 | 35 |
Buy-and-hold's deepest drawdown ran from 2021-12-27 to 2022-10-12 and reached −25.2%.
The drawdowns
The largest drawdown ran from 2021-11-16 to a low on 2022-11-03, a depth of 13.43%. It took 352 days to reach the low and 257 more to recover, on 2023-07-18. That is the full cost of the 2022 bear market for this rule, and it compares with a drawdown of 25.21% for the fund between 2021-12-27 and 2022-10-12, which took until 2023-12-13 to recover. The rule recovered earlier, in July 2023, than the fund did, in December 2023.
Notice the peak dates. The rule's peak came on 2021-11-16, before the fund's on 2021-12-27, because the rule's equity had stopped rising when the fund was still making new highs through December. The entry of 2021-12-22 closed at a loss on 2022-01-18, and the string of small losses that followed built the drawdown. Whipsaw losses, not one large drop, made up most of the 13.43%.
The second drawdown, 8.31%, ran from 2024-07-16 to 2024-09-06, a fall of 52 days, and recovered by 2024-11-06. It overlaps the exit on 2024-08-02 at $239.06 and the re-entry on 2024-08-20 at $249.86. The rule sold at a profit and bought back higher, which is the kind of round trip that costs a little each time.
The third, 7.87%, ran from 2023-07-31 to 2023-11-09 and recovered by 2023-12-14. That one includes the loss of 3.5% from 2023-09-01 to 2023-09-21 and the wait in cash until 2023-11-09.
For buy-and-hold, the second drawdown was 18.7%, from 2025-02-19 to 2025-04-08, and the third was 9.06%. The rule avoided the 18.7% decline almost completely, since it had exited on 2025-02-27 and stayed out until 2025-05-05. That is the single best piece of timing in the test, and it is also the reason the rule's 2025 return was ahead of the fund's.
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) | 9.8% | −13.4% | $17,138 | 0.94 |
| 5 basis points | 9.4% | −13.8% | $16,773 | 0.91 |
| 10 basis points | 9.0% | −14.3% | $16,430 | 0.87 |
What slippage did to the result
The headline run fills at the bar price with no cost. The two cost runs charge slippage on every fill. At 5 basis points, the CAGR fell from 9.84% to 9.43%, the final value from $17,138 to $16,773, and the maximum drawdown went from 13.43% to 13.83%. At 10 basis points the CAGR was 9.03%, the final value $16,430 and the drawdown 14.31%.
The rule made 41 fills, 20 round trips plus the open entry, so each cost level applies 41 times. The Sharpe ratio moved from 0.94 to 0.906 and then 0.872. Costs hurt the rule by a modest amount because it makes only a few round trips a year, though each fill is a whole-position order. A rule that traded every few days would pay the same cost per fill many more times. The rule stayed below buy-and-hold's 14.26% in all three runs, so the lag does not come from costs. It comes from time spent in cash.
VV traded an average of $65,414,324 a day over the window, with a median of 446 shares per minute bar. For a $10,000 account that is no obstacle, but the thin minute volume means the cost per fill in practice could differ from the fixed basis points used here. The test does not model that.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 9.8% | −13.4% | 20 | 55% | $17,138 |
| EMA 8/21 | 9.0% | −15.7% | 27 | 48% | $16,391 |
| EMA 20/50 | 7.9% | −21.4% | 11 | 45% | $15,501 |
| EMA 12/50 | 8.3% | −18.8% | 14 | 43% | $15,807 |
Changing the averages
Three variants of the averages were run on the same data. EMA 8/21, a faster pair, returned 8.99% with a 15.68% drawdown and 27 trades, finishing at $16,391. EMA 20/50, a slower pair, returned 7.93% with a 21.44% drawdown and 11 trades, finishing at $15,501. EMA 12/50, which keeps the fast average and slows the long one, returned 8.3% with an 18.82% drawdown and 14 trades, finishing at $15,807.
The published 12/26 pair did best on all three measures: CAGR of 9.84%, drawdown of 13.43% and a Sharpe of 0.94, against 0.874, 0.758 and 0.808 for the variants. The slower pairs made fewer trades and had deeper drawdowns. The faster pair made more trades, with 13 wins in 27 trades, and was still behind on return.
One window cannot say whether 12/26 is the best pair or just the best of four on this data. All three variants returned less than the published rules and had deeper drawdowns, which says that moving away from the published lengths cost something here. With only these four runs, the right reading is that the result is not fragile to small changes in the lengths, since every variant landed between 7.93% and 8.99%, and none beat the buy-and-hold CAGR of 14.26%.
How VV behaved
| Measure | VV |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 121.2% |
| Annualized volatility | 16.7% |
| Deepest drawdown | −25.6% (2021-12-27 to 2022-10-12) |
| Up days | 54.0% |
| Average daily range | 1.13% |
| Average overnight gap | 0.44% |
| Correlation to SPY | 1.00 |
| Correlation to QQQ | 0.95 |
| Correlation to TLT | 0.08 |
| Sessions above the 200-day average | 76.8% |
| Crossings of the 200-day average | 26 |
| Falls of 10% or more from a 20-day high | 14 |
What VV did over the window
VV returned 121.23% over 1,444 sessions, a CAGR of 14.83% on the raw fund data, with annualized volatility of 16.69%. It was up on 53.98% of days, and the average up day and the average down day were both 0.75%. The deepest drawdown was 25.63%, from 2021-12-27 to 2022-10-12, with a recovery on 2023-12-13, and the longest drawdown lasted 493 sessions.
VV is a close copy of the S&P 500. Its correlation to SPY was 1.00 and to QQQ 0.95, and its beta to SPY was 1.02. It was nearly unrelated to TLT, with a correlation of 0.08. For a rule that exists to step aside during falls, that matters little by itself, since VV moved with the broad market.
Two numbers explain why a trend rule lagged on this fund. VV closed above its 200-day average on 76.79% of sessions, so most of the window was an uptrend, and a rule that holds a position on 70.3% of days gives up the return of the other days. Overnight gaps carried 78.12% of the fund's log return, against 21.88% for the intraday part. The rule buys and sells at the open, so when it is invested it earns the overnight move, and when it is in cash it misses it.
The fund's five best days were 2025-04-09 at 9.39%, 2022-11-10 at 5.57%, 2025-05-12 at 3.3%, 2022-06-24 at 3.19% and 2022-11-30 at 3.15%. The 9.39% day of 2025-04-09 fell while the rule was in cash, which fits with the rule's re-entry on 2025-05-05 coming after the rebound had started. The worst days were 2025-04-04 at -5.99% and 2025-04-03 at -4.87%, and the rule was out for both.
The fund's lag-1 autocorrelation was -0.01, so one day's return said nothing about the next. A crossover rule depends on trends that last for weeks, which a series like this does through multi-week drift and not through day-to-day persistence. VV fell 10% or more from a 20-day high 14 times.
Among the 12 broad index funds the rule traded, IOO had the highest CAGR at 10.9%, followed by VOO at 10.34%, SPY at 10.2% and then VV. The weakest in the broad group were QQQE, EEM and IWM, with CAGRs of 1.87%, 0.29% and 0.18%. VV sits in the top group, next to SPY and VOO.
The rules
Hold while the 12-day exponential average is above the 26-day, the core of the MACD used as a position switch.
- WHEN the market opens · IF not invested AND EMA(12) > EMA(26) · THEN buy with 98% of the sleeve
- 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.
Other rules on the same fund
The rule here is a long-or-flat switch with two orders: buy with 98% of the sleeve at the open when EMA(12) is above EMA(26) and the sleeve is empty, and sell the whole position at the open when EMA(12) falls below EMA(26). Nothing else is in it, no stop and no target.
Several other templates landed close to this one. The momentum breakout returned 9.34% with a 13.6% drawdown, very close to the EMA rule's 9.84% and 13.43%. The SMA 10/50 trend returned 8.18% with a 12.58% drawdown, the shallowest of the 12. The golden cross returned 8.43% with 18.62%. The 200-day regime filter returned 7.86% with 19.9%.
The RSI(2) snapback returned 12.55% with a 13.12% drawdown, a better return than the EMA rule for a similar depth. The bottom of the ranking on VV held the trend with a trailing stop, RSI mean reversion and the dip buyer, which returned between 2.65% and 6.22%. The VV overview page has all 12 side by side.
None of the 12 beat the fund's 14.26% except the weekly 7% target at 14.94%. On VV, a broad large-cap fund that rose through most of the window, almost every rule that spent time in cash gave up return.
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 VV?
Over 2021-01-04 to 2026-10-02, EMA 12/26 trend on VV returned 9.8% annualized vs 14.3% for buy-and-hold: it trailed buy-and-hold by 4.4% per year, with a maximum drawdown 11.8 points shallower than holding (13.4% vs 25.2%).
How many trades did it make?
20 completed round trips over 5.7 years (41 fills), with 55% 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 EMA 12/26 trend beat buy-and-hold on VV?
No. It returned 9.84% a year against 14.26% for buy-and-hold, and ended at $17,138 against $21,500. Its maximum drawdown was 13.43%, against 25.21% for holding the fund.
How many trades did the rule make on VV?
It made 20 closed round trips and one open position, 41 fills in all. Eleven round trips were winners, which is a 55% win rate. The average winner was 7.23% and the average loser was -2.08%.
What was the worst drawdown?
The largest drawdown was 13.43%, from 2021-11-16 to 2022-11-03. It took 352 days to reach the low and 257 more to recover, on 2023-07-18. Buy-and-hold fell 25.21% over its own worst stretch, from 2021-12-27 to 2022-10-12.
Did trading costs change the result?
Slippage of 5 basis points per fill lowered the CAGR from 9.84% to 9.43%. At 10 basis points it was 9.03%, with a final value of $16,430. The rule stayed behind buy-and-hold in all three runs.
Do other moving-average lengths work better on VV?
Three variants were tested. EMA 8/21 returned 8.99%, EMA 20/50 returned 7.93% and EMA 12/50 returned 8.3%. The published 12/26 pair had the highest CAGR and the shallowest drawdown of the four.
How does this compare with the same rule on SPY or VOO?
On SPY the rule returned 10.2% with an 11.84% drawdown, and on VOO 10.34% with 11.76%. VV returned 9.84% with 13.43%. All three are close, which fits with their near-perfect correlation.
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.