jpskill.com
📦 その他 コミュニティ

kelly-criterion

ケリー基準を用いて、暗号資産取引における最適な投資額を、リスクとリターンのバランスを考慮しながら、より実践的な方法で算出するSkill。

📜 元の英語説明(参考)

Kelly criterion optimal sizing with fractional variants, edge estimation, and practical application for crypto trading

🇯🇵 日本人クリエイター向け解説

一言でいうと

ケリー基準を用いて、暗号資産取引における最適な投資額を、リスクとリターンのバランスを考慮しながら、より実践的な方法で算出するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o kelly-criterion.zip https://jpskill.com/download/10415.zip && unzip -o kelly-criterion.zip && rm kelly-criterion.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10415.zip -OutFile "$d\kelly-criterion.zip"; Expand-Archive "$d\kelly-criterion.zip" -DestinationPath $d -Force; ri "$d\kelly-criterion.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して kelly-criterion.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → kelly-criterion フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ケリー基準 — 最適な賭け金サイズ

ケリー基準は、資本の長期的な幾何学的成長を最大化する、数学的に最適な賭け金サイズです。1956年にベル研究所のジョン・ケリーによって開発され、正確な問いに答えます。既知のエッジがある場合、複利成長率を最大化するために、あなたの資金のどれくらいの割合をリスクにさらすべきでしょうか?

核心的な洞察: 賭け金が小さすぎると、成長の機会を逃します。賭け金が大きすぎると、破滅のリスクが高まり、長期的な成長が実際に減少します。ケリー基準は、これらの極端な状態の間にある正確な最適点を見つけます。

実践的な洞察: ほぼ常にフル・ケリーを使用すべきではありません。エッジの推定誤差は、フル・ケリーが実際には過剰な賭けになることを意味します。実際の取引には、フラクショナル・ケリー(0.25倍から0.5倍)を使用してください。


ケリーの公式

二者択一の結果(勝ちまたは負け)の場合:

f* = (p * b - q) / b

ここで:

  • f* = 賭けるべき資金の最適な割合
  • p = 勝つ確率
  • q = 負ける確率 (1 - p)
  • b = ペイオフレシオ(平均勝利額 / 平均損失額)

同等の形式:

f* = p - q / b
f* = p - (1 - p) / b
f* = (p * b - (1 - p)) / b

Edge = p * b - q = リスクにさらした単位あたりの期待値。ケリー基準は、edge > 0 の場合にのみ意味があります。edge がゼロまたは負の場合、最適な賭け金はゼロです — 取引しないでください。

クイックリファレンス

勝率 ペイオフ 1:1 ペイオフ 1.5:1 ペイオフ 2:1 ペイオフ 3:1
40% -20% -6.7% 10% 20%
45% -10% 3.3% 15% 25%
50% 0% 16.7% 25% 33.3%
55% 10% 18.3% 27.5% 35%
60% 20% 26.7% 35% 40%

値はフル・ケリーの割合です。実際には、これらの数値の0.25倍から0.5倍を使用してください。


フラクショナル・ケリーを使用する理由

フル・ケリーは、pb を正確に知っていることを前提としています。実際には決してそうではありません。フラクショナル・ケリーが不可欠である理由は次のとおりです。

1. 推定誤差

100回の取引からの勝率の推定値には、おおよそ±5%の標準誤差があります。真の勝率が55%であるにもかかわらず、60%と推定した場合、フル・ケリーは〜50%過剰な賭けを行い、ハーフ・ケリーが達成するよりも長期的な成長が減少します。

2. 分散とドローダウン

フル・ケリーは、非常に高い分散を持ちます。フル・ケリーの予想される最大ドローダウンは、口座のおおよそ50〜80%です。これは心理的に壊滅的であり、実際には危険です(マージンコール、取引の継続不能)。

ケリーの割合 相対成長率 おおよその最大ドローダウン
1.0x (フル) 100% 50-80%
0.5x (ハーフ) ~75% 25-40%
0.25x (クォーター) ~50% 12-20%
0.1x (10分の1) ~25% 5-10%

3. 過剰な賭けと過小な賭けの非対称性

2倍の過剰な賭け(2fで賭ける)は、長期的な成長をゼロにします — まったく取引しないのと同じです。2倍の過小な賭け(0.5fで賭ける)は、依然として最適な成長率の〜75%を獲得します。過剰な賭けに対するペナルティは、過小な賭けよりも壊滅的に悪いです。

推奨される割合

割合 いつ使用するか
0.10x Kelly 非常に不確かなエッジ、新しい戦略、サンプル内の取引が30回未満
0.25x Kelly 適度な自信、30〜100回の取引、妥当なシャープレシオ
0.50x Kelly 高い自信、100回以上の取引、一貫したパフォーマンス
1.00x Kelly 実際には推奨されません

エッジの推定

ケリー基準には、勝率(p)とペイオフレシオ(b)の2つの入力が必要です。どちらもデータから推定する必要があります。

最小データ要件

  • ケリー計算には最低50回の取引が必要です。これ未満では、推定誤差が支配的になります。
  • ハーフ・ケリーのサイジングには100回以上の取引が推奨されます。
  • 積極的な割合を検討する前に200回以上の取引が必要です。

取引履歴からの計算

wins = [t for t in trades if t > 0]
losses = [t for t in trades if t < 0]

win_rate = len(wins) / len(trades)               # p
payoff_ratio = mean(wins) / abs(mean(losses))     # b
edge = win_rate * payoff_ratio - (1 - win_rate)   # should be > 0

kelly_full = (win_rate * payoff_ratio - (1 - win_rate)) / payoff_ratio

保守的な推定

点推定ではなく、勝率のウィルソン信頼区間の下限を使用します。

import math

def wilson_lower(wins: int, total: int, z: float = 1.96) -> float:
    """Lower bound of Wilson score interval (95% confidence)."""
    p = wins / total
    denominator = 1 + z**2 / total
    centre = p + z**2 / (2 * total)
    spread = z * math.sqrt((p * (1 - p) + z**2 / (4 * total)) / total)
    return (centre - spread) / denominator

勝率の信頼区間の下限を使用すると、サンプリングの運による過剰な賭けのリスクを軽減し、自動的に保守性が組み込まれます。

エッジの強さの分類

エッジの値 分類
< 0 ネガティブエッジ この戦略を取引しないでください
0 - 0.02 意味のあるエッジなし 取引コストがエッジを上回る可能性が高い
0.02 - 0.10 わずかなエッジ 保守的な割合のみ
0.10 - 0.20 良いエッジ 標準的な割合が適切
> 0.20 優れたエッジ まれです。過剰適合または一時的でないことを確認してください

マルチベット・ケリー(同時ポジション)

複数のポジションを同時に保持する場合:

独立したベット

ベットが相関していない場合、それぞれを個別のケリーの割合でサイジングできます。ただし、すべてのケリーの割合の合計は、1.0(ポートフォリオ全体)を超えてはなりません。超える場合は、それぞれを比例的にスケールします。

kelly_fractions = [0.15, 0.10, 0.12, 0.08]  # individual Kelly fractions
total = sum(kelly_fractions)  # 0.45
if total > 1.0:
    scale = 1.0 / total
    kelly_fractions = [f * scale for f in kelly_fractions]

相関のあるベット

相関のあるポジション(例:複数の SOL memecoin)は、事実上1つの大きなベットです。Redu

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Kelly Criterion — Optimal Bet Sizing

The Kelly criterion is the mathematically optimal bet size that maximizes long-term geometric growth of capital. Developed by John Kelly at Bell Labs in 1956, it answers a precise question: given a known edge, what fraction of your bankroll should you risk to maximize the compounding rate?

Core insight: Betting too small leaves growth on the table. Betting too large increases ruin risk and actually reduces long-term growth. Kelly finds the exact optimum between these extremes.

Practical insight: You should almost never use full Kelly. Estimation error in your edge means full Kelly will overbets in practice. Use fractional Kelly (0.25x to 0.5x) for real trading.


The Kelly Formula

For a binary outcome (win or lose):

f* = (p * b - q) / b

Where:

  • f* = optimal fraction of bankroll to bet
  • p = probability of winning
  • q = probability of losing (1 - p)
  • b = payoff ratio (average win / average loss)

Equivalent forms:

f* = p - q / b
f* = p - (1 - p) / b
f* = (p * b - (1 - p)) / b

Edge = p * b - q = expected value per unit risked. Kelly only makes sense when edge > 0. If edge is zero or negative, the optimal bet is zero — do not trade.

Quick Reference

Win Rate Payoff 1:1 Payoff 1.5:1 Payoff 2:1 Payoff 3:1
40% -20% -6.7% 10% 20%
45% -10% 3.3% 15% 25%
50% 0% 16.7% 25% 33.3%
55% 10% 18.3% 27.5% 35%
60% 20% 26.7% 35% 40%

Values are full Kelly fraction. In practice, use 0.25x to 0.5x of these numbers.


Why Use Fractional Kelly

Full Kelly assumes you know p and b exactly. You never do. Here is why fractional Kelly is essential:

1. Estimation Error

Your win rate estimate from 100 trades has a standard error of roughly ±5%. If your true win rate is 55% but you estimate 60%, full Kelly will overbets by ~50%, which reduces long-term growth below what half Kelly would achieve.

2. Variance and Drawdowns

Full Kelly has extremely high variance. Expected maximum drawdown for full Kelly is roughly 50-80% of account. This is psychologically devastating and practically dangerous (margin calls, inability to continue trading).

Kelly Fraction Relative Growth Rate Approximate Max Drawdown
1.0x (full) 100% 50-80%
0.5x (half) ~75% 25-40%
0.25x (quarter) ~50% 12-20%
0.1x (tenth) ~25% 5-10%

3. Asymmetry of Over vs. Under Betting

Overbetting by 2x (betting at 2f) produces zero long-term growth — the same as not trading at all. Underbetting by 2x (betting at 0.5f) still captures ~75% of the optimal growth rate. The penalty for overbetting is catastrophically worse than for underbetting.

Recommended Fractions

Fraction When to Use
0.10x Kelly Very uncertain edge, new strategy, < 30 trades in sample
0.25x Kelly Moderate confidence, 30-100 trades, reasonable Sharpe
0.50x Kelly High confidence, 100+ trades, consistent performance
1.00x Kelly Never recommended in practice

Estimating Your Edge

Kelly requires two inputs: win rate (p) and payoff ratio (b). Both must be estimated from data.

Minimum Data Requirements

  • 50 trades minimum for any Kelly calculation. Below this, estimation error dominates.
  • 100+ trades preferred for half Kelly sizing.
  • 200+ trades before considering aggressive fractions.

Calculation from Trade History

wins = [t for t in trades if t > 0]
losses = [t for t in trades if t < 0]

win_rate = len(wins) / len(trades)               # p
payoff_ratio = mean(wins) / abs(mean(losses))     # b
edge = win_rate * payoff_ratio - (1 - win_rate)   # should be > 0

kelly_full = (win_rate * payoff_ratio - (1 - win_rate)) / payoff_ratio

Conservative Estimation

Use the lower bound of a Wilson confidence interval for win rate rather than the point estimate:

import math

def wilson_lower(wins: int, total: int, z: float = 1.96) -> float:
    """Lower bound of Wilson score interval (95% confidence)."""
    p = wins / total
    denominator = 1 + z**2 / total
    centre = p + z**2 / (2 * total)
    spread = z * math.sqrt((p * (1 - p) + z**2 / (4 * total)) / total)
    return (centre - spread) / denominator

Using the lower bound of the confidence interval for win rate automatically builds in conservatism, reducing the risk of overbetting due to sampling luck.

Edge Strength Classification

Edge Value Classification Notes
< 0 Negative edge Do not trade this strategy
0 - 0.02 No meaningful edge Transaction costs likely exceed edge
0.02 - 0.10 Marginal edge Conservative fractions only
0.10 - 0.20 Good edge Standard fractions appropriate
> 0.20 Excellent edge Rare; verify not overfitting or temporary

Multi-Bet Kelly (Simultaneous Positions)

When holding multiple positions simultaneously:

Independent Bets

If bets are uncorrelated, each can be sized at its individual Kelly fraction. However, the sum of all Kelly fractions should not exceed 1.0 (total portfolio). If it does, scale each proportionally:

kelly_fractions = [0.15, 0.10, 0.12, 0.08]  # individual Kelly fractions
total = sum(kelly_fractions)  # 0.45
if total > 1.0:
    scale = 1.0 / total
    kelly_fractions = [f * scale for f in kelly_fractions]

Correlated Bets

Correlated positions (e.g., multiple SOL memecoins) are effectively one larger bet. Reduce each position proportionally to the correlation:

# Simple correlation adjustment
def adjust_for_correlation(kelly_fractions: list, avg_correlation: float) -> list:
    """Reduce Kelly fractions based on average inter-position correlation."""
    n = len(kelly_fractions)
    # Effective number of independent bets
    n_eff = n / (1 + (n - 1) * avg_correlation)
    scale = n_eff / n
    return [f * scale for f in kelly_fractions]

In crypto, meme token positions often have correlations of 0.5-0.8 with each other (they all dump together in risk-off). Treat them as partially one bet.

Portfolio Kelly Cap

Regardless of individual calculations, enforce a hard cap: total Kelly allocation should never exceed 1.0 (100% of portfolio). A practical maximum is 0.6-0.8 to leave cash buffer for drawdowns and new opportunities.


PumpFun / Meme Token Kelly

Meme token trading presents specific challenges for Kelly:

  1. Edge is hard to estimate: Win rates and payoff ratios shift rapidly with market regime.
  2. Fat tails dominate: A few large winners and many small losers. Standard Kelly assumes thin tails.
  3. Correlation spikes in drawdowns: All meme tokens can dump simultaneously.

Practical Adjustments

  • Use 0.1x to 0.25x Kelly maximum for meme tokens.
  • Cap absolute position size at 2-5% of portfolio regardless of Kelly output.
  • Recalculate edge weekly — stale estimates are dangerous.
  • If Kelly suggests > 30%, your edge estimate is almost certainly wrong. Use 5% maximum.
def meme_kelly(win_rate: float, payoff_ratio: float, account: float) -> float:
    """Conservative Kelly for high-uncertainty meme token trades."""
    kelly_full = (win_rate * payoff_ratio - (1 - win_rate)) / payoff_ratio
    kelly_conservative = kelly_full * 0.15  # 0.15x fractional
    max_fraction = 0.05                     # hard cap at 5%
    return min(max(kelly_conservative, 0), max_fraction) * account

When Kelly Does Not Work

Kelly optimality relies on assumptions that are often violated:

Assumption Reality Impact
Known edge (p, b) Estimated from noisy data Overbetting risk
Independent bets Correlated positions Ruin risk increases
Binary outcomes Continuous P&L distribution Formula approximation
Stationary edge Edge changes over time Stale sizing
No transaction costs Slippage, fees, MEV Effective edge lower
Unlimited divisibility Minimum position sizes Rounding needed

Mitigations

  1. Use fractional Kelly (addresses estimation error)
  2. Adjust for correlation (addresses dependence)
  3. Use continuous Kelly for non-binary returns (see references/kelly_derivation.md)
  4. Recalculate regularly (addresses non-stationarity)
  5. Subtract estimated costs from edge before calculating Kelly

Continuous Kelly (For Portfolio Returns)

When returns are continuous rather than binary win/lose:

f* = (μ - r) / σ²

Where:

  • μ = expected return of the strategy
  • r = risk-free rate (often 0 for crypto)
  • σ² = variance of returns

This is equivalent to Sharpe² / (2 * σ) when the Sharpe ratio is computed as (μ - r) / σ.

Use this form when you have a return stream rather than discrete win/loss trades. See references/kelly_derivation.md for the full derivation.


Integration with Other Skills

  • position-sizing: Kelly provides the optimal fraction; position-sizing translates that into units. Use Kelly as one input, then apply liquidity and volatility constraints from position-sizing.
  • risk-management: Kelly sizing must respect portfolio-level risk limits. If Kelly suggests 10% per trade but your risk policy caps at 5%, the cap wins.
  • strategy-framework: Document your Kelly parameters (fraction used, sample size, recalculation frequency) as part of strategy specification.
  • regime-detection: Recalculate Kelly when regime changes. Edge in a trending market differs from edge in a ranging market.

Files

References

  • references/kelly_derivation.md — Full mathematical derivation of Kelly criterion, fractional Kelly growth rates, continuous Kelly, and multi-outcome Kelly
  • references/practical_kelly.md — Edge estimation from trading data, confidence intervals, worked examples, common pitfalls, and danger zones

Scripts

  • scripts/kelly_calculator.py — Kelly calculator from win rate, payoff ratio, and account size. Prints fractional Kelly recommendations and sensitivity analysis. Dependencies: none.
  • scripts/kelly_from_trades.py — Estimate Kelly from a list of trade P&L values. Computes confidence intervals, rolling stability analysis, and recommended fraction. Dependencies: numpy.