返回顶部
f

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
175
下载量
0
收藏
概述
安装方式
版本历史

freqtrade-backtester

# Freqtrade Backtester Run backtests on your trading strategies, interpret results, and iterate safely before going live. ## What Backtesting Does 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: ```bash 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 ```bash 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 1. Run a backtest on a fixed time period (e.g., 6 months of data). 2. Change **one parameter** (e.g., RSI threshold, stop-loss percentage). 3. Backtest the **same period** again. 4. Compare results — did it improve? 5. If yes, keep it; if no, revert. 6. 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: ```bash export FREQTRADE__EXCHANGE__KEY=your-api-key export FREQTRADE__EXCHANGE__SECRET=your-api-secret ``` In your `config.json`, set these fields to empty strings: ```json { "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`

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 freqtrade-backtester-1776119001 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 freqtrade-backtester-1776119001 技能

通过命令行安装

skillhub install freqtrade-backtester-1776119001

下载 Zip 包

⬇ 下载 freqtrade-backtester v1.0.3

文件大小: 5.98 KB | 发布时间: 2026-4-14 10:22

v1.0.3 最新 2026-4-14 10:22
Fix: Clarified crypto-exclusive scope in description

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部