Agent skill

position-sizer

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, or portfolio risk allocation. Supports stop-loss distance calculation, volatility scaling, and sector concentration checks.

BaggaT236github.com/BaggaT236GitHub ↗
claude-codeships scriptsMIT
Install
npx skills add BaggaT236/AI-Trading-Skills --skill position-sizer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 6 KB
Bundled scripts: yes
Path: skills/position-sizer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 118
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Position Sizer ## Overview Calculate the optimal number of shares to buy for a long stock trade based on risk management principles. Supports three sizing methods: - **Fixed Fractional**: Risk a fixed percentage of account equity per trade (default: 1%) - **ATR-Based**: Use Average True Range to set volatility-adjusted stop distances - **Kelly Criterion**: Calculate mathematically optimal risk allocation from historical win/loss statistics All methods apply portfolio constraints (max position %, max sector %) and output a final recommended share count with full risk breakdown. ## When to Use - User asks "how many shares should I buy?" - User wants to calculate position size for a specific trade setup - User mentions risk per trade, stop-loss sizing, or portfolio allocation - User asks about Kelly Criterion or ATR-based position sizing - User wants to check if a position fits within portfolio concentration limits ## Prerequisites - No API keys required - Python 3.9+ with standard library only ## Workflow ### Step 1: Gather Trade Parameters Collect from the user: - **Required**: Account size (total equity) - **Mode A (Fixed Fractional)**: Entry price, stop price, risk percentage (d

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Prerequisites
  4. Workflow
  5. Step 1: Gather Trade Parameters
  6. Step 2: Execute Position Sizer Script
  7. Step 3: Load Methodology Reference
  8. Step 4: Calculate Multiple Scenarios
  9. Step 5: Apply Portfolio Constraints and Determine Final Size
  10. Step 6: Generate Position Report
  11. Output Format
  12. JSON Report
  13. Markdown Report
  14. Resources
Ships with 4 files
  • references/sizing_methodologies.md
  • scripts/position_sizer.py
  • scripts/tests/conftest.py
  • scripts/tests/test_position_sizer.py
Commands it runs
Fixed Fractional (most common)
python3 skills/position-sizer/scripts/position_sizer.py \
ATR-Based
Kelly Criterion (budget mode - no entry)
Kelly Criterion (shares mode - with entry/stop)
More from AI-Trading-Skills
All skills →
About this skill
What does the position-sizer skill do?

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, or portfolio risk allocation. Supports stop-loss distance calculation, volatility scaling, and sector concentration checks.

How do I install it?

Run `npx skills add BaggaT236/AI-Trading-Skills --skill position-sizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BaggaT236/AI-Trading-Skills, a repository with 118 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going