position-sizer

Calculates risk-based position sizes for long stock trades using Python 3.9+ scripts.

1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/darkounus90/BOTTX3 --skill position-sizer-darkounus90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: position-sizer
Source: https://github.com/darkounus90/BOTTX3/tree/main/.agents/skills/position-sizer
Command: npx skills add https://github.com/darkounus90/BOTTX3 --skill position-sizer-darkounus90

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides precise calculation of optimal position sizes for long stock trades, based on risk management principles, enabling traders to manage risk effectively and make informed trading decisions.

Core Features & Use Cases

  • Position Sizing: Calculates the optimal number of shares to buy based on risk management principles like Fixed Fractional, ATR-based, and Kelly Criterion.
  • Risk Management: Incorporates risk constraints such as max position % of account and max sector % to ensure adherence to portfolio limits.
  • Use Case: A trader looking to execute a long stock trade needs to determine the appropriate number of shares to buy. They can use this Skill to calculate the optimal position size based on their risk tolerance and portfolio constraints.

Quick Start

Run the position sizing script with the required parameters: python3 skills/position-sizer/scripts/position_sizer.py --account-size 100000 --entry 155 --stop 148.50 --risk-pct 1.0 --output-dir reports/

Frequently Asked Questions about position-sizer

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

FAQPage Schema
How do I calculate position size for a stock trade based on risk management?

Position size for stock trades is calculated by running a Python script with parameters like account size, entry price, stop loss, and risk percentage to determine the optimal number of shares to buy.

What position sizing methods are available for trading algorithms?

Supported position sizing methods include Fixed Fractional, ATR-based, and Kelly Criterion calculations, each applying risk management principles to determine optimal share quantities for long stock trades.

Can I apply portfolio constraints like max sector percentage to my position sizing?

Yes, position sizing calculations can apply risk constraints such as maximum position percentage of account and maximum sector percentage to ensure trades adhere to portfolio risk limits.

What do I need to run a risk-based position sizing script?

You need Python 3.9 or higher and no external API keys are required. You run the script by passing command-line arguments including account size, entry price, stop loss, and risk percentage.

Does this position sizing tool support short trades or only long stock trades?

This position sizing tool calculates risk-based share quantities exclusively for long stock trades, applying methods like Fixed Fractional and Kelly Criterion to optimize risk management.

What's the best way to manage trading risk across a portfolio?

Calculating risk-based position sizes with constraints like max position percentage and max sector percentage ensures individual trades align with overall portfolio risk management limits.