position-sizing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Position Sizing

仓位 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.
仓位 Sizing是交易中最重要的风险管理决策。入场信号决定交易方向;仓位规模决定能否持续生存。在任何有意义的时间周期内,采用合理仓位管理的普通策略,表现都会优于仓位管理鲁莽的优秀策略。
核心原则:仓位规模决定生存,而非入场时机。两个使用相同信号但仓位管理不同的交易者,最终结果会截然不同。仓位保守的交易者能扛过回撤并实现资本复利;仓位过大的交易者则会爆仓。

Methods Covered

涵盖的方法

MethodBest ForKey Input
Fixed FractionalGeneral trading, most recommendedAccount risk %
Volatility-AdjustedVolatile markets, multi-assetATR or realized vol
Kelly CriterionQuantified edge with track recordWin rate + payoff ratio
Liquidity-ConstrainedLow-liquidity Solana tokensPool depth
Anti-MartingaleTrend-following strategiesRecent P&L streak

方法适用场景关键输入
Fixed Fractional通用交易,最推荐账户风险比例
Volatility-Adjusted波动市场、多资产交易ATR或实际波动率
Kelly Criterion有记录可查的量化优势策略胜率+盈亏比
Liquidity-Constrained低流动性Solana代币资金池深度
Anti-Martingale趋势跟踪策略近期盈亏 streak

1. Fixed Fractional Sizing

1. Fixed Fractional(固定比例)仓位法

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_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

风险等级

TierRisk Per TradeUse Case
Conservative0.5–1%New strategies, drawdown recovery
Standard1–2%Most traders, proven strategies
Aggressive3–5%High-conviction setups with strong, measured edge
等级单交易风险比例适用场景
保守型0.5–1%新策略、回撤恢复期
标准型1–2%大多数交易者、已验证策略
激进型3–5%高置信度且有明确量化优势的交易机会

Example

示例

python
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.

python
account = 10_000  # 账户资金:10,000美元或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 # 仓位数量:1000枚代币
position_value = position_units * entry   # 仓位价值:1500美元
采用这种仓位管理方式,即使触发止损,你也只会损失账户资金的2%,不受代币价格或波动率影响。

2. Volatility-Adjusted Sizing

2. Volatility-Adjusted(波动率调整)仓位法

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)
adjusted_size = base_size * (target_vol / current_vol)
其中:
  • target_vol
    : 你期望的每日组合波动率(例如2%)
  • current_vol
    : 代币当前的每日波动率(来自ATR或实际波动率)

Using ATR

使用ATR计算

python
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.

python
atr_14 = 0.12          # 14周期ATR
close_price = 1.50
daily_vol_pct = atr_14 / close_price  # 8%

target_daily_vol = account * 0.02      # 目标每日波动金额:200美元
position_size = target_daily_vol / atr_14  # 仓位数量:1667单位
这种方法会自动在波动市场降低仓位,在平稳市场增加仓位。

3. Kelly Criterion

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
f* = (p * b - q) / b
其中:
  • p
    = 胜率(交易盈利的概率)
  • q
    = 1 - p(交易亏损的概率)
  • b
    = 平均盈利/平均亏损(盈亏比)
  • f*
    = 最优资金风险比例
等价形式:
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:
FractionUse CaseNotes
0.25x KellyConservative, recommended defaultRobust to edge estimation error
0.50x KellyModerate, for well-measured edgesStill significant drawdown risk
1.0x KellyNever in practiceTheoretical maximum, catastrophic if edge is overestimated
全凯利比例假设你完全了解自身策略的优势,但实际中优势估算存在误差。务必使用部分凯利比例:
比例适用场景说明
0.25x Kelly保守型,推荐默认值对优势估算误差有较强鲁棒性
0.50x Kelly中等型,适用于已充分验证的优势仍存在显著回撤风险
1.0x Kelly实际交易中绝不要使用理论最大值,若高估优势会导致灾难性后果

Example

示例

python
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
python
win_rate = 0.55       # 胜率:55%
avg_win = 2.0         # 平均盈利是平均亏损的2倍
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%

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.

---
quarter_kelly = kelly * 0.25 # 8.1% — 使用这个比例 half_kelly = kelly * 0.50 # 16.25%

**如果凯利比例为负,说明你的策略没有优势,不要交易。**

完整数学推导请查看`references/sizing_formulas.md`。

---

4. Liquidity-Constrained Sizing

4. Liquidity-Constrained(流动性约束)仓位法

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.
这对Solana代币至关重要。即使你的风险模型显示可以建大仓位,但若资金池无法支持,会产生不可接受的滑点。

Formula (Constant-Product AMM)

计算公式(恒定乘积AMM)

slippage ≈ trade_size / pool_liquidity
max_trade = pool_liquidity * max_slippage_pct
slippage ≈ trade_size / pool_liquidity
max_trade = pool_liquidity * max_slippage_pct

Rules of Thumb

经验法则

ConstraintGuideline
Max single trade2% of pool liquidity
Max position5% of pool liquidity
Minimum pool depth10x your desired position size
约束条件指导原则
单交易上限资金池流动性的2%
仓位上限资金池流动性的5%
最低资金池深度目标仓位规模的10倍

Example

示例

python
pool_sol = 500          # 500 SOL in pool
max_slippage = 0.02     # 2% max slippage

max_trade_sol = pool_sol * max_slippage  # 10 SOL
python
pool_sol = 500          # 资金池中有500 SOL
max_slippage = 0.02     # 最大滑点:2%

max_trade_sol = pool_sol * max_slippage  # 10 SOL

For a $150 SOL price, that's $1,500 max per trade

若SOL价格为150美元,单交易最大金额为1500美元


**Always check all pools**, not just the largest. Aggregate liquidity across Raydium, Orca, and Meteora for the full picture. See the `liquidity-analysis` skill for pool depth assessment.

---

**务必检查所有资金池**,不要只看最大的那个。汇总Raydium、Orca和Meteora的流动性数据以获取完整信息。资金池深度评估请查看`liquidity-analysis`技能。

---

5. Anti-Martingale Sizing

5. Anti-Martingale(反鞅)仓位法

Increase size after wins, decrease after losses. This is the opposite of the gambler's fallacy (Martingale). The logic: winning streaks may indicate your strategy is in sync with the market; losing streaks may indicate regime change.
盈利后增加仓位,亏损后减少仓位。这与赌徒谬误(鞅法)相反。逻辑是:盈利 streak可能表明你的策略与市场节奏匹配;亏损 streak可能表明市场格局发生变化。

Implementation

实现代码

python
def anti_martingale_size(
    base_size: float,
    consecutive_wins: int,
    consecutive_losses: int,
    scale_factor: float = 0.25,
    max_multiplier: float = 2.0,
    min_multiplier: float = 0.5,
) -> float:
    if consecutive_losses > 0:
        multiplier = max(min_multiplier, 1.0 - consecutive_losses * scale_factor)
    elif consecutive_wins > 0:
        multiplier = min(max_multiplier, 1.0 + consecutive_wins * scale_factor)
    else:
        multiplier = 1.0
    return base_size * multiplier
Use conservatively. After 3+ consecutive losses, reducing size by 50% protects capital during drawdowns.

python
def anti_martingale_size(
    base_size: float,
    consecutive_wins: int,
    consecutive_losses: int,
    scale_factor: float = 0.25,
    max_multiplier: float = 2.0,
    min_multiplier: float = 0.5,
) -> float:
    if consecutive_losses > 0:
        multiplier = max(min_multiplier, 1.0 - consecutive_losses * scale_factor)
    elif consecutive_wins > 0:
        multiplier = min(max_multiplier, 1.0 + consecutive_wins * scale_factor)
    else:
        multiplier = 1.0
    return base_size * multiplier
保守使用该方法。连续亏损3次以上时,将仓位减半能在回撤期保护资金。

Position Sizing Ladder

仓位管理阶梯

Combine all methods and take the most conservative result:
1. Calculate Kelly size          → theoretical max based on edge
2. Calculate fixed fractional    → risk-based size
3. Calculate volatility-adjusted → vol-normalized size
4. Calculate liquidity-constrained max → market-based ceiling
5. Final size = min(all four)    → binding constraint wins
The binding constraint tells you what is limiting your size:
  • Kelly-bound: your edge is small, size accordingly
  • Risk-bound: standard risk management is the limit
  • Volatility-bound: market is too volatile for larger size
  • Liquidity-bound: pool cannot absorb more without slippage

结合所有方法,取最保守的结果:
1. 计算凯利仓位规模 → 基于策略优势的理论最大值
2. 计算固定比例仓位规模 → 基于风险的仓位
3. 计算波动率调整仓位规模 → 波动率标准化仓位
4. 计算流动性约束上限 → 基于市场的仓位天花板
5. 最终仓位规模 = min(以上四个值) → 约束条件最严格的结果生效
约束条件会告诉你限制仓位的原因:
  • 凯利约束:你的策略优势较小,相应调整仓位
  • 风险约束:标准风险管理是限制因素
  • 波动率约束:市场波动过大,无法建更大仓位
  • 流动性约束:资金池无法承受更多仓位,否则会产生滑点

Account-Level Limits

账户级限制

Individual position sizing is necessary but not sufficient. You also need portfolio-level constraints:
LimitGuidelineRationale
Max single position10% of portfolioDiversification floor
Max correlated exposure25% of portfolioCorrelated assets move together
Max total exposure50–80% of portfolioCash reserve for opportunities/margin
Max positions5–10 concurrentAttention and management bandwidth

单仓位管理是必要的,但还不够。你还需要组合层面的约束:
限制条件指导原则理由
单仓位上限组合的10%分散投资底线
关联资产暴露上限组合的25%关联资产走势一致
总暴露上限组合的50–80%预留现金以把握机会/应对保证金需求
最大持仓数量5–10个并发仓位注意力和管理带宽限制

PumpFun / Meme Token Sizing

PumpFun / Meme Token仓位管理

PumpFun and early-stage meme tokens require special sizing discipline:
  • Very small positions: 0.1–1 SOL per trade due to extreme risk
  • Scale with bonding curve fill %: smaller when early (high rug risk), slightly larger when proven (graduated to Raydium)
  • Never size based on expected return — size based on acceptable total loss
  • Treat as lottery tickets: expect most to go to zero
  • Position limit: no more than 5–10% of portfolio across all meme positions combined
python
undefined
PumpFun和早期meme代币需要特殊的仓位管理纪律:
  • 极小仓位:每笔交易0.1–1 SOL,风险极高
  • 随 bonding curve 填充比例调整:早期仓位更小( rug风险高),代币上线Raydium等平台后可适当增大仓位
  • 绝不要基于预期收益确定仓位 — 基于可接受的总损失确定仓位
  • 视为彩票:预期大多数代币会归零
  • 仓位限制:所有meme代币仓位合计不超过组合的5–10%
python
undefined

PumpFun sizing example

PumpFun仓位示例

account_sol = 100 meme_budget = account_sol * 0.05 # 5 SOL total for memes per_trade = meme_budget / 10 # 0.5 SOL each, 10 shots

---
account_sol = 100 meme_budget = account_sol * 0.05 # meme代币总预算:5 SOL per_trade = meme_budget / 10 # 每笔交易0.5 SOL,共10次机会

---

Integration with Other Skills

与其他技能的集成

SkillIntegration
risk-management
Portfolio-level limits, drawdown rules
liquidity-analysis
Pool depth data for liquidity constraints
kelly-criterion
Deeper Kelly math, edge estimation
exit-strategies
Stop loss placement affects fixed fractional sizing
volatility-modeling
Better vol estimates for volatility-adjusted sizing
slippage-modeling
Precise slippage estimates for liquidity constraints

技能集成方式
risk-management
组合级限制、回撤规则
liquidity-analysis
资金池深度数据用于流动性约束
kelly-criterion
更深入的凯利数学模型、优势估算
exit-strategies
止损位置影响固定比例仓位计算
volatility-modeling
更精准的波动率估算用于波动率调整仓位法
slippage-modeling
精准滑点估算用于流动性约束

Files

文件

References

参考资料

  • references/sizing_formulas.md
    — Mathematical derivations for all sizing methods with worked examples
  • references/practical_guide.md
    — Sizing by account size, token type, and common mistakes
  • references/sizing_formulas.md
    — 所有仓位方法的数学推导及示例
  • references/practical_guide.md
    — 按账户规模、代币类型分类的仓位指南及常见错误

Scripts

脚本

  • scripts/size_calculator.py
    — Calculates position size using all methods, shows binding constraint
  • scripts/portfolio_sizer.py
    — Portfolio risk dashboard with per-position risk and available budget

  • scripts/size_calculator.py
    — 使用所有方法计算仓位规模,显示约束条件
  • scripts/portfolio_sizer.py
    — 组合风险仪表盘,包含单仓位风险及可用预算

Quick Reference

快速参考

python
undefined
python
undefined

Minimal fixed fractional sizing — copy-paste starter

极简固定比例仓位计算 — 可直接复制使用

def calc_position_size( account: float, risk_pct: float, entry: float, stop: float ) -> float: """Return number of units to buy.""" risk_amount = account * risk_pct price_risk = abs(entry - stop) if price_risk == 0: return 0.0 return risk_amount / price_risk
undefined
def calc_position_size( account: float, risk_pct: float, entry: float, stop: float ) -> float: """返回买入的单位数量。""" risk_amount = account * risk_pct price_risk = abs(entry - stop) if price_risk == 0: return 0.0 return risk_amount / price_risk
undefined