Financial time series data is rarely perfect. Missing ticks, market holidays, and system outages leave gaps that can ruin a Backtesting engine.
The Dangers of Lookahead Bias
When imputing data, the most common mistake is using future data to fill past gaps (e.g., standard forward-backward interpolation). In Quant Trading, this creates a lookahead bias, making your strategy look artificially profitable in backtests but fail in live trading.
Best Practices
Always use forward-fill (ffill in Pandas) for prices, because you can only know the last traded price. For volume, fill with zero. Never interpolate financial prices linearly!