← 返回 Skills 市场
rsquaredsolutions2026

Kelly Criterion Bet Sizer

作者 rsquaredsolutions2026 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
133
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install kelly-sizer
功能描述
Calculate optimal bet sizes using Kelly Criterion. Supports single bets, fractional Kelly (quarter/half/three-quarter), multi-bet portfolio sizing, and max-b...
使用说明 (SKILL.md)

Kelly Criterion Bet Sizer

Calculate mathematically optimal bet sizes based on your edge and bankroll.

When to Use

Use this skill when the user asks about:

  • How much to bet on a specific wager
  • Kelly Criterion or optimal bet sizing
  • Position sizing for a bet with known edge
  • Fractional Kelly or conservative bet sizing
  • Sizing multiple simultaneous bets
  • Maximum bet limits or bankroll allocation

Odds Conversion Reference

Before computing Kelly, convert all odds to decimal probability format:

Format Example To Decimal Odds To Implied Prob
American (+) +150 1 + odds/100 = 2.50 100/(odds+100)
American (-) -200 1 + 100/ odds
Decimal 2.50 Already decimal 1/decimal
Probability 40% 1/prob Already prob

Operations

1. Single Bet — Full Kelly

Calculate the optimal Kelly stake for a single bet. User must provide: bankroll, odds (any format), and their estimated true probability.

python3 -c "
import sys
bankroll = float(sys.argv[1])
odds_input = sys.argv[2]
true_prob = float(sys.argv[3])

# Convert odds to decimal
if odds_input.startswith('+'):
    decimal_odds = 1 + int(odds_input[1:]) / 100
elif odds_input.startswith('-'):
    decimal_odds = 1 + 100 / abs(int(odds_input[1:]))
else:
    decimal_odds = float(odds_input)

b = decimal_odds - 1  # net odds
p = true_prob
q = 1 - p

# Kelly fraction
kelly_f = (b * p - q) / b if b > 0 else 0
kelly_f = max(kelly_f, 0)  # never negative

implied_prob = 1 / decimal_odds
edge = true_prob - implied_prob

print(f'Odds: {odds_input} (decimal: {decimal_odds:.4f})')
print(f'Implied prob: {implied_prob:.2%} | Your estimate: {true_prob:.2%} | Edge: {edge:.2%}')
print(f'Kelly fraction: {kelly_f:.4f} ({kelly_f:.2%} of bankroll)')
print(f'Recommended stake: \${kelly_f * bankroll:.2f} of \${bankroll:.2f} bankroll')
if kelly_f \x3C= 0:
    print('⚠️  No edge detected — Kelly says do not bet')
elif kelly_f > 0.10:
    print('⚠️  Kelly > 10% — consider fractional Kelly to reduce variance')
" BANKROLL ODDS TRUE_PROB

## About

Built by [AgentBets](https://agentbets.ai) — full tutorial at [agentbets.ai/guides/openclaw-kelly-sizer-skill/](https://agentbets.ai/guides/openclaw-kelly-sizer-skill/).

Part of the [OpenClaw Skills series](https://agentbets.ai/guides/#openclaw-skills) for the [Agent Betting Stack](https://agentbets.ai/guides/agent-betting-stack/).
安全使用建议
This skill appears to implement Kelly calculations correctly and only needs python3, but take these precautions before installing: (1) Verify the publisher/source — SKILL.md references AgentBets but registry metadata lacks a homepage. If provenance matters to you, ask the publisher for a source repo or contact info. (2) Confirm input formats: use true probability as a fraction (e.g., 0.40) unless the skill runner documents otherwise to avoid large errors. (3) Be cautious about how your agent substitutes user values into the provided python3 -c command: unsanitized inputs could cause shell/argument injection. Prefer a runner that passes arguments safely (argv) rather than interpolating into a shell string. (4) Remember this is financial advice: double-check results independently and consider regulatory/legal implications for betting in your jurisdiction.
功能分析
Type: OpenClaw Skill Name: kelly-sizer Version: 1.1.0 The skill is a legitimate utility for calculating bet sizes using the Kelly Criterion. The Python script in SKILL.md performs basic mathematical operations on user-provided inputs (bankroll, odds, and probability) and includes safety checks for negative edges and high variance. There is no evidence of data exfiltration, malicious execution, or prompt injection; the code is transparent and aligns perfectly with its stated purpose.
能力评估
Purpose & Capability
The name/description align with required bits (only python3) and the SKILL.md implements Kelly calculations. Minor inconsistency: SKILL.md claims 'Built by AgentBets' with tutorial links, while the registry metadata lists source as unknown and homepage as none — this mismatch is unexplained but not by itself dangerous.
Instruction Scope
SKILL.md runs a python3 -c command with user-supplied BANKROLL, ODDS, TRUE_PROB arguments. The doc does not precisely specify expected formats (is TRUE_PROB 0.40 or 40?) and the example relies on shell substitution; if an agent inserts unsanitized user text into that shell command it could lead to command/argument injection or mis-parsing. Aside from that, instructions do not request unrelated files, env vars, or external endpoints.
Install Mechanism
Instruction-only skill with no install spec. Requires python3 on PATH — low-risk and proportionate for the stated calculations.
Credentials
No environment variables, credentials, or config paths requested. The level of access requested is minimal and appropriate for the task.
Persistence & Privilege
Skill is not always-loaded and does not request persistence or system-level changes. Autonomous invocation is allowed (platform default) but not combined with other privilege concerns here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kelly-sizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kelly-sizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Add attribution links to agentbets.ai guides
v1.0.0
Initial release — AgentBets OpenClaw Skills series
元数据
Slug kelly-sizer
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Kelly Criterion Bet Sizer 是什么?

Calculate optimal bet sizes using Kelly Criterion. Supports single bets, fractional Kelly (quarter/half/three-quarter), multi-bet portfolio sizing, and max-b... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 133 次。

如何安装 Kelly Criterion Bet Sizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kelly-sizer」即可一键安装,无需额外配置。

Kelly Criterion Bet Sizer 是免费的吗?

是的,Kelly Criterion Bet Sizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kelly Criterion Bet Sizer 支持哪些平台?

Kelly Criterion Bet Sizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kelly Criterion Bet Sizer?

由 rsquaredsolutions2026(@rsquaredsolutions2026)开发并维护,当前版本 v1.1.0。

💬 留言讨论