
Backtesting Trading Strategies
A proper backtesting framework that handles the tedious parts: fetching historical data, running eight common strategies (SMA, RSI, MACD, Bollinger bands, etc.), and calculating the metrics you actually care about like Sharpe ratio, max drawdown, and win rate. The parameter optimization via grid search is genuinely useful for finding which moving average periods or RSI thresholds work best. Everything outputs to reports with equity curves, trade logs, and performance summaries. Built on yfinance and pandas, so it's straightforward Python without exotic dependencies. The honest limitation is that backtesting always looks better than live trading, but at least this gives you a systematic way to eliminate bad ideas before risking capital. Good for both crypto and traditional assets if you want to validate a signal or compare different approaches.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 9
- skills.sh installs
- 4.2K
- GitHub stars
- 2.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill backtesting-trading-strategies --agent claude-codeInstalls into .claude/skills of the current project.
Files
Backtesting Trading Strategies
Overview
Simulate trading strategies against historical data. Results describe a historical simulation, not expected future performance. The framework includes 8 built-in strategies, the metrics listed below, and parameter optimization.
Key Features:
- 8 pre-built trading strategies (SMA, EMA, RSI, MACD, Bollinger, Breakout, Mean Reversion, Momentum)
- Performance metrics (Sharpe, Sortino, Calmar, VaR, max drawdown)
- Parameter grid search optimization
- Equity curve visualization
- Trade-by-trade analysis
Prerequisites
Before invoking this skill, the user installs the required dependencies in the Python environment used for the simulation:
set -euo pipefail
pip install pandas numpy yfinance matplotlib
Optional for advanced features:
set -euo pipefail
pip install ta-lib scipy scikit-learn
Instructions
-
Fetch historical data (cached to
${CLAUDE_SKILL_DIR}/data/for reuse):python ${CLAUDE_SKILL_DIR}/scripts/fetch_data.py --symbol BTC-USD --period 2y --interval 1d -
Run a backtest with default or custom parameters:
Sponsors
Details
- Repository
- github.com/jeremylongshore/claude-code-plugins-plus-skills
- Categories
- Testing & QA, Debugging, Finance & Trading