Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Bhala-Srinivash/nse-trading-skills --skill position-sizinggit clone --depth 1 https://github.com/Bhala-Srinivash/nse-trading-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/position-sizing)<a href="https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/position-sizing"><img src="https://agentmods.dev/badge/skills/bhala-srinivash/nse-trading-skills/position-sizing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/position-sizing"><img src="https://agentmods.dev/badge/skills/bhala-srinivash/nse-trading-skills/position-sizing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.01040 |
| Opus 5 | $0.00048 | $0.00520 |
| Sonnet 5 | $0.00019 | $0.00208 |
| Haiku 4.5 | $0.00010 | $0.00104 |
Grade A, and why
position-sizing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- Account size: Total trading capital (ask user if not known)
- Current price:
get_quotes_and_depthfrom Groww, or user-provided - ATR(14):
get_historical_technical_indicatorsfrom Groww, or calculate from candle data - Existing positions:
get_equity_portfolio_holdingsto 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:
| Situation | Risk% |
|---|---|
| Normal (no leverage) | 1-2% |
| With 2x leverage | 0.5-1% |
| With 3-4x leverage | 0.25-0.5% |
| High conviction trade | Up to 3% (rare) |
| New/uncertain setup | 0.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 Condition | ATR Multiplier |
|---|---|
| Low volatility (ADX < 20) | 1.5× ATR |
| Normal volatility | 2.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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 128 lines · 96 tokens per session scan A dda972fd4c7d
position-sizing is a skill published in the GitHub repository Bhala-Srinivash/nse-trading-skills (38 stars, last pushed 6mo ago), licensed MIT. It adds 96 tokens to every session and 1,040 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ib-pmcc-advisor
Analyze PMCC (Poor Man's Covered Call / diagonal spread) positions from IB portfolio. For each diagonal spread, reports short leg risk (delta, IV, assignment probability), daily P&L projections, top-3 roll candidates, and a side-by-side comparison table. Requires TWS or IB Gateway running locally.
scanner-pmcc
Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when user asks about PMCC candidates, diagonal spreads, or LEAPS strategies.
ib-stop-loss
Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB. Computes stop prices, detects alerts, and places conditional combo orders. Dry-run by default. Requires TWS or IB Gateway running locally.
ib-trailing-stop
Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.
ib-collar
Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.
ib-find-short-roll
Find roll options for existing short positions OR find best covered call/put to open against long stock. Use when user asks about rolling shorts, finding roll candidates, writing covered calls, or managing option positions. Requires TWS or IB Gateway running locally.