Calculates position sizes using fixed-fractional risk, Kelly criterion, volatility-target sizing, and risk-of-ruin. Supports equities, futures, options, and crypto with lot/contract multipliers and margin.
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-size)The single most important number in a trade is its size. This skill never guesses it.
python3 scripts/size.py risk --equity 50000 --entry 120 --stop 114 --risk-pct 1
python3 scripts/size.py risk --equity 50000 --entry 120 --stop 114 --risk-amount 400 --target 135
python3 scripts/size.py risk --equity 2000000 --entry 22500 --stop 22350 --lot 50 --margin-pct 12 # futures lot
python3 scripts/size.py risk --equity 10000 --entry 64000 --stop 61000 --fractional --lot 0.0001 # crypto
python3 scripts/size.py table --equity 50000 --entry 120 --stop 114 # 0.25% .. 2% side by side
python3 scripts/size.py kelly --win-rate 0.45 --payoff 2.2
python3 scripts/size.py vol --equity 100000 --price 50 --annual-vol 35 --target-vol 10
python3 scripts/size.py ruin --win-rate 0.45 --payoff 2 --risk-pct 1 --ruin-pct 30
--equity defaults to config account.equity; --risk-pct defaults to risk.risk_per_trade_pct.
qty = floor_to_lot( equity x risk% / (|entry - stop| x multiplier + fee_per_unit) ),
then capped by --max-position-pct and --cash. The output names the binding constraint
(risk, max_position or cash) - when it is not "risk", the actual risk is lower than requested.
--multiplier = point value per contract unit, --lot = exchange lot size,
--margin-pct = margin as % of notional (affects capital required, not risk).--multiplier = contract size.--fractional --lot 0.0001.table when the user is unsure - it makes the trade-off visible
(losses_to_-20% = losing streak that produces a 20% drawdown).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)scripts/_vendor/tradekit/cli.py (opens in a new tab)scripts/_vendor/tradekit/config.py (opens in a new tab)scripts/_vendor/tradekit/data.py (opens in a new tab)scripts/_vendor/tradekit/disclosures.py (opens in a new tab)scripts/_vendor/tradekit/expr.py (opens in a new tab)scripts/_vendor/tradekit/feeds.py (opens in a new tab)scripts/_vendor/tradekit/frame.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
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-backtestBacktest trading strategies written as simple rules on one or many symbols in any market - next-bar-open execution with no look-ahead, commissions and slippage, ATR/percent/rule-based stops, R or percent targets, trailing stops, time exits, risk-based position sizing, max concurrent positions with ranking, benchmark comparison, in-sample vs out-of-sample split and a self-contained HTML report. Use when the user asks "does this strategy work", "backtest X", "test a moving-average crossover", "what if I bought when RSI was below 30", or wants to validate an idea before trading it./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./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-dataFetch price history (OHLCV bars) and quotes for stocks, ETFs, indices, forex, futures and crypto in any market - free via Yahoo Finance with no API key, from local CSV files, or from a broker feed. Use when the user asks for a price, chart data, historical candles, intraday bars, wants to download or export data to CSV, or when another skill needs data. Handles daily, weekly, monthly and intraday intervals./trading-earningsEarnings analyst for any listed company - quarterly revenue, gross, operating and net margins, net income and diluted EPS, each quarter against the same quarter a year earlier, trailing twelve months, and plain-words notes (one-off gains, derived quarters, data that lags). Yahoo Finance fundamentals for every market (US, India NSE/BSE, UK, Europe, Japan...) and SEC EDGAR XBRL filings for US companies, free with no API key. Use when the user asks "how were the results", "analyze TCS earnings", "is revenue growing", "compare margins", "what changed this quarter", "check the 10-Q", "sum up the call", or before trading a stock around its results./trading-skills:trading-sizefrom trading-skills
npx claudepluginhub reddygopalkrishna/trading-skills --plugin trading-skills