Backtesting Trading Strategies
ListedSimulates past trades to evaluate strategy performance and risk, helping users refine their plans for future profitability.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add gracefullight/stock-checker --skill backtesting-trading-strategies -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
gracefullight
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No undeclared network calls: failed
Contacts 1 host that is neither well-known infrastructure nor declared in the skill's frontmatter: api.coingecko.com.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
api.coingecko.comundeclaredWhat it found
- .agents/skills/backtesting-trading-strategies/scripts/fetch_data.py:81contacts api.coingecko.com
url = f"https://api.coingecko.com/api/v3/coins/{coin_id}/market_chart"
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned gracefullight/stock-checker at 40a4dcb82e.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 40a4dcb82e
- Scanned
- 10 files, 2,010 lines
About this skill
What it does
This skill allows AI agents to backtest trading strategies against historical data, simulating past trades to evaluate performance and risk before deploying them with real capital. It provides a complete framework including eight pre-built strategies, comprehensive performance metrics, and parameter optimization capabilities. The tool helps users refine their trading plans by analyzing trade history and identifying optimal strategy settings.
When to use it
- Strategy Validation: Before risking real money, test the viability of a new or modified trading strategy.
- Parameter Optimization: Fine-tune existing strategies by finding the best parameter combinations for maximum profitability and acceptable risk.
- Performance Analysis: Understand how a strategy performed in the past, including key metrics like Sharpe Ratio, Sortino Ratio, and Maximum Drawdown.
- Risk Assessment: Evaluate potential risks associated with a trading strategy through metrics such as Value at Risk (VaR) and Conditional Value at Risk (CVaR).
Key capabilities
- 8 Pre-built Trading Strategies: SMA, EMA, RSI, MACD, Bollinger Bands, Breakout, Mean Reversion, Momentum.
- Performance Metrics: Sharpe Ratio, Sortino Ratio, Calmar Ratio, VaR, CVaR, Max Drawdown, Total Return, CAGR, Volatility.
- Trade-by-trade Analysis: Detailed log of individual trades with profit/loss information.
- Equity Curve Visualization: Graphical representation of portfolio value over time.
- Parameter Grid Search Optimization: Automated search for optimal strategy parameters.
Example prompts
- "Run a backtest on the SMA crossover strategy for BTC-USD using the last year of data."
- "Optimize the RSI reversal strategy for ETH-USD, varying the period and overbought/oversold levels."
- "Show me the performance metrics (Sharpe Ratio, Max Drawdown) for the Bollinger Bands strategy applied to BTC-USD over a two-year period."
Tips & gotchas
- Dependencies: Requires
pandas,numpy,yfinance, andmatplotlib.ta-lib,scipy, andscikit-learnare optional for advanced features. Install these usingpip install .... - Data Fetching: The skill automatically caches historical data to avoid repeated downloads. Ensure the correct symbol and period are specified when fetching data.
- Parameter Formatting: When specifying custom parameters, use a valid JSON string format (e.g.,
'{"period": 14, "overbought": 70}').