backtest-expert
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating…
Calculate risk-based position sizes for long stock trades. Use when user asks about position sizing, how many shares to buy, risk per trade, Kelly criterion, ATR-based sizing, fractional-share sizing, or portfolio risk allocation. Supports stop-loss distance calculation,
Claude Code
$ npx -y skills add tradermonty/claude-trading-skills --skill position-sizer --agent claude-code
Codex
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a codex -y
Cursor
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a cursor -y
Gemini CLI
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a gemini-cli -y
GitHub Copilot
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a github-copilot -y
OpenCode
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a opencode -y
Windsurf
$ npx skills add tradermonty/claude-trading-skills --skill position-sizer -a windsurf -y
name: position-sizer description: Calculate risk-based position sizes for long stock trades. Use when user asks about position sizing, how many shares to buy, risk per trade, Kelly criterion, ATR-based sizing, fractional-share sizing, or portfolio risk allocation. Supports stop-loss distance calculation, volatility scaling, and sector concentration checks.
Calculate the optimal number of shares to buy for a long stock trade based on risk management principles. Supports three sizing methods:
All methods apply portfolio constraints (max position %, max sector %) and output a final recommended share count with full risk breakdown. The default output is whole shares. Use `--fractional` only when the user's broker supports fractional shares for the security and order type.
Collect from the user:
If the user provides a stock ticker but not specific prices, use available tools to look up the current price and suggest entry/stop levels based on technical analysis.
Run the position sizing calculation:
# Fixed Fractional (most common) python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 100000 \ --entry 155 \ --stop 148.50 \ --risk-pct 1.0 \ --output-dir reports/ # Fractional shares for small accounts or high-priced stocks python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 1000 \ --entry 155 \ --stop 148.50 \ --risk-pct 1.0 \ --fractional \ --share-precision 4 \ --output-dir reports/ # ATR-Based python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 100000 \ --entry 155 \ --atr 3.20 \ --atr-multiplier 2.0 \ --risk-pct 1.0 \ --output-dir reports/ # Kelly Criterion (budget mode - no entry) python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 100000 \ --win-rate 0.55 \ --avg-win 2.5 \ --avg-loss 1.0 \ --output-dir reports/ # Kelly Criterion (shares mode - with entry/stop) python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 100000 \ --entry 155 \ --stop 148.50 \ --win-rate 0.55 \ --avg-win 2.5 \ --avg-loss 1.0 \ --output-dir reports/
Read `references/sizing_methodologies.md` to provide context on the chosen method, risk guidelines, and portfolio constraint best practices.
If the user has not specified a single method, run multiple scenarios for comparison:
Add constraints if the user has portfolio context:
python3 skills/position-sizer/scripts/position_sizer.py \ --account-size 100000 \ --entry 155 \ --stop 148.50 \ --risk-pct 1.0 \ --max-position-pct 10 \ --max-sector-pct 30 \ --current-sector-exposure 22 \ --output-dir reports/
Explain which constraint is binding and why it limits the position.
Present the final recommendation including:
In ATR mode, the script rounds the derived stop to cents and uses the distance from entry to that reported stop for share sizing and `final_risk_*`. The rounded stop must be positive and below entry. In risk-percentage mode (no Kelly inputs), when both `--stop` and `--atr` are supplied, the ATR-derived stop appears in `parameters.stop_price` and takes precedence over `--stop`. In Kelly shares mode the stop (or entry price) drives shares and risk instead, and ATR inputs are ignored (Kelly budget mode takes no prices and reports no risk figures). Risk dollars and percentage round half-up (ties report the larger risk).
{
"schema_version": "1.0",
"mode": "shares",
"parameters": {
"entry_price": 155.0,
"account_size": 100000,
"stop_price": 148.50,
"risk_pct": 1.0
},
"calculations": {
"fData handling: Privacy policy · Security policy Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating…
This skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the…
Generate Minervini-style breakout trade plans from VCP screener output with worst-case risk calculation, portfolio heat…
Screen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user requests CANSLIM stock screening, growth…
Synthesize the three Jason Shapiro contrarian-pipeline verdicts (COT crowding, news-reaction failure, weekly price-action…
Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason…
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .…
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .…