MACD strategy on Indian stocks: what 15 years of Nifty data show.
A MACD crossover rule on 43 Nifty 50 stocks, 2011–2025, after costs, tuned on the early years and scored on the later ones. How often it beat simply holding the stock, and why the few that passed did.
The short answer
On these stocks and years, a MACD crossover rule mostly trailed simply holding the stock. It was run on 43 of the Nifty 50 stocks for fifteen years (2011–2025), after a 0.1% cost on every trade, tuned on the first 70% of the years and scored on the rest. 15 of the 43 beat holding on the tuning years, 4 were still ahead on the later years, and 3 passed the checks for luck.
Those 3 are all companies of one business group that fell apart over the decade. The rule beat holding them because those stocks fell for years, and a rule that is not always long beats one that is on a stock like that.
The rule that was tested
The MACD line is a fast exponential average of the close minus a slow one; the signal line is an average of the MACD line. The rule is long while the MACD line is above the signal line and short while it is below, so once it has warmed up it is always in the market. The full rule is on the MACD strategy page.
The tuning chose from Finertia’s 4 built-in settings, from 8/17/9 to 19/39/9 (fast, slow and signal spans in days). The one chosen most often was 16/34/9, on 14 of the 43 stocks.
Good on the tuning years, rarely afterwards
| Step | Stocks left |
|---|---|
| Tested | 43 |
| Beat holding on the tuning years | 15 |
| Still ahead on the later years | 4 |
| Passed three checks for luck | 3 |
The typical Sharpe ratio fell from 0.05 on the tuning years to −0.22 on the later ones, and only 15 of the 43 were above zero there. Of the 4 still ahead of holding, Tata Motors failed the Deflated Sharpe check: its Sharpe was not high enough to rule out being the lucky best of the settings tried. Why tuned settings lose their edge is covered in how to tell if a backtest is overfit.
The three that passed
| Stock | Later-years Sharpe | Holding |
|---|---|---|
| Reliance Communications | 3.041 | −0.452 |
| Reliance Infrastructure | 0.445 | 0.366 |
| Reliance Power | 0.955 | 0.505 |
On a stock that mostly falls, a rule that can go short or step aside beats one that only holds. That is what happened here. Reliance Communications’ price history also has long stretches with no trading, so its figure is not something a person could have earned. None of the three is on today’s Nifty 50.
What trading costs do to it
The whole study was re-run at half and at double the 0.1% cost per trade:
| Half cost | Default | Double cost | |
|---|---|---|---|
| Beat holding on the tuning years | 15 | 15 | 15 |
| Still ahead on the later years | 4 | 4 | 4 |
| Passed three checks for luck | 3 | 3 | 3 |
| Typical later-years Sharpe | −0.19 | −0.22 | −0.30 |
The counts did not move, but the typical result got worse as costs rose. Which stocks passed did not depend on the cost; how much the typical one lost did.
On today’s Nifty 50 list
The same test on today’s 50 members, over the same years: 9 beat holding on the tuning years, 1 stayed ahead afterwards, and none passed. The three stocks that passed on the 2011 list are not on today’s list; see survivorship bias on the Nifty 50.
Trying many more settings
4 settings is very few. So the study took one stock, Reliance Industries, chosen in advance, and tried 284 MACD settings: fast spans from 3 to 25 days, slow from 10 to 100 and signal from 5 to 15. Holding Reliance Industries gave a Sharpe of 0.553 on the tuning years and 0.544 on the later ones.
| Setting | Tuning years | Later years |
|---|---|---|
| Best MACD of 284: 5/60/5 | 0.309 | 0.199 |
| Holding Reliance Industries | 0.553 | 0.544 |
None of the 284 settings beat holding, on either the tuning years or the later ones. The best MACD setting did keep some of its result: it ranked 2 of all 834 combinations the study tried on the stock on the tuning years, and 13 on the later ones. It still trailed holding the stock in both. The typical MACD setting scored −0.17 on the later years, and 43 of 284 were above zero.
On Apple, in Finertia’s first study, MACD failed on both test windows, at −0.300 and −0.114. That write-up has the details.
What to take from it
A MACD backtest that beats holding on the years it was tuned on says little about the years after. Where it did beat holding here, it was on falling stocks, where any rule that is not always long has the advantage. Judge any version of this rule on years it was not tuned on, after costs, against holding the same stock, and ask why the winners won.
This is one way of trading MACD, on one market over one period. It does not show that MACD rules never work; it shows how this one did when tested fairly. The full study, with every table: Of 129 Nifty strategies, four survived honest testing. The steps behind a fair test: how to backtest a trading strategy without fooling yourself. To run the rule yourself on past data, open the demo.
On real stocks
Each stock page runs the same three rules on one stock, 2019–2024, against holding it. 14 of them are Indian large caps.
- Nifty 50 · Sharpe 0.78 holding it
- Reliance Industries (RELIANCE) · Sharpe 0.56 holding it
- HDFC Bank (HDFCBANK) · Sharpe 0.38 holding it
- Tata Consultancy Services (TCS) · Sharpe 0.68 holding it
- Infosys (INFY) · Sharpe 0.81 holding it
- State Bank of India (SBIN) · Sharpe 0.58 holding it
See it on a real strategy.
Finertia runs these checks on any stock you pick. The free plan runs the backtest; Pro adds the validation.