position-sizer

Calculate position sizes for long stock trades using fixed fractional, ATR-based, or Kelly Criterion methods.

2|Updated Jun 14, 2026
One-click install
npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill position-sizer-ihsandanish25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: position-sizer
Source: https://github.com/IhsanDanish25/claude-trading-skills/tree/main/skills/position-sizer
Command: npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill position-sizer-ihsandanish25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides risk-based position sizing calculations for long stock trades, helping users make informed decisions on how much capital to allocate to a particular trade.

Core Features & Use Cases

  • Risk-based Position Sizing: Calculate position sizes based on risk percentage, ATR-based sizing, or Kelly Criterion.
  • Portfolio Constraints: Apply maximum position percentage and sector concentration limits.
  • Use Case: If a user wants to buy a stock and is concerned about the risk, this Skill can provide the optimal number of shares to buy based on the risk they are willing to take.

Quick Start

Use the position-sizer skill to calculate the optimal position size for a trade with an account size of $100,000, entry price of $150, stop price of $140, and a risk percentage of 1%.

Frequently Asked Questions about position-sizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate risk-based position sizes for stock trading?

You can calculate position sizes using fixed fractional, ATR-based, or Kelly Criterion methods. This Skill computes the optimal share count for long stock trades by applying your specified risk percentage and portfolio constraints like maximum position limits.

What is the best way to apply portfolio constraints like maximum position and sector percentage limits to my trades?

The best way to apply portfolio constraints is to input your maximum position percentage and sector concentration limits during the sizing calculation. This ensures your long stock trades adhere to your diversification rules and minimize drawdown risk.

How does ATR-based position sizing work for minimizing drawdown risk?

ATR-based position sizing works by using the Average True Range to gauge market volatility and adjust the share quantity accordingly. This volatility-adjusted approach helps minimize drawdown risk by allocating fewer shares during highly volatile market conditions.

Do I need Python and specific libraries to calculate optimal trade sizes?

Yes, you need Python with the numpy and pandas libraries installed to calculate optimal trade sizes. These dependencies are required to process the fixed fractional, ATR-based, or Kelly Criterion calculations and apply portfolio constraints.

Can I use the Kelly Criterion for long stock trades in a diversified portfolio?

Yes, you can use the Kelly Criterion for long stock trades within a diversified portfolio. The Skill supports Kelly Criterion calculations alongside portfolio constraints like maximum position and sector percentage limits to optimize capital allocation and control drawdown risk.

What are the limitations of using fixed fractional position sizing for stock trading?

A limitation of fixed fractional position sizing is that it applies a static risk percentage without dynamically adjusting for market volatility. Unlike ATR-based sizing, it may not adequately account for fluctuating market conditions when calculating share quantities for long stock trades.