Strategies

EMA crossover as a trend filter: cuts the drawdown, keeps the return

In short Holding the NIFTY 50 only while its 20-day EMA was above its 50-day EMA, and keeping the money in a liquid fund the rest of the time (assumed to earn 6% a year), made 9.9% a year over 18½ years against 7.7% for buying and holding the index, with a worst fall of −25% instead of −60%. The smaller drawdown held from every start date, with returns comparable to buy and hold.

Strategy card How we score →

Checks: passed 7 of 8

Risk: Very high

Worst drawdown −25.0% · about 2.5 years of average returns to recover

  • No stop-loss: a position can keep losing until the exit rule triggers.
  • Profit depends heavily on a few large trades or periods.

Rated Very high risk because its return is modest: the worst fall equals about 2½ years of average return. Holding the index itself would rate far worse, about 8 years.

The idea

A moving-average crossover is one of the oldest trend rules: when a fast average of prices is above a slow one, the trend is up, so stay invested; when it drops below, step aside. The classic version is slow, the 50-day and 200-day averages (the “golden cross”). A classic moving-average crossover idea uses much faster ones instead, and exponential averages (EMAs), which give more weight to recent prices and so react sooner.

For an index investor the appeal is simple: keep most of the market’s gains while sidestepping the deepest falls. We tested it on the NIFTY 50 and the NIFTY 500 against the simplest alternative, holding the index throughout, with one condition that matters a lot for any rule that spends time out of the market: the cash earns interest.

The rules

  • Signal: each day, compute the 20-day and 50-day exponential moving averages of the index’s closing prices.
  • In the market while the 20-day EMA is above the 50-day EMA; in cash while it is below. Nothing else: no stop-loss, no target, no position sizing.
  • Fills: the signal uses the day’s close and the switch happens the next day, at the open for the NIFTY 50 and at the close for the NIFTY 500 (for which we have only closing prices).
  • Costs: 0.10% on every switch in or out, typical of an index fund or ETF including spreads.
  • Cash earns 6% a year while out of the market, a liquid-fund-style assumption, before tax. Every strategy return on this page includes it unless a table says otherwise. Buy & hold is always fully invested, so it has no cash.

The backtest

Daily data, 1 January 2008 to 11 August 2026 (18½ years, including the 2008 crash, 2011, and March 2020). Earlier data was used only to warm up the averages.

CAGRWorst drawdownSharpeReturn ÷ drawdownIn the marketSwitches in a yearWin rateAverage win / loss
EMA 20/50, NIFTY 509.9%−25.0%0.350.4065%1.951%+14.1% / −4.7%
NIFTY 50 buy & hold7.7%−59.9%0.180.13100%———
EMA 20/50, NIFTY 50011.5%−24.9%0.460.4664%2.040%+21.2% / −4.1%
NIFTY 500 buy & hold8.3%−64.3%0.210.13100%———

(Price indices: dividends are excluded for the rule and for buy & hold alike. Dividends of roughly 1.2% to 1.5% a year would go in full to buy & hold but to the rule only about two-thirds of the time, so including them would narrow the gap by about half a point a year. Sharpe uses daily returns in excess of the 6% cash rate. A “win” is a spell in the market that ended above its entry, after costs; the spells exclude the interest earned in between. 35 spells on the NIFTY 50 and 38 on the NIFTY 500; the median spell lasted 85 and 55 days.)

EMA 20/50 trend filter (cash at 6%) vs NIFTY 50 buy and hold, growth of 100Jan 2008 to Aug 2026. EMA 20/50 filter ends at 570, NIFTY 50 buy & hold ends at 390. Figures are also in the tables on this page.50100200400200920112013201520172019202120232025EMA 20/50 filter570NIFTY 50 buy & hold390
Growth of 100, January 2008 to August 2026, NIFTY 50, with 0.10% costs and cash at 6% a year. Log scale, so equal percentage moves look the same size anywhere on the chart. Hover or tap for values.

The drawdown is the big result. Holding the NIFTY 50 lost 60% from the January 2008 peak; the filter’s worst fall was 25%, in 2010–11. On the NIFTY 500, −25% against −64%. The filter was out of the market for most of 2008, stepped aside on 26 February 2020, just before the March crash, and was back in by June 2020.

The win rate is low and that is normal. About half the spells (40% on the NIFTY 500) lose a little in choppy markets; a few long trends, such as April 2009 to February 2010 (+58%) and June 2020 to April 2021 (+40%), pay for all of them. That is how trend following works, and it is also why the result depends on a handful of spells (see the checks).

Part of the return is the cash. Without interest on idle money the NIFTY 50 version earns 7.7%, exactly level with buy & hold, and the NIFTY 500 version 9.2%. The timing alone mainly changes the ride; the 6% on the third of the time spent in cash is what puts the rule ahead.

Not a lucky setting. All 20 fast pairs tested (10–30 / 40–75) returned 7.6–9.9% a year on the NIFTY 50, with cash at 6%, against 7.7% for holding the index.

Start date

CAGR from 1 January of each year to 11 August 2026; the rule with cash at 6%, and with cash earning nothing for comparison.

StartNIFTY 50 ruleCash at 0%Buy & holdRule drawdownB&H drawdownNIFTY 500 ruleCash at 0%Buy & hold
20089.9%7.7%7.7%−25.0%−59.9%11.5%9.2%8.3%
200911.6%9.6%12.6%−25.0%−38.4%12.9%10.8%13.9%
20108.8%6.8%9.7%−25.0%−38.4%9.3%7.2%10.7%
201211.4%9.5%12.1%−19.2%−38.4%11.5%9.6%13.8%
201412.1%10.2%11.4%−19.2%−38.4%12.0%10.1%13.3%
201613.3%11.4%11.2%−13.7%−38.4%12.7%10.8%12.6%
201812.2%10.2%10.4%−13.7%−38.4%10.6%8.6%11.3%
202013.3%11.1%11.1%−13.7%−38.4%14.3%12.4%14.1%
20228.3%5.9%7.4%−9.1%−16.5%8.2%6.1%10.1%

NIFTY 500 drawdowns from the same starts: rule −12% to −25%, buy & hold −19% to −64%.

  • From the bottom, holding wins. Starting in 2009, 2010 or 2012, buy & hold earned more on both indices, by about 1 to 2 points a year, even with the rule’s cash earning 6%.
  • From later starts it depends on the index and on the cash. On the NIFTY 50 the rule was ahead from every start from 2014, but with cash at 0% it was roughly level or behind: the edge is the interest. On the NIFTY 500 buy & hold was ahead, or within a fraction of a point, from every start after 2008.
  • The drawdown benefit held every time. Whatever the start, the rule’s worst fall was between about a third and two-thirds of the index’s. That is the robust part of the result.

Two halves

PeriodNIFTY 50 ruleBuy & holdNIFTY 500 ruleBuy & hold
Jan 2008 – Jun 20177.4% (−25.0%)4.7% (−59.9%)11.5% (−24.9%)4.7% (−64.3%)
Jul 2017 – Aug 202612.5% (−13.7%)10.8% (−38.4%)11.4% (−16.5%)12.0% (−38.3%)

CAGR (worst drawdown), each half measured on its own, cash at 6%.

On the NIFTY 50 the rule beat buy & hold in both halves. On the NIFTY 500 it won the first half by a wide margin, helped by stepping aside in 2008, and trailed slightly in the second. In both halves, on both indices, it fell less than half as far.

Year by year

YearNIFTY 50 ruleBuy & holdNIFTY 500 ruleBuy & hold
2008−16%−52%−10%−57%
2009+69%+76%+91%+89%
2010+5%+18%+3%+14%
2011−19%−25%−13%−27%
2012+19%+28%+15%+32%
2013−4%+7%+1%+4%
2014+26%+31%+32%+38%
2015−11%−4%−11%−1%
2016+12%+3%+15%+4%
2017+26%+29%+31%+36%
2018+5%+3%−9%−3%
2019+12%+12%+8%+8%
2020+34%+15%+33%+17%
2021+17%+24%+27%+30%
2022+2%+4%−1%+3%
2023+18%+20%+26%+26%
2024+14%+9%+12%+15%
2025+8%+11%+6%+7%
2026*−1%−6%−2%−1%

*2026 to 11 August. On the NIFTY 50 the rule made money in 14 of 19 years and beat buy & hold in 7; on the NIFTY 500, 13 and 5.

The pattern is clear: big gains over the index in crash years (2008, 2020) and in the 2016 recovery, small losses to it in most rising years, and the worst years relative to the index in choppy, sideways markets (2010, 2013, 2015), when the averages cross back and forth.

Costs and cash

TestNIFTY 50 CAGRDrawdownNIFTY 500 CAGRDrawdown
As tested: 0.10% a side, cash 6%9.9%−25.0%11.5%−24.9%
Double cost, 0.20% a side9.5%−25.7%11.0%−24.9%
0.25% a side9.3%−26.0%10.8%−24.9%
Cash earns 0%7.7%−27.9%9.2%−26.6%
Cash earns 4%9.2%−26.0%10.7%−24.9%
Cash earns 8%10.6%−24.1%12.2%−24.9%
Buy & hold7.7%−59.9%8.3%−64.3%
  • Costs barely matter. About two switches a year, so even 0.25% a side costs only half a point.
  • The cash rate matters a lot. Each 2 points of interest adds about ¾ of a point a year to the rule, because it spends about a third of the time in cash. Money that sits idle in a savings account would have left the NIFTY 50 rule level with buy & hold, not ahead of it.

How it scored

Scored as an investing strategy on the NIFTY 50 (the card above): against buy & hold, with calendar years as the unit.

CheckResultDetail
Profitable after costs, beyond luck✓9.9% a year; average spell in the market t 1.95, yearly returns t 2.5
Beats a simple alternative✓9.9% against 7.7% for buy & hold from 2008, but not from 2009, 2010 or 2012 starts
Holds up out of sample✓Profitable in both halves, and ahead of buy & hold in both (7.4% vs 4.7%; 12.5% vs 10.8%)
Not fragile to parameters✗Every nearby EMA pair was profitable (7.6% to 9.9%), but their average spell fell short of t ≈ 2 (1.6 to 1.8), and 20/50 was the best cell, chosen with hindsight
Consistent over time✓Profitable in 14 of 19 years (74%); worst year −19% (2011)
Survives higher costs✓9.5% at double cost
Profit not concentrated✓Without its five best spells, still +1.3% a year; no year above a third of the growth (2009: 30%)
Enough data✓18½ years, including the 2008 bear market, 2011 and March 2020
Passed7 of 8

(t measures whether the average spell’s gain can be told apart from zero; about 2 or more is our standard. The rule’s lead over buy & hold, year by year, is much harder to separate from luck: about +0.4 point a year on average, with a t of only 0.15. Concentration is measured on growth in log terms, so a +69% year and a −16% year are weighed fairly.)

Risk: Very high. The worst drawdown, −25%, equals about 2½ years of the rule’s average return (9.9% a year). For comparison, buy & hold’s −60% equals almost 8 years of its 7.7%. The rating is relative to the return, so a strategy that halves the index’s drawdown can still rate Very high.

The NIFTY 500 version would score similarly with one difference: its average spell is t 1.78, short of our standard, so it would fail “profitable” (and so “parameters” and “higher costs”), and its second-half return trailed buy & hold.

Risks

  • Whipsaws in sideways markets. In 2010, 2013 and 2015 the averages crossed back and forth and the rule fell 7 to 13 points behind the index. Most spells in the market are small losses; a few long trends carry the result.
  • It reacts late. It exits after a fall has started and re-enters after a rebound is under way. In January 2008 it was invested and lost 15% before stepping out; its worst drawdown (2010–11) came from a run of such losses.
  • Without its best five spells, almost nothing is left. The return would fall from 9.9% to about 1.3% a year. Missing one big trend through hesitation or an override would hurt badly.
  • The cash return is an assumption. The edge over buy & hold depends on idle money earning about 6%. Lower rates, or tax on the interest and on each switch, would narrow or erase it.
  • No dividends in this test. Including them would favour buy & hold, which is always invested.
  • Taxes are not modelled. About two switches a year turn long-term holdings into short-term gains, which an investor who simply holds would not pay.

Pros & cons

Pros

  • A very simple daily rule on a single index.
  • Cut the worst drawdown by more than half over the full period, and by at least a third from every start date, on both indices.
  • Ahead of buy & hold from 2008, and in both halves on the NIFTY 50.
  • A broad plateau: almost every fast EMA pair worked; costs barely matter.

Cons

  • Behind buy & hold from market-bottom starts (2009 to 2012), on both indices.
  • Much of the edge is the 6% on idle cash; with cash at 0% it only matched the NIFTY 50.
  • Profit rests on a few long trends; most spells are small losses.
  • Frequent switching has tax consequences that buy & hold avoids.

Our verdict

On 18½ years of data, net of costs and with idle cash earning 6%, a fast EMA 20/50 crossover on the NIFTY 50 earned 9.9% a year against 7.7% for holding the index, with a worst fall of −25% instead of −60%. It passed seven of our eight checks, failing only on how strongly its neighbours’ results stand out from luck.

The honest summary is “a smaller drawdown with roughly index-like returns”, not “beats the index”. The return edge came from the 2008 start, from the interest on cash, and from a few long trends; from 2009, 2010 or 2012 starts, holding the index earned more. The drawdown benefit was the part that held up everywhere. The key question is whether a much shallower worst fall is worth whipsaws in sideways years, a dependence on the cash rate, and the tax of switching.

Was this useful?

More to say, or spotted a mistake? Write to [email protected]. We read everything.

Topics

Hypothetical, backtested results on historical data at least three months old. They include modelled costs but can't capture every real-world effect, and past performance does not predict future results. This is educational research, not a recommendation. Full disclaimer.