position-sizing
Skill17 starsChanged 4 months agoApache-2.0View on GitHub
Calculate risk-based position sizes using fixed %, fractional Kelly, ATR-hybrid, or volatility methods. Use when determining trade size, managing account risk, adjusting for correlated positions, or standardizing risk across trades.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- Shubhamkumartrichy/claude-trading-skills-indiatheir own version, first seen Nov 1, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
- IngAs8/ClaudeSkilltheir own version, first seen Sep 28, 2026
- Serennity007/claude-trading-skills-67their own version, first seen Aug 25, 2026
- brainbytes-dev/everything-claude-tradingtheir own version, first seen Mar 14, 2026
- agiprolabs/claude-trading-skillstheir own version, first seen Mar 11, 2026
Used with
Projects with it also use feature-engineering.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ffsshhttiikkSkillfeature-engineering
Machine learning feature engineering
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- agiprolabs/claude-trading-skills★ 366same name
- Shubhamkumartrichy/claude-trading-skills-india★ 56same name
- Bhala-Srinivash/nse-trading-skills★ 36same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- brainbytes-dev/everything-claude-trading★ 16same name
- IngAs8/ClaudeSkill★ 0same name
- Serennity007/claude-trading-skills-67★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- candlestick-patternsSkill
- channel-tradingSkill
- cup-and-handleSkill
- double-top-bottomSkill
- flag-pennantSkill
- head-and-shouldersSkill
- triangle-patternsSkill
- wedge-patternsSkill
- altcoin-rotationSkill
- arbitrage-tradingSkill
- dca-strategySkill
- funding-rate-tradingSkill
- on-chain-analysisSkill
- breakout-tradingSkill
- gap-tradingSkill
- momentum-tradingSkill
- news-tradingSkill
- pullback-tradingSkill
- range-tradingSkill
- scalping-strategySkill
- earnings-tradingSkill
- economic-calendar-tradingSkill
- insider-activity-tradingSkill
- market-correlation-tradingSkill
- sector-rotationSkill
- sentiment-analysisSkill
- breaker-blocksSkill
- fair-value-gapsSkill
- kill-zonesSkill
- liquidity-zonesSkill
- market-structure-shiftSkill
- optimal-trade-entrySkill
- order-blocksSkill
- premium-discountSkill
- correlation-riskSkill
- drawdown-managementSkill
- leverage-managementSkill
- partial-profit-takingSkill
- risk-reward-ratioSkill
- stop-loss-strategiesSkill
- trailing-stopSkill
- bollinger-bandsSkill
- divergence-tradingSkill
- fibonacci-tradingSkill
- ichimoku-cloudSkill
- macd-tradingSkill
- market-regime-detectionSkill
- mean-reversionSkill
- moving-average-crossoverSkill
- multi-timeframe-analysisSkill
- rsi-divergenceSkill
- stochastic-tradingSkill
- supply-demand-zonesSkill
- volume-profile-tradingSkill
- vwap-tradingSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Default to the portfolio's remaining dollar-risk budget and a structural/volatility stop.
- Distinctive: line 44
Read single-trade, strategy, factor, venue, margin, daily, and drawdown limits from the portfolio mandate.
- Distinctive: line 59
Treat the setup as a testable hypothesis, not a prediction.
- Distinctive: line 67
Do not use Kelly without positive, stable, net-of-cost edge estimates and uncertainty controls.
- Distinctive: line 68
NEVER size based on conviction -- "I'm really sure" is not a sizing method
- Distinctive: line 69
NEVER increase size after losses to "make it back" -- revenge sizing is the fastest path to ruin
- Distinctive: line 72
Use the same method consistently.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Position Sizing
Position sizing determines how much capital to risk per trade -- the single most important factor in long-term survival.
Sizing Methods
1. Fixed Percentage Risk (Default)
Quantity = Risk Budget / (abs(Entry - Stop) × contract multiplier + estimated per-unit stop slippage/cost)
Example: $10,000 account, 1% risk, entry $100, stop $95 => $100 / $5 = 20 shares.
2. Volatility-Based (ATR)
Position Size = (Account x Risk%) / (ATR x Multiplier)
Select and validate the ATR multiple per instrument and strategy. Wider stops reduce quantity for the same risk budget; they do not create safety by themselves.
3. ATR-Hybrid
Combines fixed % risk with ATR-based stop distance: Position Size = (Account x Risk%) / (ATR x Multiplier). Adapts to volatility while maintaining consistent dollar risk per trade.
4. Fractional Kelly Criterion
Full Kelly % = W - (1 - W) / R where W = win rate, R = avg win / avg loss.
Kelly assumes a positive edge and sufficiently known outcome distribution. Estimate uncertainty, nonstationarity, tail loss, dependence, and constraints; use a conservative fraction only if mandate-approved and cap it by drawdown, liquidity, margin, and concentration limits. Otherwise use the fixed risk budget.
Method Selection
Default to the portfolio's remaining dollar-risk budget and a structural/volatility stop. Use volatility scaling for comparable risk across assets. Consider fractional Kelly only with stable, net-of-cost, distribution-level evidence; never choose sizing from trade style or a small win-rate sample.
Risk Limits
Read single-trade, strategy, factor, venue, margin, daily, and drawdown limits from the portfolio mandate. Include existing orders/positions, correlated gap scenarios, borrow/funding, and scheduled-event stress. If a limit is unavailable, do not manufacture one—request it or return no size.
Workflow
- Get entry and stop loss from the technical analyst's analysis
- Check committed risk and balance via
get_portfolio_risk_state()(remaining R budget, margin used) - Check for correlated positions -- are existing positions in correlated assets?
- Select sizing method from mandate and validated strategy assumptions
- Preview the size via
preview_position_size(symbol=<symbol>, side=<BUY|SELL>, entry=<entry>, stop_loss=<stop>, risk_usd=<dollars>)— returns quantity, leverage, notional. Use it to sanity-check before creating the insight. - Verify all limits -- single trade, aggregate factor/scenario loss, liquidity, margin, and drawdown budget
- Stress events -- size to the approved gap scenario or return no trade when risk is unbounded
- Create the insight via
create_trading_insight(symbol, side, entry, stop_loss, take_profits, trade_type, risk_usd=<dollars>)— sizing is recomputed server-side;preview_position_sizeis advisory only.
Evidence and Validation
- Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.
- Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.
- Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter.
- Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.
- Research basis: Kelly's original paper assumes known probabilities and repeated favorable bets; risk-constrained Kelly adds explicit drawdown control.
Key Rules
- Do not use Kelly without positive, stable, net-of-cost edge estimates and uncertainty controls.
- NEVER size based on conviction -- "I'm really sure" is not a sizing method
- NEVER increase size after losses to "make it back" -- revenge sizing is the fastest path to ruin
- Size scheduled-event exposure from the mandate's gap/stress loss.
- Aggregate correlated and common-factor positions with current estimates and adverse scenarios.
- Use the same method consistently; do not switch based on recent results
- Round down to executable lot size and recheck notional, margin, stop slippage, and residual risk.
Related Skills
- correlation-risk -- correlated positions must be sized as combined exposure
- stop-loss-strategies -- stop distance is a direct input to position size calculation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

