FREQTRADE / VALIDATION

Freqtrade Lookahead Bias: Find False Backtest Edges

How to detect lookahead bias in Freqtrade before trusting a backtest or moving a strategy into forward PAPER testing.

Why lookahead bias matters

A backtest can become unrealistically strong when a signal, feature or transformation uses information that was not available at the decision timestamp. The strategy may look excellent historically and then collapse in forward execution.

Common ways future data leaks in

Negative shifts, unrestricted dataframe aggregations, unsafe row access and transformations fitted with future observations can contaminate a historical simulation. ML pipelines add another leakage surface through targets, normalization and feature selection.

Our validation order

First verify time ordering and data boundaries. Then run bias checks. Only after the historical test is structurally credible do we care about profitability. A profitable biased backtest is not evidence of an edge.

What comes after the check

Passing a lookahead check does not prove profitability. It only removes one major source of false evidence. The next stage is frozen-version forward PAPER observation.

Before trusting the result

Confirm that data timing is valid, configuration is reproducible, state survives restart, costs are represented and the exact strategy version is preserved. Operational correctness comes before interpreting PnL.

DATA→STRATEGY→RISK→EXECUTION→RECORD

Continue the research