← ClaudeAtlas

position-sizinglisted

Position sizing for Indian equity and F&O trades: fixed-fractional risk sizing with round-trip costs included, ATR-based stops, F&O lot rounding and margin checks, MTF/intraday leverage adjustment, gap-through-stop and circuit risk, Kelly from a trade journal, and portfolio limits. risk.py also covers R:R, trailing stops and journal statistics. Use when the user asks: "how many shares should I buy", "position size for X", "how many lots of NIFTY", "how much to invest", "risk per trade", "can I afford one lot", "Kelly criterion", "what's my win rate / expectancy", or any capital-allocation question.
Shubhamkumartrichy/claude-trading-skills-india · ★ 62 · AI & Automation · score 84
Install: claude install-skill Shubhamkumartrichy/claude-trading-skills-india
# Position Sizing Sizing decides survival. Risk a small, fixed fraction of capital per trade so that a losing streak, which will happen, is survivable. ## Calculator ```bash # Equity, structure stop python3 scripts/risk.py size --capital 500000 --risk-pct 1 --entry 1450 --stop 1410 # Equity, ATR stop + gap-risk check for a midcap python3 scripts/risk.py size --capital 500000 --risk-pct 1 --entry 1450 --atr 28 --atr-mult 2 --cap midcap # NIFTY futures: lot rounding + margin python3 scripts/risk.py size --capital 800000 --risk-pct 1 --entry 24950 --stop 24800 --lot-size 65 \ --margin-per-lot 165000 --cost-pct 0.06 # MTF at 3x python3 scripts/risk.py size --capital 300000 --risk-pct 1 --entry 820 --stop 790 --leverage 3 # Win rate / payoff / Kelly from your journal (date,symbol,side,entry,exit,stop,qty,charges | or pnl) python3 scripts/risk.py journal trades.csv ``` `--cost-pct` is the round-trip cost as % of entry. Use about 0.25 for delivery, 0.05 for intraday, and 0.06 for index futures, or compute it exactly with `trading-costs`. Get margin per lot from the broker's margin calculator or the MCP margin tool, because SPAN changes daily. ## Method 1: fixed fractional (default) ``` Risk budget = Capital × Risk% (÷ leverage when using MTF/MIS margin) Units = Budget ÷ (|Entry − Stop| + cost per unit) F&O = floor(Units ÷ lot size) lots ``` | Situation | Risk % per trade | |---|---| | Normal swing/positional, no leverage | 0.5–1% (max 2%) | | New