
Position Sizer
Encode fixed-fractional, ATR, and Kelly-style position sizing so trading bots and dashboards risk the right share count per trade.
Overview
position-sizer is an agent skill most often used in Build (backend) (also Operate iterate) that applies fixed-fractional, ATR, and Kelly position-sizing formulas to cap per-trade risk.
Install
npx skills add https://github.com/tradermonty/claude-trading-skills --skill position-sizerWhat is this skill?
- Fixed Fractional sizing with entry, stop, and account risk formula
- Standard risk-level table from 0.25% through above 2% with trader profiles
- ATR-based and Kelly Criterion methods for volatility-aware sizing
- Emphasis that sizing dominates long-term survival versus stock picking alone
- Worked numeric example ($100k account, entry/stop, share integer truncation)
- Documents 3 primary sizing methods: Fixed Fractional, ATR-based, and Kelly Criterion
- Standard risk-level table spans 0.25–0.50% through greater than 2.00%
Adoption & trust: 596 installs on skills.sh; 1.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You can pick entries and stops but have no consistent rule for how many shares to buy without risking ruin on one bad trade.
Who is it for?
Builders adding risk management to trading scripts, SaaS portfolio tools, or agent-driven trade planners with defined stops.
Skip if: Casual install-and-forget trading hype projects with no stops, no account model, or no legal review of financial software claims.
When should I use this skill?
Designing or coding how many shares/contracts to buy given account size, entry, stop, and acceptable risk percent.
What do I get? / Deliverables
Your agent outputs explicit share counts and dollar risk from account size, risk percent, and stop distance using documented sizing methods.
- Share-count formulas
- Risk-percent policy table aligned to trader profile
- Sizing code or pseudocode for the chosen method
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Sizing logic is implemented as backend rules and formulas when you build trading tools, even though traders also use it live in production. Share-count formulas, stop distance, and account risk percent belong in server-side or agent execution logic—not landing-page copy.
Where it fits
Implement int(shares) from entry, stop, and 1% risk before wiring the order API.
Lower risk from 1.5% to 1% after a drawdown without rewriting strategy code.
Document max portfolio heat before promising users an auto-trader MVP.
How it compares
Methodology and formulas for sizing—not a market data MCP, charting skill, or execution broker integration.
Common Questions / FAQ
Who is position-sizer for?
Solo developers and indie quant-adjacent builders implementing risk controls in trading apps, bots, or internal agent workflows.
When should I use position-sizer?
In Build when coding sizing functions; in Operate when tuning live risk percent bands; in Validate when stress-testing whether a strategy survives drawdowns at realistic bet sizes.
Is position-sizer safe to install?
Check the Security Audits panel on this Prism page and audit any repo that will touch real accounts; the skill describes financial math, not audited production trading systems.
SKILL.md
READMESKILL.md - Position Sizer
# Position Sizing Methodologies ## Overview Position sizing determines how many shares to buy on each trade. Correct sizing is the single most important factor in long-term portfolio survival. A great stock pick with bad sizing can destroy an account; a mediocre pick with proper sizing preserves capital for the next opportunity. This reference covers three primary methods: Fixed Fractional, ATR-based, and Kelly Criterion. Each has distinct strengths and ideal use cases. --- ## Fixed Fractional Method (Percentage Risk) ### Concept Risk a fixed percentage of the account on every trade. The most widely used method among professional traders, popularized by Van Tharp and applied rigorously by Mark Minervini and William O'Neil. ### Formula ``` risk_per_share = entry_price - stop_price dollar_risk = account_size * risk_pct / 100 shares = int(dollar_risk / risk_per_share) ``` ### Standard Risk Levels | Risk % | Trader Profile | Notes | |--------|---------------|-------| | 0.25-0.50% | Conservative / large account | Institutional-grade risk | | 0.50-1.00% | Experienced swing trader | Minervini recommended range | | 1.00-1.50% | Active trader, proven edge | Standard for tested systems | | 1.50-2.00% | Aggressive, high win-rate | Maximum for most strategies | | > 2.00% | Dangerous | Ruin risk increases rapidly | ### Example - Account: $100,000 - Entry: $155.00, Stop: $148.50 - Risk per share: $6.50 - At 1% risk: $1,000 / $6.50 = **153 shares** - Position value: $23,715 (23.7% of account) ### When to Use - Default method for most swing and position trades - When you have a clear technical stop level (support, moving average, prior low) - When trading a system with established risk parameters ### Minervini / O'Neil Integration Mark Minervini recommends: - Risk no more than 1% per trade during the early stages of a rally - Tighten to 0.5% after consecutive losses - Use a "progressive exposure" model: start with half position, add on confirmation - Maximum portfolio heat (total open risk): 6-8% William O'Neil recommends: - Cut losses at 7-8% below purchase price (hard maximum) - Preferred loss cut: 3-5% for experienced traders - Use a "follow-through day" to confirm market direction before increasing exposure --- ## ATR-Based Method (Volatility Sizing) ### Concept Use the Average True Range (ATR) to set stop distance, automatically adjusting position size to a stock's volatility. Originated with the Turtle Traders (Richard Dennis, 1983). ### Formula ``` stop_distance = atr * atr_multiplier stop_price = entry_price - stop_distance risk_per_share = stop_distance dollar_risk = account_size * risk_pct / 100 shares = int(dollar_risk / risk_per_share) ``` ### ATR Multiplier Guidance | Multiplier | Stop Width | Style | |-----------|-----------|-------| | 1.0x | Tight | Day trading, very short-term | | 1.5x | Moderate-tight | Swing trading, 2-5 day holds | | 2.0x | Standard | Default for most swing trades (Turtle Traders) | | 2.5x | Wide | Position trading, 2-8 week holds | | 3.0x | Very wide | Trend following, multi-month holds | ### Example - Account: $100,000, Risk: 1% - Entry: $155.00, ATR(14) = $3.20, Multiplier = 2.0x - Stop distance: $6.40, Stop: $148.60 - Dollar risk: $1,000 - Shares: int($1,000 / $6.40) = **156 shares** ### When to Use - When you want volatility-adjusted sizing across different stocks - When a stock lacks clear support/resistance for a discrete stop - For systematic/mechanical trading systems - When comparing positions across stocks with different price ranges and volatilities ### Advantages Over Fixed Stop 1. Low-volatility stocks get larger positions (tighter stop relative to price) 2. High-volatility stocks get smaller positions (wider stop protects against noise) 3. Normalizes risk across the portfolio regardless of stock price --- ## Kelly Criterion ### Concept The Kelly Criterion calculates the mathematically optimal fraction of capital to risk, given kno