freqtrade-backtester
БесплатноБез исполняемых скриптовНе проверенRun Freqtrade backtests for cryptocurrency trading strategies, interpret results, and iterate. Use when downloading historical data, running a backtest…
от djc00p1 283 установки в других каталогахОб этом скилле
Freqtrade Backtester
Run backtests on your trading strategies, interpret results, and iterate safely before going live.
What Backtesting Does
Before You Run: Keys and Scope
Use this skill only for explicit Freqtrade backtesting work. It is not a general trading-assistant skill; it should activate for backtest, hyperopt, and strategy-validation requests specifically.
Never paste exchange API secrets into a chat, a file committed to git, or an issue. Backtesting against live exchange data needs read access only:
- Use read-only / trading-disabled API keys. A backtest never needs the ability to place orders.
- Disable withdrawal permission on the exchange key entirely.
- Keep keys in the environment or a gitignored
.env, never in a committed config file. - Scope the key to the single exchange and account you need, and revoke it when the backtesting work is done.
If the task does not actually require authenticated exchange access, use Freqtrade's bundled historical data instead of connecting to an exchange at all.
Backtesting runs your strategy against historical market data to see how it would have performed. It shows you win rates, losses, drawdowns, and exit reasons — everything you need to decide if a strategy is worth trading with real money.
Download Data
Historical data is cached, so download once and reuse it for many backtests.
⚠️ Download one pair at a time — passing multiple pairs to --pairs can cause errors. Run the command separately for each pair:
docker-compose run --rm freqtrade download-data \
--exchange kraken \
--pairs BTC/USDT \
--timeframe 5m \
--timerange 20240101-
Replace the pair, timeframe, and timerange as needed. The --timerange format is YYYYMMDD-YYYYMMDD; omit the end date to download through today.
Run a Backtest
docker-compose run --rm freqtrade backtesting \
--strategy YourStrategy \
--timerange 20240101-20260101 \
--export trades \
--export-filename user_data/backtest_results/my_backtest.json
Replace YourStrategy with your actual strategy class name. The --export trades flag creates a JSON file with detailed trade logs.
Key Metrics
- Win rate — Percentage of winning trades. >55% is decent; >60% is strong.
- Max drawdown — Largest peak-to-trough decline. Keep it <20%; above 25% indicates excessive risk.
- Sharpe ratio — Risk-adjusted return. >1.0 is acceptable; >2.0 is excellent.
- Avg profit per trade — Average win/loss size. Wins should be larger than losses.
- Exit reasons — Breakdown of why trades closed (ROI, stop-loss, trailing stop, etc.).
The Key Insight
High win rate ≠ profitability. A 70% win rate with 5% average loss per trade loses money. A 40% win rate with 2% average wins and 1% average loss is profitable. Control your losses; the wins take care of themselves.
Example: A strategy with tight stops (-3%) outperforms one with loose stops (-7% or -8%), even if the loose version has more winners.
Iteration Pattern
- Run a backtest on a fixed time period (e.g., 6 months of data).
- Change one parameter (e.g., RSI threshold, stop-loss percentage).
- Backtest the same period again.
- Compare results — did it improve?
- If yes, keep it; if no, revert.
- Repeat until satisfied.
Always test across multiple market conditions (bull runs, bear markets, sideways consolidation) before going live. A strategy that works in one environment often fails in another.
Environment Variables
Freqtrade reads secrets from environment variables at runtime. Use the double-underscore format:
export FREQTRADE__EXCHANGE__KEY=your-api-key
export FREQTRADE__EXCHANGE__SECRET=your-api-secret
In your config.json, set these fields to empty strings:
{
"exchange": {
"key": "",
"secret": ""
}
}
Freqtrade will populate them from the environment at startup.
References
- Reading Results —
references/reading-results.md - Iteration Guide —
references/iteration-guide.md
Установить freqtrade-backtester в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл freqtrade-backtester?
Run Freqtrade backtests for cryptocurrency trading strategies, interpret results, and iterate. Use when downloading historical data, running a backtest, reading backtest output, comparing strategies, or deciding whether a strategy is ready for live trading. Trigger phrases: backtest freqtrade, run backtest, download freqtrade data, compare strategies, is my strategy good, freqtrade results.
Как установить скилл freqtrade-backtester?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл freqtrade-backtester запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic