Wickfleet

Check a Freqtrade strategy for lookahead bias

A backtest with lookahead bias uses candles the bot could not have seen at the time. The result looks excellent, and the running bot never repeats it. This page covers where the bias comes from, how to find it with Freqtrade's own tools, and how Wickfleet runs those checks before a bot starts.

Where it comes from

Freqtrade's own checks

freqtrade lookahead-analysis --strategy MyStrategy --timerange 20250101-20260101
freqtrade recursive-analysis --strategy MyStrategy --timerange 20250101-20260101
CommandFinds
lookahead-analysissignals that change when the data after them is cut away. It needs trades to check, 10 by default (--minimum-trade-amount), so a strategy that barely trades cannot be judged
recursive-analysisindicator values that depend on how much history was loaded, which makes a backtest and a running bot disagree. It checks one pair, the first in the whitelist unless -p names another, and Freqtrade recommends a range of at least 5000 candles

What Wickfleet does with them

A replay in Wickfleet is a backtest of one bot on its real config, so fees and stake match the bot. After the backtest, two more steps run on the same data.

CheckResult
Lookahead analysis, run with a minimum of 5 tradesa bias blocks a new bot with those settings
Too few trades to judgeshown as a warning on a dry run. It blocks live trading
Recursive analysis, drift above 0.1% at the strategy's own startupshown as a warning
Replay summary with bias checks and robustness verdict, amounts blurred
A replay with its bias checks and robustness verdict

Beyond bias: the robustness verdict

A backtest without bias can still be luck. Every replay also gets a verdict from its own trades, with no extra run.

CheckPass rule (defaults)
Walk-forward windowsthe range splits into 30-day windows. At least 6
Totalnet profit over the replay above 0
Consistencyat least half the windows profitable
Worst windowno window below -15%
Monte Carlo10,000 resamples of the trades. At most 5% reach a 50% drawdown. Under 20 trades it is shown, not judged

A failed verdict warns on a dry-run bot. It is the gate for live trading: a bot with real money needs a replay of exactly its settings from the last 7 days, with a clean lookahead result and this verdict passed. An inconclusive result blocks live trading but only warns on a dry run, and FreqAI bots cannot go live yet. The hub checks it when the bot is saved and again before it starts the live container, also for a bot file committed straight to the registry.

A clean check does not make a strategy good. It says the backtest did not cheat, nothing more.

Try it

git clone https://github.com/wickfleet/wickfleet.git
cd wickfleet
make quickstart

Needs Docker with Compose v2, git and make, on macOS or Linux. Everything runs on one machine, bound to 127.0.0.1, and a dry-run demo bot is waiting in the fleet. More in the install guide.

More on running a fleet

Wickfleet is software for running trading bots, not a recommendation to buy or sell anything. Backtests and replays describe the past, not the future. Every bot is a dry run on a simulated wallet by default.