Backtests trading strategies written as simple rules on any market with realistic execution, stops, position sizing, and a self-contained HTML report. Use when validating a strategy idea before trading.
Ships in trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
trading-backtest)Test the idea on history before risking money. Honest defaults: costs on, no look-ahead, caveats printed.
python3 scripts/backtest.py --spec assets/strategies/rsi2-pullback.json --universe AAPL,MSFT,NVDA,AMZN,GOOGL \
--oos-start 2021-01-01 --report rsi2.html
python3 scripts/backtest.py SPY --entry "cross_above(sma(50), sma(200))" --exit "cross_below(sma(50), sma(200))" \
--stop none --start 2005-01-01 --report golden_cross.html
python3 scripts/backtest.py --spec my.json --universe list.txt --set n=20 --set mult=3
python3 scripts/backtest.py --spec my.json --csv-dir ./data --universe A,B,C --trades-csv trades.csv --json
Example strategies: assets/strategies/*.json (RSI-2 pullback, Donchian breakout, golden cross,
VCP-style breakout, Bollinger mean reversion, Supertrend trend-follow).
../trading-scanner/references/rule-language.md. Validate rules with screen.py --check.--period 10y default, or --start) and several symbols, not one hand-picked chart.--oos-start (e.g. the last 30% of the period) and compare in- vs out-of-sample.--report and send the HTML to the user.--set. If results collapse when a parameter moves slightly,
the edge is not robust - say so.Lead with: return vs benchmark, max drawdown vs benchmark, number of trades, avg R, and the out-of-sample verdict. Always include the printed caveats. Never describe backtest returns as expected future returns, and never recommend live trading on fewer than ~100 trades of evidence.
assets/strategies/bollinger-reversion.json (opens in a new tab)assets/strategies/donchian-breakout.json (opens in a new tab)assets/strategies/golden-cross.json (opens in a new tab)assets/strategies/rsi2-pullback.json (opens in a new tab)assets/strategies/supertrend-follow.json (opens in a new tab)assets/strategies/vcp-breakout.json (opens in a new tab)references/strategy-spec.md (opens in a new tab)scripts/_vendor/tradekit/__init__.py (opens in a new tab)scripts/_vendor/tradekit/alerts.py (opens in a new tab)scripts/_vendor/tradekit/analysis.py (opens in a new tab)scripts/_vendor/tradekit/backtest.py (opens in a new tab)scripts/_vendor/tradekit/brokers/__init__.py (opens in a new tab)scripts/_vendor/tradekit/brokers/_rest.py (opens in a new tab)scripts/_vendor/tradekit/brokers/base.py (opens in a new tab)scripts/_vendor/tradekit/brokers/dhan.py (opens in a new tab)scripts/_vendor/tradekit/brokers/fyers.py (opens in a new tab)scripts/_vendor/tradekit/brokers/groww.py (opens in a new tab)scripts/_vendor/tradekit/brokers/kite.py (opens in a new tab)scripts/_vendor/tradekit/brokers/paper.py (opens in a new tab)scripts/_vendor/tradekit/brokers/upstox.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
21 skills in this plugin
/trading-alertsPrice alerts for any market - above or below a price, a trade's stop and target (long or short), a percent move from the previous close, a time on the exchange clock, the opening bell and minutes before the close, plus stop and target alerts for every open trade in the journal in one go. Works out each exchange's session from the data (NYSE, Nasdaq, NSE, BSE, LSE, TSE...) so holidays need no tables; each alert rings once; optional desktop notifications. Use when the user says "alert me when", "tell me if RELIANCE crosses 1400", "watch my stop", "remind me to close by 3:20", "is the market open", "when does NSE open", or right after a trade is planned or opened./trading-brokerPlace, cancel and track orders through the paper broker (default, simulated) or a connected live broker (through its adapter) using a two-step preview-and-confirm flow tied to a trading-risk approval, with protective stop-loss/take-profit, position and account views, broker-side GTT stops, a kill switch to halt all trading and paper fill processing that keeps the journal in sync. Use when the user wants to buy, sell, enter, exit, close, cancel, check positions/orders/balance, halt trading, or practise with paper trading.Other plugins' skills for the same job
/trading-chartTechnical analysis of any stock, ETF, index, forex pair or crypto - trend stage, moving averages, RSI, MACD, ADX, ATR, Bollinger squeeze, Supertrend, volume/OBV, 52-week range, support and resistance levels, and daily vs weekly agreement, rolled into a -100..+100 bias score with reasons. Use when the user asks "what does the chart say", "is X bullish", "analyze X", for support/resistance, indicator values, or wants to test a rule such as price above its 200-day average on a symbol./trading-skills:trading-backtestfrom trading-skills
npx claudepluginhub reddygopalkrishna/trading-skills --plugin trading-skills