The Backtest That Bought a Day Too Early
I test the strategies people try to sell you. Most of them fail. This is the story of one that looked like the best thing I had ever built, right up until it wasn't.
The setup
Support and resistance is one of the most popular ideas in all of trading. The pitch is that prices bounce off certain levels like a ball off a floor and a ceiling. There are two ways to trade it. You can buy the bounce, betting price will turn back up when it falls to "support." Or you can buy the breakout, betting price will keep running once it pushes up through "resistance." I built both and ran them the way I run everything: as if real money were about to go in, and if the idea fails the test, it becomes a story instead of a strategy.
The bounce died at the door. Before I get excited about any new idea, I run it against the dumbest possible benchmark: would you have done better just buying the fund and holding it? Across eight different ways of defining support on two major index funds, the bounce strategy beat plain buy-and-hold exactly zero times. Its risk-adjusted return, meaning the reward you earn for each unit of stomach-churning you take on (that measure is called the Sharpe ratio), landed between -0.25 and 0.13. Holding scored 0.64 to 0.77. Not close. Buried on the first try.
Breakout was a different animal.
Twelve for twelve
The first result was spectacular. On twelve different funds spanning big tech, small caps, energy, financials, healthcare, utilities, bonds, and gold, the breakout beat buy-and-hold on Sharpe every single time. And it did it while shrinking the drawdown, meaning the worst peak-to-bottom loss you would have had to sit through, from the brutal fifty-percent-plus of holding stocks down into the single digits. On QQQ, the big Nasdaq fund, it posted a Sharpe near 1.2. That is hedge-fund territory. If it were real.
The rule I hold myself to
Here is the rule that keeps me honest: a backtest that passes is not proof. A backtest that survives a deliberate hunt for its own bugs is. A green result is a suspect, not a witness. So instead of celebrating, I spent the next several days trying to kill my own best idea.
It passed gate after gate.
It beat random. I swapped the real breakout signal for coin-flip entries at the same trade frequency. The real signal won by a clear margin, so the timing carried actual information. It wasn't luck.
It reconciled. I rebuilt the whole thing from scratch with honest cash accounting, where idle money earns the real Treasury-bill rate instead of sitting at zero. The strong number held.
It worked everywhere. Not one lucky fund. Twelve out of twelve.
It had no knife-edge. When I nudged the settings up and down, the results changed smoothly instead of falling off a cliff. That is the difference between a real effect and a number I accidentally curve-fit to one perfect combination of settings.
It worked in every era. Strong in the early years, strong in the late years.
Five hard tests, five passes. At this point I was most of the way to believing it.
The one test it failed
Then I ran the test that actually matters, and the whole thing came apart in a single line.
The test could not be simpler: delay every entry by one day. If an edge is real, waiting until tomorrow morning to buy should barely move the result. A genuine edge does not evaporate because you were patient for twenty-four hours.
This one evaporated. Energy dropped from a Sharpe of 1.28 to -0.10. Small caps dropped from 1.11 to -0.06. A one-day delay turned a star into a loser. That is not a small crack in the foundation. That is the discovery that there was never a foundation.
What was really happening
The bug has a name: look-ahead bias. It means the backtest used information it could not possibly have had at the moment it claimed to act.
Here is exactly how it happened. A breakout "signals" when the price closes above the resistance level, and you only know that closing price at the end of the trading day. But my code was buying at that same day's opening price, hours before the close that was supposed to trigger the buy. It was reacting to news it hadn't heard yet. Every trade got in at a price that was, on average, better than anything a real person could have gotten, because a real person has to wait for the close to confirm the signal and then buy the next morning.
The receipt
I don't ask you to take my word for this, and I didn't take my own. I built a ledger that runs the identical strategy two ways and prints the trades side by side.
One version, call it the peek, buys the morning of the breakout, at the price that already printed before the signal was even real. The other, the honest one, buys the next morning, at the first price a real trader could actually get. Same rules, same signals, same everything. The only difference is the moment you are allowed to press buy.
On synthetic test data the gap is almost comical. The peek scores a Sharpe of 1.52. The honest version scores -0.38. That entire swing comes from nothing but the one-day difference. On real QQQ, the honest version gave back about 2.4 percent per trade compared to the peek. That number is the whole "edge." It was never profit. It was a head start no real trader is ever allowed to have.
Add it all up and QQQ's Sharpe falls from 1.19 to 0.52. Now remember what plain buy-and-hold scored: right around 0.7. So the honest version of my spectacular strategy doesn't just lose its shine. It loses to doing nothing.
Breakout is in the graveyard. Not because the idea is stupid, but because the only version of it that made money was a version that cheated by one day, and I could not build an honest version that beat the couch.
When someone shows you a backtest, the question is never "does it look good." The question is "what happens if you make it wait one day." If the magic disappears, it was never magic.