Skip to content
¿?
¿?

London Local time in London: --:--

Open to conversations about trading and startups

rishikesh.mistry@outlook.com

MarketsSep 2025–nowProject

Equity strategy backtester

Excel / VBA, then Python

Sharpe · 15 markets
0.76
Markets positive
12/15
Correlation with S&P
0.06
Rules tested, then frozen
228

Context

I built a backtester in Excel to test simple trading rules on real data. My first rule, a 20/200-day moving-average crossover, looked good but only traded three times in five years, which proves nothing. So I went looking for a rule that holds up on data it has never seen.

What I did

  1. 01Built the backtester in Excel and VBA: signals at the close, fills at the next open, costs and a full trade log.
  2. 02Tested 228 rule variants on the S&P 500 from 1991 to 2009 only, then froze one rule before looking at anything newer.
  3. 03Ran the frozen rule on 2010–2026 and on 14 other markets, and checked it against the same trades placed on random days.
  4. 04Found that buying short dips really works, but only in big equity indices, and less than it used to.
  5. 05Tested 12-month trend-following, taken straight from the published research, across all 15 markets. It was the one edge that held up.

Outcome

12-month momentum held up everywhere: a Sharpe of 0.76 across 15 markets since 1995, almost uncorrelated with stocks. It's a real edge, but a small one, and weaker since 2011.

Limitations

  • It's a small edge. Without Bitcoin, the Sharpe since 2011 is 0.31, which matches how trend-following funds actually did in the 2010s.
  • It doesn't beat simply holding the S&P on raw return. Its case is that it makes money when stocks fall.
  • The data is free daily closes from Yahoo Finance. Index prices leave out dividends, and the commodity futures have roll jumps.
  • Shorting assumes futures or CFDs with no financing cost, and the 10% volatility target can mean up to 3× leverage in calm markets.
  • The original Excel rule traded three times in five years, so its numbers (in the last chart) say nothing about whether it works.

Charts

Growth of a 12-month momentum portfolio across 15 markets against the S&P 500, 1995 to 2026, both at 10% volatility, on a log scale. Momentum ends near 15 times against about 6 times, with a Sharpe of 0.76 against 0.52 and a −27% worst drawdown against −37%.Full size (opens in a new tab)
The rule that held up: each day, long every market that rose over the past year and short every one that fell, each at the same risk. It comes from the published research, not fitted to this data. Both lines are scaled to 10% volatility, with 3 bp per trade.
Sharpe ratio of the momentum rule in each of 15 markets, for the whole history and each half. Positive in 12 of 15; weaker in the second half almost everywhere.Full size (opens in a new tab)
The same rule on each market's full history, split into first and second halves. It's weaker in the second half almost everywhere, and without Bitcoin the portfolio's Sharpe since 2011 is 0.31. A real edge, but a small one.
Calendar-year returns of the momentum portfolio and the S&P 500, 1995 to 2026. Momentum was positive in 75% of years and made money in four of the S&P's eight losing years, including 2008 and 2022.Full size (opens in a new tab)
Calendar-year returns since 1995. Trend-following earns its keep when stocks fall: by then most markets are trending down and the portfolio is short them. It gives some back at sharp turning points, like 2000. 2026 is to date.
The original Excel test: a 20/200-day crossover on SPY against buy-and-hold, 2021 to 2026. Both end near +70%, with drawdowns of 10% against 25%, from only three trades.Full size (opens in a new tab)
The workbook's 20/200 crossover on SPY, $1 a trade, against simply holding it. Most of the gap opens in 2022, when the strategy sat in cash. Three trades in five years, so on its own it proves nothing.

Tools

  • Excel
  • VBA
  • Python
  • pandas
Next · MarketsExxonMobilCommodities trading placement, landed with one cold email