Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
bhala-srinivash avatar

Position Sizing

  • 83 installs
  • 32 repo stars
  • Updated March 5, 2026
  • bhala-srinivash/nse-trading-skills

Size NSE/BSE equity trades with fixed fractional, ATR-based, and Kelly methods while respecting portfolio concentration and leverage limits.

About

Position sizing is an agent skill for indie builders and solo traders on Indian markets (NSE/BSE) who need consistent share counts and capital per trade instead of gut-feel allocation. It walks through fixed fractional sizing as the default robust approach—risk a fixed percentage of account size divided by entry-to-stop distance—plus ATR-based sizing when volatility should scale the stop, and Kelly criterion when you have edge estimates and accept its assumptions. The skill lists prerequisites as optional: manual prices work; Groww MCP improves live quotes, ATR(14), and holdings for concentration checks, and yfinance is noted as an install path. Triggers align with natural questions like how many shares to buy, lot size, and risk per trade. It is procedural trading math for your agent, not brokerage execution or tax advice.

  • Three sizing methods: fixed fractional (default), ATR-based, and Kelly criterion
  • Risk% guidelines table for different trading situations
  • Optional Groww MCP for quotes, ATR(14), and portfolio holdings
  • Fallback yfinance path when Groww is not configured
  • Portfolio concentration and leverage adjustment hooks

Position Sizing by the numbers

  • 83 all-time installs (skills.sh)
  • Ranked #543 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/bhala-srinivash/nse-trading-skills --skill position-sizing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs83
repo stars32
Security audit2 / 3 scanners passed
Last updatedMarch 5, 2026
Repositorybhala-srinivash/nse-trading-skills

What it does

Size NSE/BSE equity trades with fixed fractional, ATR-based, and Kelly methods while respecting portfolio concentration and leverage limits.

Files

SKILL.mdMarkdownGitHub ↗

Position Sizing

Position sizing is how you survive. The goal: risk a small, consistent percentage of capital per trade so that no single loss can cripple your account.

Prerequisites

No dependencies required. Works with manually provided prices. Enhanced with Groww MCP (live price, ATR, portfolio) or yfinance (pip install yfinance).

Data Needed

1. Account size: Total trading capital (ask user if not known) 2. Current price: get_quotes_and_depth from Groww, or user-provided 3. ATR(14): get_historical_technical_indicators from Groww, or calculate from candle data 4. Existing positions: get_equity_portfolio_holdings to check concentration (optional)

Method 1: Fixed Fractional (Default)

This is the go-to method. Simple, robust, works for everyone.

Risk per trade = Account size × Risk%
Shares = Risk per trade ÷ (Entry price - Stop-loss price)
Capital required = Shares × Entry price

Risk% guidelines:

SituationRisk%
Normal (no leverage)1-2%
With 2x leverage0.5-1%
With 3-4x leverage0.25-0.5%
High conviction tradeUp to 3% (rare)
New/uncertain setup0.5%

Example

Account: Rs.10,00,000
Risk: 2% = Rs.20,000
Entry: Rs.1,800
Stop: Rs.1,700 (Rs.100 risk per share)
Shares: 20,000 ÷ 100 = 200 shares
Capital: 200 × 1,800 = Rs.3,60,000 (36% of account)

Method 2: ATR-Based Sizing

Uses volatility to set the stop distance, then sizes accordingly.

Stop distance = ATR(14) × multiplier
Shares = Risk amount ÷ Stop distance
Market ConditionATR Multiplier
Low volatility (ADX < 20)1.5× ATR
Normal volatility2.0× ATR
High volatility (ADX > 30)2.5× ATR

This naturally sizes you smaller in volatile stocks and larger in calm ones.

Method 3: Kelly Criterion (Advanced)

For traders with a track record of at least 30 trades:

Kelly% = W - (1 - W) / R
W = historical win rate
R = average win / average loss

Use Half-Kelly (Kelly% ÷ 2) for real trading — full Kelly is too aggressive.
Win RateAvg W/L RatioKelly%Half-Kelly
40%2.010%5%
50%1.517%8%
60%1.227%13%

Portfolio Constraints

These are hard limits — never exceed them regardless of sizing method:

ConstraintLimit
Single stockMax 20% of portfolio
Single sectorMax 35% of portfolio
Total open riskMax 6% of portfolio (sum of all position risks)
Correlated positionsMax 3 stocks in same sector simultaneously

If a position would breach a constraint, reduce size until it fits.

Leverage Adjustment

When using margin/leverage, the math changes because losses are amplified:

Effective risk% = Risk% × Leverage
So: reduce your base risk% by dividing by leverage

At 3.74x leverage:
  Normal risk: 2%
  Adjusted risk: 2% ÷ 3.74 ≈ 0.5%
  This keeps your effective risk at ~2%

Output

Present position sizing as:

Position Size: XXX shares
Capital Required: Rs.X,XX,XXX
Risk Amount: Rs.X,XXX (X.X% of account)
Stop-Loss: Rs.XXX (X.X% below entry)
Portfolio Allocation: XX% of total capital

Related skills

FAQ

Is Position Sizing safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.