返回顶部
c

crypto-backtest加密货币回测引擎

Crypto futures backtesting engine with built-in EMA, RSI, MACD, and Bollinger Band strategies. Fetches OHLCV data from any ccxt-supported exchange (Bybit, Binance, OKX, etc.), runs multi-strategy sweeps, calculates win rate / PnL / drawdown, and exports results to JSON. Use when backtesting trading strategies, comparing parameter combinations, evaluating crypto trading signals, or building a quantitative trading pipeline.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,109
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

crypto-backtest

加密货币回测引擎

快速、可脚本化的加密货币期货策略回测工具。通过ccxt获取数据,运行策略,输出指标报告。

快速开始

bash
pip install ccxt numpy
python scripts/backtest_engine.py --symbol ETH/USDT:USDT --strategy ema --fast 12 --slow 26

功能特性

  • - 多交易所支持:所有ccxt支持的交易所(Bybit、Binance、OKX、Bitget等)
  • 内置策略:EMA交叉、RSI、MACD、布林带
  • 参数扫描:自动测试所有参数组合
  • 风险模拟:可配置杠杆、仓位大小、止损/止盈、手续费
  • JSON导出:机器可读结果,便于流水线集成
  • 自定义策略:简洁的插件式接口

使用方法

单一策略

bash python scripts/backtest_engine.py \ --symbol SOL/USDT:USDT \ --strategy rsi \ --period 14 --oversold 30 --overbought 70 \ --capital 1000 --leverage 5

参数扫描

bash python scripts/sweep.py \ --symbol ETH/USDT:USDT \ --strategies ema,rsi,macd,bbands \ --capital 1000 --leverage 5 \ --output results.json

自定义策略

插件接口说明请参见 references/custom_strategy.md。

输出指标

每次回测报告包含:

  • - 总交易次数、胜率、盈利因子
  • 总盈亏(绝对值+百分比)
  • 最大回撤
  • 最佳/最差交易
  • 最终余额

文件说明

  • - scripts/backtestengine.py — 核心引擎,包含EMA、RSI、MACD、布林带策略
  • scripts/sweep.py — 多策略参数扫描运行器
  • references/customstrategy.md — 添加自定义策略指南
  • references/strategy_notes.md — 各内置策略边界情况说明

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 crypto-backtest-1776419990 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 crypto-backtest-1776419990 技能

通过命令行安装

skillhub install crypto-backtest-1776419990

下载

⬇ 下载 crypto-backtest v1.0.0(免费)

文件大小: 8.37 KB | 发布时间: 2026-4-17 18:44

v1.0.0 最新 2026-4-17 18:44
- Initial release of crypto-backtest: a fast, scriptable backtesting engine for crypto futures.
- Supports fetching OHLCV data from any ccxt-supported exchange (Bybit, Binance, OKX, and more).
- Includes built-in EMA crossover, RSI, MACD, and Bollinger Band strategies.
- Enables multi-strategy parameter sweeps with automatic metric reporting (win rate, PnL, drawdown, etc.).
- Exports machine-readable backtest results to JSON for integration with trading pipelines.
- Simple plug-in interface for custom strategies.

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

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

p2p_official_large
返回顶部