/install crypto-backtest
Crypto Backtest Engine
Fast, scriptable backtesting for crypto futures strategies. Fetches data via ccxt, runs strategies, reports metrics.
Quick Start
pip install ccxt numpy
python scripts/backtest_engine.py --symbol ETH/USDT:USDT --strategy ema --fast 12 --slow 26
Features
- Multi-exchange: Any ccxt-supported exchange (Bybit, Binance, OKX, Bitget...)
- Built-in strategies: EMA crossover, RSI, MACD, Bollinger Bands
- Parameter sweep: Test all combinations automatically
- Risk simulation: Configurable leverage, position size, SL/TP, fees
- JSON export: Machine-readable results for pipeline integration
- Custom strategies: Simple plug-in interface
Usage
Single Strategy
python scripts/backtest_engine.py \
--symbol SOL/USDT:USDT \
--strategy rsi \
--period 14 --oversold 30 --overbought 70 \
--capital 1000 --leverage 5
Parameter Sweep
python scripts/sweep.py \
--symbol ETH/USDT:USDT \
--strategies ema,rsi,macd,bbands \
--capital 1000 --leverage 5 \
--output results.json
Custom Strategy
See references/custom_strategy.md for the plug-in interface.
Output Metrics
Each backtest reports:
- Total trades, win rate, profit factor
- Total PnL (absolute + percentage)
- Max drawdown
- Best/worst trade
- Final balance
Files
scripts/backtest_engine.py— Core engine with EMA, RSI, MACD, Bollinger Bandsscripts/sweep.py— Multi-strategy parameter sweep runnerreferences/custom_strategy.md— Guide for adding custom strategiesreferences/strategy_notes.md— Notes on each built-in strategy's edge cases
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install crypto-backtest - After installation, invoke the skill by name or use
/crypto-backtest - Provide required inputs per the skill's parameter spec and get structured output
What is 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, Bi... It is an AI Agent Skill for Claude Code / OpenClaw, with 1132 downloads so far.
How do I install Crypto Backtest?
Run "/install crypto-backtest" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Crypto Backtest free?
Yes, Crypto Backtest is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Crypto Backtest support?
Crypto Backtest is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Crypto Backtest?
It is built and maintained by SunnyZhou (@sunnyztj); the current version is v1.0.0.