Skip to content
Back to skills

Crypto Backtest

ASecurity

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.

  • 21 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added September 7, 2026
businesspythonbashtestingapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill crypto-backtest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crypto Backtest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Crypto Backtest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-crypto-backtest/badge)](https://www.skillsdirectory.com/skills/modbender-crypto-backtest)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: crypto-backtest
description: 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.
---

# Crypto Backtest Engine

Fast, scriptable backtesting for crypto futures strategies. Fetches data via ccxt, runs strategies, reports metrics.

## Quick Start

```bash
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
```bash
python scripts/backtest_engine.py \
  --symbol SOL/USDT:USDT \
  --strategy rsi \
  --period 14 --oversold 30 --overbought 70 \
  --capital 1000 --leverage 5
```

### Parameter Sweep
```bash
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 Bands
- `scripts/sweep.py` — Multi-strategy parameter sweep runner
- `references/custom_strategy.md` — Guide for adding custom strategies
- `references/strategy_notes.md` — Notes on each built-in strategy's edge cases

Files in this skill

  • SKILL.md2.1 KB
  • references/custom_strategy.md1 KB
  • references/strategy_notes.md1.2 KB
  • scripts/backtest_engine.py16.1 KB
  • scripts/sweep.py3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.