Last time we buried the 80% win-rate vanity metric. Today’s war story is the one that almost cost me real money, because this time the lie wasn’t on a marketing banner โ it was in my own code, and it was beautiful.
I built a strategy, ran the backtest, and stared at the screen. +400% over the test period. Sharpe above 3. A near-perfect equity curve climbing into orbit. Every instinct screamed “deploy it.” I was one click away from putting real capital behind it.
Something felt too clean. Real edges are noisy. This was a straight line to heaven. So before funding it, I did the boring thing: I audited the data pipeline. And there it was โ the bot was cheating. It could see the future.
Look-ahead bias is when your backtest uses information that would not have existed at the moment of the decision. It’s the most common โ and most expensive โ bug in algorithmic trading, and it hides in one innocent line.
A classic version: you decide to enter a trade “at the open of the candle,” but your signal is calculated from that same candle’s close. In a backtest that’s trivial to do by accident โ the whole candle is sitting right there in your dataframe. In live trading it’s impossible: the close hasn’t happened yet. Your backtested bot was effectively buying knowing where the price would end up.
Other flavors: indicators normalized over the entire dataset (including future bars), filling missing data with values that arrive later, or labeling outcomes with information from the future. Every one of them paints a gorgeous curve that evaporates the instant you trade it live.
Ask an AI assistant to “improve my backtest results” and it will happily oblige โ refactoring, vectorizing, “optimizing.” It does not know that your data pipeline quietly leaks the future, and it will cheerfully hand you an even prettier curve. The prettier the backtest, the harder you should hunt for the leak. AI amplifies whatever you point it at โ including your own mistakes.
I threw out the in-sample fantasy and built a strict harness:
Run through that meat grinder, my 400% fantasy collapsed to a modest, honest number โ and that honesty is exactly why the version we run live does ~56% win rate and stays in the green. A boring backtest you can trust beats a beautiful one that lies.
I teach this harness โ and how to make AI build it with you instead of fooling you โ in the course. First module free, and the live numbers are public, drift and all:
๐ https://nexus-bot.pro/ โ build your own bot with Claude Code, no black box. ๐ Live results (the honest version): https://nexus-bot.pro/proof/rvv/
Next war story: the “AI” that was just three if-statements in a trench coat.