position-sizing
БесплатноЗапускает вложенные скриптыНе проверенTrade sizing methods including fixed fractional, volatility-adjusted, Kelly criterion, and liquidity-constrained sizing
от agiprolabs★ 611 звёзд на GitHubОб этом скилле
Position Sizing
Position sizing is the single most important risk management decision in trading. Your entry signal determines direction; your position size determines survival. A mediocre strategy with proper sizing will outperform a great strategy with reckless sizing over any meaningful time horizon.
Core principle: Size determines survival, not entries. Two traders with the same signals but different sizing will have wildly different outcomes. The one who sizes conservatively survives drawdowns and compounds capital; the one who oversizes blows up.
Methods Covered
| Method | Best For | Key Input |
|---|---|---|
| Fixed Fractional | General trading, most recommended | Account risk % |
| Volatility-Adjusted | Volatile markets, multi-asset | ATR or realized vol |
| Kelly Criterion | Quantified edge with track record | Win rate + payoff ratio |
| Liquidity-Constrained | Low-liquidity Solana tokens | Pool depth |
| Anti-Martingale | Trend-following strategies | Recent P&L streak |
1. Fixed Fractional Sizing
The most recommended method for most traders. Risk a fixed percentage of your account on each trade.
Formula
risk_amount = account_value * risk_percentage
price_risk_per_unit = entry_price - stop_loss_price
position_size_units = risk_amount / price_risk_per_unit
position_value = position_size_units * entry_price
Risk Tiers
| Tier | Risk Per Trade | Use Case |
|---|---|---|
| Conservative | 0.5–1% | New strategies, drawdown recovery |
| Standard | 1–2% | Most traders, proven strategies |
| Aggressive | 3–5% | High-conviction setups with strong, measured edge |
Example
account = 10_000 # $10,000 or 100 SOL
risk_pct = 0.02 # 2%
entry = 1.50
stop_loss = 1.30
risk_amount = account * risk_pct # $200
price_risk = entry - stop_loss # $0.20
position_units = risk_amount / price_risk # 1,000 tokens
position_value = position_units * entry # $1,500
With this sizing, if the stop loss is hit, you lose exactly 2% of your account regardless of the token's price or volatility.
2. Volatility-Adjusted Sizing
Scale position size inversely with volatility. When volatility is high, take smaller positions; when low, take larger positions. This normalizes the dollar risk across different market conditions.
Formula
adjusted_size = base_size * (target_vol / current_vol)
Where:
target_vol: your desired daily portfolio volatility (e.g., 2%)current_vol: the token's current daily volatility (from ATR or realized vol)
Using ATR
atr_14 = 0.12 # 14-period ATR
close_price = 1.50
daily_vol_pct = atr_14 / close_price # 8%
target_daily_vol = account * 0.02 # $200 target daily move
position_size = target_daily_vol / atr_14 # 1,667 units
This automatically reduces exposure in volatile markets and increases it in calm ones.
3. Kelly Criterion
The mathematically optimal fraction of capital to risk, maximizing long-term growth rate. Derived from maximizing expected logarithmic utility.
Formula
f* = (p * b - q) / b
Where:
p= win rate (probability of winning trade)q= 1 - p (probability of losing trade)b= average win / average loss (payoff ratio)f*= optimal fraction of capital to risk
Equivalent form: f* = (p * (b + 1) - 1) / b
Critical Rule: NEVER Use Full Kelly
Full Kelly assumes perfect knowledge of your edge. In practice, edge estimates are noisy. Always use fractional Kelly:
| Fraction | Use Case | Notes |
|---|---|---|
| 0.25x Kelly | Conservative, recommended default | Robust to edge estimation error |
| 0.50x Kelly | Moderate, for well-measured edges | Still significant drawdown risk |
| 1.0x Kelly | Never in practice | Theoretical maximum, catastrophic if edge is overestimated |
Example
win_rate = 0.55 # 55% win rate
avg_win = 2.0 # Average win is 2x the average loss
avg_loss = 1.0
payoff_ratio = avg_win / avg_loss # b = 2.0
kelly = (win_rate * payoff_ratio - (1 - win_rate)) / payoff_ratio
# kelly = (0.55 * 2.0 - 0.45) / 2.0 = 0.325 = 32.5%
quarter_kelly = kelly * 0.25 # 8.1% — use this
half_kelly = kelly * 0.50 # 16.25%
If Kelly is negative, you have no edge. Do not trade.
See references/sizing_formulas.md for the full mathematical derivation.
4. Liquidity-Constrained Sizing
Critical for Solana tokens. Even if your risk model says you can take a large position, the pool may not support it without unacceptable slippage.
Formula (Constant-Product AMM)
slippage ≈ trade_size / pool_liquidity
max_trade = pool_liquidity * max_slippage_pct
Rules of Thumb
| Constraint | Guideline |
|---|---|
| Max single trade | 2% of pool liquidity |
| Max position | 5% of pool liquidity |
| Minimum pool depth | 10x your desired position size |
Example
pool_sol = 500 # 5
Установить position-sizing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл position-sizing?
Trade sizing methods including fixed fractional, volatility-adjusted, Kelly criterion, and liquidity-constrained sizing
Как установить скилл position-sizing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл position-sizing запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic