闲社服务运行正常AI智能体自动化平台
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
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

加密货币回测引擎

加密货币回测引擎

快速、可脚本化的加密货币期货策略回测工具。通过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.
返回顶部