The scariest bug in a backtest (the thing that estimates a strategy's returns on past price moves) isn't a crash. It's accidentally using tomorrow's price. It's called lookahead bias, and if you let even a sliver of tomorrow's close leak into today's math, your strategy turns into a prophet.

Source: [Dev.to](https://dev.to/jun_uen0/a-backtest-that-cheats-off-tomorrow-wont-fail-code-review-so-i-fired-a-spike-into-the-future-455j)

Sponsored