Freqtrade backtests
Run one Freqtrade backtest for each parameter set. Your wrapper applies the suggested values before execution, reads the exported report, and prints the metrics you want to compare.
If this is your first integration, run the quickstart first to verify Docker, publishing, and metric collection.
Prepare a repeatable local backtest
Section titled “Prepare a repeatable local backtest”Pin your dependencies to the release you have tested. Package your strategy, configuration, and reproducible data access in Docker. Keep the same dataset, date window, fees, seed, and warmup assumptions across trials. Run the exact container command locally before publishing.
Apply parameters before execution
Section titled “Apply parameters before execution”Freqtrade Hyperopt runs its own optimization workflow wherever you deploy it.
HyperOptimizer manages the outer search, container execution, and results. Each
trial runs one freqtrade backtesting invocation. Do not nest Hyperopt inside it.
Parse your configured --hpo-* flags before starting the backtest. For stoploss or
maximum open trades, write received values into a per-trial configuration copy.
Confirm your strategy does not override them. Indicator parameters must reach the
strategy before indicator construction; accepting a flag alone does not tune it.
Disable cached results with --cache none, use an isolated temporary output
directory, and export trades. Recent versions can export ZIP archives containing
JSON results. Read the result document rather than configuration, metadata, or
an old export. Use the official backtesting documentation
for your pinned version. The report fields below are version-specific; confirm them against the release you pin.
Extract actual results
Section titled “Extract actual results”The exported strategy mapping identifies each strategy report:
| Emitted metric | Report field | Meaning |
|---|---|---|
return_ratio |
profit_total |
Return as a ratio; maximize if this is your objective |
max_drawdown |
max_drawdown_account |
Drawdown as a ratio; minimize |
trade_count |
total_trades |
Check whether the strategy was exercised |
Require the named report and all configured objectives. Reject missing/nonfinite
values, and decide whether no trades should invalidate the run. Never replace
missing metrics with zero. Emit actual numeric values using
json.dumps(value, allow_nan=False) and flush stdout.
Publish, validate, and launch
Section titled “Publish, validate, and launch”Use CLI builds or manual publishing to publish into your workspace registry. Create a project and configure matching parameter slugs and objective names/directions. Review trial count, concurrency, machine size, and timeout using measured local runtime. Validate before explicitly launching. The platform processes the image, packaged data, logs, and metrics needed to run the experiment. Review billing.
Inspect one successful trial before widening the search. Keep a separate holdout time window and realistic cost assumptions. Synthetic data verifies integration, not investment value. Historical results do not predict live returns. Multiple objectives retain their own directions; there is no implicit combined winner.
See debug trials, troubleshooting, and the general Docker workflow.