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.
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.
Buying a NIFTY weekly put on a 1-hour DI / Williams %R signal made +1,090 points a lot over 4.7 years, but not by more than luck could explain (t 1.54). It lost money on the earlier two years (Nov 2021 to Nov 2023), and without its five best trades it lost over the whole period.
Buying a NIFTY weekly put when the price breaks below the first 15 minutes’ range and 9-bar momentum turns negative made +1,680 points a lot over 4.7 years, and made money in both the held-back years and the later ones. But neither was beyond luck (t 1.60 overall), the worst drawdown was larger than the capital we assign, and pessimistic fills turn it into a heavy loss.