Back to catalog / Crypto quant research
Train a FreqAI model and backtest rolling windows
Configure FreqAI features and targets, retrain over historical windows, and export strategy results for a separate time range.
Goal
Run a reproducible FreqAI backtest and verify the models trained in each window against their subsequent predictions.
Steps
- Start from FreqaiExampleStrategy and config_freqai.example.json; set LightGBMRegressor, freqai.identifier, and the training window. Ensure features and labels use only information available at each point. [freqai]
- Download data covering train_period_days, startup_candle_count, and the test interval so the first test candle has sufficient training history. [running]
- Run freqtrade backtesting --strategy FreqaiExampleStrategy --strategy-path freqtrade/templates --config config_examples/config_freqai.example.json --freqaimodel LightGBMRegressor --timerange 20210501-20210701; save the config and result. [running]
How to verify
Confirm logs show a model trained for each backtest window; check that the first test candle follows the available training history and that results match the chosen identifier.
Troubleshooting
For missing-history errors, extend the downloaded range or pre-test training data. If a rerun retrains unexpectedly, inspect identifier and model cache. Do not deploy the example strategy live.
Permissions
Prerequisites
- Install Freqtrade with FreqAI dependencies; download historical market data covering both training and backtest windows; start from the example config and LightGBMRegressor.
Permissions
- Backtesting reads public historical market data and trains/saves models locally; downloading may contact public exchange endpoints. No account key, account connection, or order submission is required.
Limitations
The FreqAI example strategy is for demonstration, not production. Rolling historical backtests do not prove future predictive power and are not trading signals.
Pinned upstream source
- Repository
- freqtrade/freqtrade
- File path
- docs/freqai-running.md
- Pinned commit
82e4c9604c51523f7e05c5a297167cf2b13a2129- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: GPL-3.0
Main topic
Build a reproducible crypto research workflow