Momentum vs MACD, on 39 stocks.

The same 39 US and Indian stocks and indices, 2019–2024. At default settings Momentum had the higher Sharpe ratio on 18, MACD on 21. Tuned on the first 70% of the period and scored on the rest, Momentum held up on 12 and MACD on 3.

The scoreboard

MomentumMACD
Higher Sharpe than the other, default settings18 of 3921 of 39
Higher Sharpe than holding the stock1 of 392 of 39
Median Sharpe, default settings−0.11−0.14
Held up on years it never saw12 of 393 of 39
Median Sharpe on those years0.12−0.52
Beat random timing (p < 0.05)13 of 3917 of 39

Beating random timing and holding up are different questions. The permutation test asks whether a rule's timing beat chance over the whole period; the walk-forward split asks whether the setting picked on the early years kept working after. A rule can pass the first and fail the second.

The two rules

Trend following

Buys a stock that has been rising and sits above its moving average; sells it short on the mirror condition.

The exact Momentum rule

Trend following

Long while the MACD line is above its signal line, short while it is below: a smoothed trend signal.

The exact MACD rule

Stock by stock

Sharpe ratio at default settings over the whole period, then the Sharpe on the years after the split of the setting tuned on the years before. The higher of each pair is in bold.

StockMomentumMACDMomentum, unseen yearsMACD, unseen years
Apple0.360.350.20−0.53
Microsoft−0.47−0.75−0.15−0.68
Nvidia0.16−0.072.56−0.48
Amazon−0.34−0.37−0.41−0.96
Alphabet−0.42−0.35−0.21−0.65
Meta Platforms−0.12−0.590.91−0.38
Tesla0.710.730.230.87
JPMorgan Chase−0.26−0.210.930.08
S&P 500 ETF (SPY)−0.26−0.180.03−0.83
Nasdaq-100 ETF (QQQ)−0.10−0.190.72−0.68
AMD−0.200.110.13−0.26
Netflix−0.23−0.411.36−0.43
Berkshire Hathaway−0.010.28−0.20−0.83
Visa−0.71−0.45−0.10−1.00
Bank of America0.010.170.92−0.19
Walmart−0.45−0.421.07−0.34
Coca-Cola−0.39−0.220.120.64
Johnson & Johnson−0.57−0.10−0.110.15
ExxonMobil−0.080.11−1.25−0.85
Disney−0.190.16−0.45−0.91
Dow Jones ETF (DIA)−0.400.03−0.01−0.52
Russell 2000 ETF (IWM)−0.26−0.100.02−0.87
Reliance Industries0.05−0.38−0.37−0.27
Tata Consultancy Services−0.080.27−0.11−0.91
HDFC Bank−0.48−0.24−0.720.99
Infosys0.500.250.59−0.04
ICICI Bank−0.37−0.320.20−0.36
State Bank of India0.200.29−0.74−0.78
ITC−0.11−0.120.43−0.61
Bharti Airtel0.26−0.571.23−0.72
Larsen & Toubro0.18−0.14−0.34−1.03
Hindustan Unilever−0.110.460.13−0.85
Bajaj Finance0.310.43−0.070.42
Asian Paints0.18−0.420.88−0.41
Maruti Suzuki−0.37−0.57−0.08−0.30
Wipro0.680.190.14−0.65
Nifty 500.07−0.271.08−0.59
Nifty Bank0.14−0.02−0.740.17
BSE Sensex0.04−0.160.64−0.28

Hypothetical results on past data, from a script in the repository that re-runs every figure. Not a recommendation to buy, sell or trade anything.