Rule-based investing and trading, tested honestly, automated safely.
Algo simply means rules, followed every time. Rules keep you consistent; automation keeps emotion out of
the decision. Here I share backtests, lessons and real-life experience from my own fully automated setup, including
what didn't work. New to algo? Start here. Want to explore investing and trading
strategies? See the strategies.
Two in three small NIFTY futures gaps (0.10–0.25%) touched the previous close during the day, but fading them with a stop won only 51% of the time. The rule lost about 8.6 points a trade before costs and 10.6 after costs. On the NIFTY index itself the same idea looks profitable, but the index as such is not tradable.
Trading NIFTY synthetic futures in the direction of the first 15 minutes, from 2:45 pm to the close, made about 2,600 points after costs in the last 18 months (about 61% on capital) but lost about 1,100 points in the 2.2 years before. Over the whole test, November 2022 to August 2026, that is only about 3 points a trade (t 1.48), and on regular futures it loses outright.
An AI strategy finder that tries hundreds of rule combinations on the same few years and shows you the winner will always find something that looks strong. The winner is usually the luckiest fit to that window, and it tends to stop working the moment the window ends.
A fair coin that pays 1.1 times your bet on heads has a real edge: ₹1,000 bet on it should make ₹50. Bet it as 10 bets and you end with a gain of about ₹50 only a quarter of the time; as 1,000 bets, 86% of the time. Part 1 of The maths behind rule-based trading and investing.
A rule that gains a fraction of a percent per trade can show a spectacular annual return before costs if it trades often enough. Charge realistic costs and the same rule drains the account. The test is simple: compare the average gain per trade with the cost of one round trip.
Buying Midcap 150 stocks that closed at a 5-day low, with a 10-day limit and an exit on any close below the 10-day EMA, lost about 24% a year after costs over ten years. The trades had a small edge before costs (+0.21% each), but the EMA exit fired the day after almost every buy: 1,355 trades a year, and costs took more than the edge. Without that exit the rules simply tracked the index.