You just finished building your trading strategy. The equity curve looks great. The drawdowns look small. It feels like you have found an edge. For most retail traders, this is exactly where things start to go wrong. This is not a small problem. SEBI's latest study found that 91% of individual traders in India's equity derivatives (F&O) segment lost money in FY25. Together, they lost about ₹1.06 lakh crore. That is 41% more than the year before, even after SEBI put curbs on F&O trading (Business Standard). An earlier SEBI study covering FY22 to FY24 found that 93% lost money, with total losses above ₹1.8 lakh crore (SEBI). Most of these traders are not lazy or careless. They fail because of the way they test their strategies. And if you are an engineer or data scientist thinking "this is about impulsive option buyers, not me," hold that thought. The same problem hits skilled coders too. In fact, the strongest proof comes from a platform built for programmers. A beautiful backtest can fool you Here is the most sobering study on this topic. Researchers at Quantopian looked at 888 real trading algorithms built by users of their platform. They compared each backtest with at least six months of real, live performance. The result? The backtest Sharpe ratio, the risk-adjusted return number most traders chase, told them almost nothing about live results. The R-squared was below 0.025. In plain words, the backtest score explained less than 3% of what actually happened in live trading (Wiecki et al., 2016). There was a second finding, and it hurts more. The more a person backtested a strategy, the bigger the gap between the backtest and live results. Every extra hour of tweaking made the backtest less trustworthy, not more. Now remember who wrote these strategies. All 888 were built by people who could code well enough to build and run an algorithm. Coding skill did not close the gap. If anything, it made things worse, because good coders test more versions faster, and every new version is one more chance to fit noise instead of signal. This is what overfitting means. Your model learns the random quirks of your historical data instead of a real, repeatable pattern. It looks smart on old data and performs close to a coin flip on new data. There is simple math behind this too. David Bailey and Marcos López de Prado showed that if you test enough versions of a strategy on the same data, one of them will show a great Sharpe ratio just by luck. Their fix, called the Deflated Sharpe Ratio, lowers your score based on how many versions you tried (Bailey & López de Prado). Most retail traders never count their tries. So most retail Sharpe ratios are inflated, and nobody knows by how much. Even real edges shrink over time. McLean and Pontiff studied 97 trading signals published in academic journals. On average, returns were 26% lower after the study period ended, and 58% lower after the paper was published, as more traders crowded into the same trade (Journal of Finance, 2016). So here is a safe working rule: whatever your backtest shows, expect live results to be weaker. Your job is to estimate how much weaker, before you risk money.Real costs eat paper profits A backtest that ignores commissions and slippage is fiction. SEBI's data makes this concrete: individual F&O traders spent about ₹26,000 each on transaction costs in FY24. Together, they spent over ₹50,000 crore between FY22 and FY24 (SEBI). For a strategy that trades often on thin margins, costs this large do not just lower your returns. They can flip a winning backtest into a losing strategy. Slippage is the gap between the price you expected and the price you actually got. It is small in liquid index futures on a calm day. It gets much bigger in illiquid stocks or during market stress, which is often exactly when your strategy wants to trade. If your backtest assumes instant fills at the mid-price, you have not modelled a market. You have modelled a spreadsheet. And the risk does not stop at prices. The code itself can fail. On 1st August 2012, Knight Capital, then one of the largest market makers in the US, lost around $440 million in about 45 minutes because of a bad software deployment (SEC). If that can happen to a firm of that size, a retail trader running a script against a broker API should respect the gap between research code and live code. Three mistakes hiding in your research Moving from research to a live broker API usually exposes three problems. The first is look-ahead bias. Your backtest accidentally uses information that was not available at the time of the trade. The results look great, and they are impossible to repeat live. The second is survivorship bias. You test only on stocks that exist today and skip the ones that were delisted or went bankrupt during your test period. This quietly makes your results look better than they should. The third is not a bias. It is a process mistake: starting with data and models instead of a reason. Your analysis should test why an edge exists, not replace that question. Real edges usually come from one of three places. A risk premium, where someone pays you to carry a risk they do not want. A behavioural pattern, where people keep making the same mistake because it is hard or costly to trade against. Or a structural flow, like index rebalancing or expiry-day hedging. If your strategy does not connect to one of these, and you cannot say who is on the other side of your trade and why they keep losing to you, you are gambling with extra steps. Machine learning for trading works best on top of a sound economic idea, not instead of one. That question, who is on the other side, matters more than most traders think. In July 2025, SEBI passed an interim order against Jane Street Group. It alleged that the firm manipulated index levels around expiry days, and it directed the firm to deposit about ₹4,844 crore in alleged unlawful gains. Jane Street is contesting the order, and the case is still before the Securities Appellate Tribunal (SEBI order). Whatever the final ruling, the case showed retail options traders what they are up against: global firms with faster systems and dedicated execution research. A backtest that assumes easy fills is pretending these players do not exist. The tools are not the hard part. The domain is. The usage of python for trading has become the standard. But general coding skill transfers less than most engineers expect. The hard parts are specific to finance: data that shows only what was known at the time, price series adjusted correctly for splits and dividends, backtesting frameworks that model fills and costs honestly, and broker APIs that behave differently live than in their documentation. If you come from software or data science, treat this as new domain knowledge to learn, a financial layer on top of tools you already know. Within that domain, the most useful validation habit is walk-forward analysis. Split your historical data into pieces. Optimise your strategy on one piece, test it on the next, and keep rolling forward in time. Just as important, keep one final block of data untouched until your strategy is fully built, and check it exactly once. If you peek at it and go back to tweaking, that data has become training data, and its verdict means nothing. One extra warning for machine learning practitioners. Standard k-fold cross-validation, which works fine in most ML problems, breaks on financial time series. Market data points overlap and are correlated over time, so information leaks between the folds. Your model can score well in cross-validation and still know nothing about the future. Financial ML uses purged and embargoed cross-validation to stop this leakage, a fix described in Marcos López de Prado's Advances in Financial Machine Learning. If your validation habits come from a general data science career, assume your results are too optimistic until you prove otherwise. Markets change character. Static strategies age badly. A strategy that works in a trending market often fails when the market goes sideways. Indian markets have given traders a crash course in this. The Nifty 50 went through a strong bull run after 2020, a rough correction in 2022, a sharp rally and then a deep pullback in 2024, and a wild 2025 that swung from around 21,700 to a record high near 26,300, driven by geopolitical tensions and tariff shocks (Waves Strategy). Tune a strategy on any one of these phases, and it will usually struggle in the next. Some quant teams use clustering, a type of machine learning that groups similar market conditions together, to spot when the market has changed character. The idea is simple. A system built for a calm, trending market behaves differently when volatility jumps. Noticing that shift early is what separates adaptive systems from rigid ones. A checklist that actually helps If you want your strategy to survive contact with the live market, the workflow matters more than the model. 1. Start with a clear reason. Why should this strategy make money, and who is paying for it? 2. Use clean data. Free of errors, adjusted for corporate actions, and including delisted stocks where possible. 3. Count your tries. Log every version you test. The more versions you tried, the less you should trust the winner. That is the lesson of the Deflated Sharpe Ratio. 4. Use realistic costs. Take commission and slippage numbers from your own past trades, not from software defaults. 5. Freeze a final test set. Keep one period of data untouched until the end, and accept what it tells you. 6. Paper trade first. Run your actual code on live data before risking money. This is where look-ahead bugs and API surprises show up. The timing matters too. SEBI's framework for safer retail participation in algorithmic trading reaches full implementation by April 2026, bringing registered strategies and broker accountability to retail algos (SEBI circular). Market access is becoming professional. Validation habits need to catch up. Structured programmes that combine strategy research with live execution training are one way to build that discipline. Conclusion The gap between a good-looking backtest and a strategy that survives live markets is not closed by smarter algorithms or more data. The research points to something simpler: honest testing. Count your tries. Price in real costs. Freeze your test data. Attack your own assumptions before the market does. Most retail traders skip these steps. The SEBI numbers show what that costs. This article is not investment advice. Trading in derivatives carries a high risk of loss. Past performance, real or simulated, does not indicate future results. About the Author: Ishan Shah Ishan Shah is the Lead, Research and Content at Quantra by QuantInsti, specialising in statistical arbitrage, systematic trading, and quantitative strategy development. He has prior experience with Barclays and Bank of America Merrill Lynch, and has co-authored Machine Learning for Trading. He has spoken at various workshops organized by PyData Mumbai, SGX, IBKR Campus, Zerodha Varsity, Face2Face Conclave. Ishan is known for simplifying complex trading concepts and helping learners build, test, and improve algorithmic trading strategies using statistics, data, and disciplined research.