Crypto Backtest
v1.0.0Crypto futures backtesting engine with built-in EMA, RSI, MACD, and Bollinger Band strategies. Fetches OHLCV data from any ccxt-supported exchange (Bybit, Bi...
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the included code and SKILL.md. The code fetches OHLCV via ccxt and implements EMA, RSI, MACD, and Bollinger strategies and a sweep runner — all coherent with a backtest engine. No unexpected binaries or credentials are required.
Instruction Scope
SKILL.md instructs installing ccxt and numpy and running the provided scripts. The runtime instructions and the code operate only on market data fetched via ccxt and local parameter configs; there are no instructions to read unrelated system files, exfiltrate data to third-party endpoints, or access secrets.
Install Mechanism
There is no packaged install spec. The README suggests 'pip install ccxt numpy' which is a standard PyPI install for this functionality. No downloads from arbitrary URLs or archive extraction are used.
Credentials
The skill declares no required environment variables or credentials. That fits the code, which uses ccxt for public OHLCV fetches. Note: ccxt supports private APIs (requiring API keys) for trading/account endpoints — those are not needed for this skill unless the user modifies the code to call private endpoints.
Persistence & Privilege
always is false and the skill does not request persistent agent privileges. It writes only local output files (results JSON) as expected. It does not modify other skill configurations or system-wide settings.
Assessment
This skill appears to be what it claims: a local backtesting engine that pulls public market data via ccxt, runs strategies, and writes JSON results. Before running: (1) review the included Python files locally (no obfuscation or hidden endpoints were found), (2) run pip installs in a virtual environment to avoid contaminating your system Python, (3) be aware it will make network requests to exchanges (rate limits apply), (4) do not provide exchange API keys unless you understand and intend to call private endpoints, and (5) treat backtest outputs as exploratory — validate any promising strategies with paper trading before risking real funds. Also check the included scripts for any syntax errors or truncation in your copy (the prompt excerpt was truncated in places; ensure the repository files are complete before use).Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
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
Files
5 totalSelect a file
Select a file to preview.
Comments
Loading comments…
