Free guide · 10 min read

Install freqtrade and run your first backtest

From zero to a completed backtest: install freqtrade, download historical data, and evaluate a strategy on real candles.

1. Install with Docker (recommended)

Docker avoids Python version conflicts and works the same on Windows, macOS, and Linux. Install Docker Desktop first, then pull the official image:

mkdir ft_userdata && cd ft_userdata
docker compose -f https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml config > docker-compose.yml
docker compose pull
docker compose run --rm freqtrade create-userdir --userdir user_data
docker compose run --rm freqtrade new-config --config user_data/config.json

2. Add a strategy file

Drop any strategy .py file into user_data/strategies/. If you downloaded one from Vetta, the class name inside the file is what you pass to --strategy.

3. Download historical data

Backtests need candles. Download a few months of 5m data for the pairs in your config:

docker compose run --rm freqtrade download-data \
  --exchange binance --timeframe 5m --days 180

4. Run the backtest

Read the summary table: total profit, win rate, max drawdown, and profit factor. One good number never proves a strategy — compare several windows, which is exactly what Vetta's research reports do across multiple years.

docker compose run --rm freqtrade backtesting \
  --config user_data/config.json \
  --strategy YourStrategyClassName \
  --timeframe 5m --timerange 20260101-

Common pitfalls

  • Backtesting without fees: always keep the fee setting realistic (Binance spot is 0.1%).
  • Testing only a bull window: include at least one falling-market range.
  • Trusting a strategy that trades 5 times in 6 months: tiny samples prove nothing.

Educational content, not financial advice. Past performance does not predict future results.