← 返回
未分类 中文

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...
使用凯利准则计算最优投注金额。支持单注、分数凯利(四分之一、二分之一、四分之三)、多注组合规模及最大投注。
rsquaredsolutions2026
未分类 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 414
下载
💾 0
安装
1
版本
#agentbets#betting#latest#openclaw#prediction-markets#sports-betting

概述

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:

FormatExampleTo Decimal OddsTo Implied Prob
---------------------------------------------------
American (+)+1501 + odds/100 = 2.50100/(odds+100)
American (-)-2001 + 100/odds= 1.50odds/(odds+100)
Decimal2.50Already decimal1/decimal
Probability40%1/probAlready 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 <= 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/).

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-03 11:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Agent Betting Stack Advisor

rsquaredsolutions2026
推荐合适的工具、API和OpenClaw技能,用于构建自主投注代理。评估用户目标(体育博彩、预测市场,或混合)
★ 0 📥 445

World Cup 2026 Odds Tracker

rsquaredsolutions2026
聚合FIFA世界杯2026在体育博彩和预测市场的赔率,追踪冠军直接投注、小组赛赔率和比赛盘口,比较Polym...
★ 1 📥 427

Sports Odds Scanner

rsquaredsolutions2026
从20多家体育博彩公司获取实时投注赔率并比较盘口。支持NFL、NBA、MLB、NHL、足球及30多种体育项目。用于询问赔率、盘口等。
★ 1 📥 454