[{"data":1,"prerenderedAt":194},["ShallowReactive",2],{"article:how-i-tried-not-to-fool-myself-backtesting-indian-markets":3,"\u002Fblog\u002Fhow-i-tried-not-to-fool-myself-backtesting-indian-markets-surround":184},{"id":4,"title":5,"archived":6,"author":7,"body":8,"date":168,"description":169,"extension":170,"image":171,"meta":172,"minRead":173,"navigation":174,"path":175,"published":174,"seo":176,"sitemap":177,"stem":178,"tags":179,"__hash__":183},"blog\u002Fblog\u002Fhow-i-tried-not-to-fool-myself-backtesting-indian-markets.md","How I Tried Not to Fool Myself Backtesting Indian Markets",false,"Baljeet Singh",{"type":9,"value":10,"toc":160},"minimark",[11,22,31,36,43,71,74,78,111,115,118,150,153,157],[12,13,14],"blockquote",{},[15,16,17,21],"p",{},[18,19,20],"strong",{},"Not investment advice."," I'm not SEBI-registered. This post is about testing methods, not about what to trade.",[15,23,24,25,30],{},"I ",[26,27,29],"a",{"href":28},"\u002Fblog\u002Fi-backtested-150-trading-strategies-on-indian-markets","tested about 150 trading strategies"," on five years of Indian market data. Almost none survived. Getting to a result I trusted took two things: fixing the data, and making it hard for a strategy to look good by luck.",[32,33,35],"h2",{"id":34},"honest-checks-turn-89-lakh-into-a-loss","Honest checks turn ₹8.9 lakh into a loss",[15,37,38,39,42],{},"My best day-trading strategy made ",[18,40,41],{},"₹8.9 lakh"," on ₹5 lakh over four years of past data. Then I asked four questions:",[44,45,46,53,59,65],"ol",{},[47,48,49,52],"li",{},[18,50,51],{},"Could I actually afford it?"," On busy days it wanted 31 trades at once. With a limit of five trades a day, the profit fell to ₹3.9 lakh.",[47,54,55,58],{},[18,56,57],{},"What if prices are slightly worse?"," Real trades rarely get the exact price. Assuming a tiny bit worse on each trade turned that ₹3.9 lakh into a ₹2.6 lakh loss.",[47,60,61,64],{},[18,62,63],{},"Is it just a few lucky days?"," The best 5% of days made all the profit. The other days lost money together.",[47,66,67,70],{},[18,68,69],{},"Does it work on data it has never seen?"," I'd kept the newest four months aside. On those, it lost ₹1.07 lakh.",[15,72,73],{},"None of these checks is clever. Most backtest screenshots skip all four.",[32,75,77],{"id":76},"more-checks-i-ran-on-every-strategy","More checks I ran on every strategy",[79,80,81,87,93,99,105],"ul",{},[47,82,83,86],{},[18,84,85],{},"Write the rules down before testing."," If you tweak rules after seeing results, you're fitting the past.",[47,88,89,92],{},[18,90,91],{},"Build on old data, check on new data, once."," I built everything on 2021 to mid-2025 and looked at the newest 16 months only at the very end. No changes after looking.",[47,94,95,98],{},[18,96,97],{},"Beat a coin flip."," I re-ran each strategy with buy or sell picked by a coin flip, ten times. A real strategy should do clearly better. (The one above did, by over ₹17 lakh. It still failed check 4.)",[47,100,101,104],{},[18,102,103],{},"Be suspicious of great results."," Anything that looked too good got flagged. One did: it turned out to be based on too few trades to mean anything.",[47,106,107,110],{},[18,108,109],{},"Count your attempts."," Try 150 ideas and some will look good by pure chance. Each new idea had to pass the same bar.",[32,112,114],{"id":113},"the-data-was-messier-than-i-expected","The data was messier than I expected",[15,116,117],{},"Before any of this, the data itself had problems that would have created fake results:",[79,119,120,126,132,138,144],{},[47,121,122,125],{},[18,123,124],{},"Fake trading days."," NSE runs practice sessions on some Saturdays to test its systems. Three were in my stock data, with nonsense prices and negative volume.",[47,127,128,131],{},[18,129,130],{},"A company split in two."," Tata Motors split its car business into a separate company in Oct 2025. Without adjusting the old prices, the stock looks like it crashed 40% overnight, which a strategy would treat as the trade of the year.",[47,133,134,137],{},[18,135,136],{},"Duplicates and odd times."," One dataset had 3,690 duplicate rows. Others had prices at odd minutes or from special short sessions.",[47,139,140,143],{},[18,141,142],{},"Option prices that mixed two options."," My options data, from the broker Dhan, was labelled by position (\"closest to the current price\") rather than by exact option. When the market moved, the label switched to a different option partway through a 5-minute block. The closing prices were right, but about 10% of the highs and lows were wrong by 13-40%. My first options test used those highs and lows, and the results were nonsense. Using only closing prices fixed it, and checking the 20 most important days against 1-minute data gave identical results.",[47,145,146,149],{},[18,147,148],{},"Two sources, one story."," I joined data from two brokers, Dhan and Fyers. Where they overlapped, they agreed to within 0.06%, so the join didn't create fake price jumps.",[15,151,152],{},"The data stays on my laptop. Broker data is licensed for personal use.",[32,154,156],{"id":155},"what-id-keep","What I'd keep",[15,158,159],{},"The checks are the useful part, more than any strategy. Write the rules down first, test against a coin flip, keep fresh data aside and look at it once. It's cheap, and it's what turned \"₹8.9 lakh profit\" into \"a loss on data it had never seen\".",{"title":161,"searchDepth":162,"depth":162,"links":163},"",2,[164,165,166,167],{"id":34,"depth":162,"text":35},{"id":76,"depth":162,"text":77},{"id":113,"depth":162,"text":114},{"id":155,"depth":162,"text":156},"2026-10-19","My best trading strategy made ₹8.9 lakh on paper. A few honest checks turned it into a loss. Here are the checks, and the data problems I had to fix before any result meant anything.","md","\u002Fimg\u002Fbacktest-honest-checks.png",{},5,true,"\u002Fblog\u002Fhow-i-tried-not-to-fool-myself-backtesting-indian-markets",{"title":5,"description":169},{"loc":175},"blog\u002Fhow-i-tried-not-to-fool-myself-backtesting-indian-markets",[180,181,182],"Backtesting","Python","Data","5eiSEp2LNoGa2JemyjwjqAEAL0JnKUc3Fp9XH30WcUg",[185,190],{"title":186,"path":187,"stem":188,"description":189,"children":-1},"How I Built a Personal Knowledge Wiki with Claude Code","\u002Fblog\u002Fhow-i-built-a-personal-knowledge-wiki-with-claude-code","blog\u002Fhow-i-built-a-personal-knowledge-wiki-with-claude-code","How I turned 14,000+ scattered files — YouTube transcripts, 13 years of RSS feeds, Google Takeout data, Notion exports — into a 50-page cross-referenced knowledge wiki using Claude Code and flat markdown files.",{"title":191,"path":28,"stem":192,"description":193,"children":-1},"I Tested ~150 Trading Strategies on Indian Markets. Only a Plain Index SIP Held Up.","blog\u002Fi-backtested-150-trading-strategies-on-indian-markets","I tested day trading, swing trading, futures and options on five years of real NSE data, with every charge included. The strategies that looked great on old data stopped working on new data. A simple monthly SIP did as well as anything.",1792427740664]