Betting

machina-sports/sports-skills/skills/betting

作者 machina-sports09eb7e8566f4MIT242 个星标收录于 2026年10月8日更新于 2026年10月8日仓库3天前更新

Betting analysis — odds conversion, de-vigging, edge detection, Kelly criterion, arbitrage detection, parlay analysis, and line movement. Pure computation, no API calls. Works with odds from any source: ESPN (American odds), Polymarket (decimal probabilities), Kalshi (integer probabilities). Use when: user asks about bet sizing, expected value, edge analysis, Kelly criterion, arbitrage, parlays, line movement, odds conversion, or comparing odds across sources. Also use when you have odds from ESPN and a prediction market price and want to evaluate whether a bet has positive expected value. Don't use when: user asks for live odds or market data — use polymarket, kalshi, or the sport-specific skill to fetch odds first, then use this skill to analyze them.

仅含说明Business & Finance
AI 生成的概览

分析体育博彩赔率:格式转换、去水、优势与凯利下注、套利、串关和盘口变化。

功能
该技能对用户或其他技能提供的赔率进行纯计算。它可在美式、小数和概率格式之间转换,去除抽水以得到公平概率,对照市场价格计算优势与期望值,给出凯利下注比例建议,检测各结果间的套利机会,评估串关,并解读盘口变化。产出包括公平概率、优势百分比、期望值、保证回报率以及锐利资金、蒸汽盘等分类结果。
适用场景
当用户询问下注金额、期望值、优势分析、凯利准则、套利、串关、盘口变化、赔率转换,或比较不同来源的赔率时使用。当已有博彩公司赔率和预测市场价格、需要判断某笔投注是否具有正期望值时也适用。它不用于获取实时赔率或市场数据,这些需先由其他技能取得。
运行要求
不附带脚本,仅为说明文档。它需要提供 betting 模块的 sports-skills 命令行工具或 sports_skills Python 包,以及一份说明赔率格式与参数的参考文件。它不调用 API,无需凭据或网络访问,但分析前必须先从别处获取赔率。

Betting Analysis

Before writing queries, consult references/api-reference.md for odds formats, command parameters, and key concepts.

Quick Start

bash
sports-skills betting convert_odds --odds=-150 --from_format=americansports-skills betting devig --odds=-150,+130 --format=americansports-skills betting find_edge --fair_prob=0.58 --market_prob=0.52sports-skills betting evaluate_bet --book_odds=-150,+130 --market_prob=0.52sports-skills betting find_arbitrage --market_probs=0.48,0.49sports-skills betting parlay_analysis --legs=0.58,0.62,0.55 --parlay_odds=600sports-skills betting line_movement --open_odds=-140 --close_odds=-160

Python SDK:

python
from sports_skills import betting
betting.convert_odds(odds=-150, from_format="american")betting.devig(odds="-150,+130", format="american")betting.find_edge(fair_prob=0.58, market_prob=0.52)betting.find_arbitrage(market_probs="0.48,0.49")betting.parlay_analysis(legs="0.58,0.62,0.55", parlay_odds=600)betting.line_movement(open_odds=-140, close_odds=-160)

CRITICAL: Before Any Analysis

CRITICAL: Before calling any analysis command, verify:

  • Odds format is correctly identified (american, decimal, or probability).
  • ESPN odds are de-vigged with devig before computing edge vs prediction market prices.
  • This module computes — it does not fetch. Obtain odds from sport-specific skills or polymarket/kalshi first.

Workflows

Compare ESPN vs Polymarket/Kalshi

  1. Get ESPN moneyline odds (e.g., from nba get_scoreboard): Home: -150, Away: +130
  2. Get Polymarket/Kalshi price for the same outcome (e.g., home at 0.52)
  3. De-vig: devig --odds=-150,+130 --format=american → Fair: Home 57.9%, Away 42.1%
  4. Compare: find_edge --fair_prob=0.579 --market_prob=0.52 → Edge: 5.9%, EV: 11.3%
  5. Or all in one step: evaluate_bet --book_odds=-150,+130 --market_prob=0.52

Arbitrage Detection

  1. Get best price per outcome from different sources (Polymarket home at 0.48, Kalshi away at 0.49)
  2. find_arbitrage --market_probs=0.48,0.49 --labels=home,away
  3. Total implied 0.97 (< 1.0) → arbitrage found, guaranteed ROI: 3.09%

Parlay Evaluation

  1. De-vig each leg: Leg 1 → 0.58, Leg 2 → 0.55, Leg 3 → 0.50
  2. parlay_analysis --legs=0.58,0.55,0.50 --parlay_odds=600
  3. Returns combined fair probability, edge, and Kelly fraction

Line Movement Analysis

  1. Get ESPN open and close lines: Open -140, Close -160
  2. line_movement --open_odds=-140 --close_odds=-160
  3. Returns probability shift, direction, and classification (sharp_action, steam_move, etc.)

Examples

Example 1: Edge check using ESPN and Polymarket prices User says: "Is there edge on the Lakers game? ESPN has them at -150 and Polymarket has them at 52 cents" Actions:

  1. Call devig(odds="-150,+130", format="american") → fair home probability ~58%
  2. Call find_edge(fair_prob=0.58, market_prob=0.52) → edge ~6%, positive EV
  3. Call kelly_criterion(fair_prob=0.58, market_prob=0.52) → optimal bet fraction Result: Present edge percentage, EV per dollar, and recommended bet size as % of bankroll

Example 2: Arbitrage opportunity detection User says: "Can I arb this? Polymarket has home at 48 cents and Kalshi has away at 49 cents" Actions:

  1. Call find_arbitrage(market_probs="0.48,0.49", labels="home,away")
  2. Check arbitrage_found in result Result: If arbitrage: present allocation percentages and guaranteed ROI. If not: present overround and explain no guaranteed profit

Example 3: Parlay evaluation User says: "Is this 3-leg parlay at +600 worth it?" Actions:

  1. De-vig each leg to get fair probabilities (e.g., 0.58, 0.62, 0.55)
  2. Call parlay_analysis(legs="0.58,0.62,0.55", parlay_odds=600) Result: Present combined fair probability, edge, EV, +EV or -EV verdict, and Kelly fraction

Example 4: Line movement interpretation User says: "The line moved from -140 to -160, what does that mean?" Actions:

  1. Call line_movement(open_odds=-140, close_odds=-160) Result: Present probability shift, direction, magnitude, and classification (sharp action, steam move, etc.)

Example 5: De-vig a standard spread User says: "What are the true odds for this spread? Both sides are -110" Actions:

  1. Call devig(odds="-110,-110", format="american") Result: Present each side as 50% fair probability, vig is ~4.5%

Example 6: Odds format conversion User says: "Convert -200 to implied probability" Actions:

  1. Call convert_odds(odds=-200, from_format="american") Result: Present 66.7% implied probability and 1.50 decimal odds

Commands that DO NOT exist — never call these

  • get_odds — does not exist. This module analyzes odds; it does not fetch them. Use nba-data/nfl-data/etc. for ESPN odds, or polymarket/kalshi for prediction market prices.
  • calculate_ev — does not exist. Use find_edge or evaluate_bet instead.
  • compare_markets — does not exist. Use the markets skill for cross-platform comparison.

If a command is not listed in references/api-reference.md, it does not exist.

Troubleshooting

Error: ValueError: unknown format when calling convert_odds Cause: The from_format parameter is not one of american, decimal, or probability Solution: Use exactly american, decimal, or probability as the format string

Error: find_edge returns negative EV when a positive edge is expected Cause: Fair probability and market probability may be reversed, or de-vigging was skipped Solution: Run devig on sportsbook odds first, then pass the de-vigged fair_prob to find_edge

Error: find_arbitrage shows no arbitrage even when prices seem low Cause: Prices may sum to more than 1.0 when all outcomes are correctly included Solution: Verify you are using the correct probabilities for all outcomes; check total_implied in the result

Error: Kelly fraction is very high (greater than 0.5) Cause: Edge estimate is very large — often from a miscalculated fair probability Solution: Use half-Kelly or quarter-Kelly for conservative sizing. Re-verify fair probability via devig

来源与署名

来源:machina-sports/sports-skills位于skills/betting提交09eb7e8

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 machina-sports/sports-skills 的技能

World Cup

machina-sports

Premium FIFA World Cup 2026 market & match intelligence — a hosted, read-only layer that fuses official match truth (fixtures, standings, squads, injuries, player performance) with live prediction markets (Kalshi + Polymarket: prices, order books, price history, movers, cross-venue edges) and AI-grounded context (prematch briefs, move explanations, fan/social pulse). Every entity carries a canonical machina URN cross-walked across api-football, sportradar, opta, entain and ESPN, so a market resolves to a fixture resolves to two teams. This skill is prompt-only and premium: it routes the agent to the hosted World Cup Intelligence project (a per-project Machina MCP server) via `machina-cli`. It runs no code locally and ships no API keys. Use when: the user wants World Cup 2026 odds + match context together, asks "what moved and why", wants a grounded market brief or fan-sentiment read on a fixture, or needs one stable id that joins markets ↔ fixtures ↔ teams across providers. Don't use when: the user wants fr

待分类2423天前更新

Xctf Data

machina-sports

从 TFRRS 获取 NCAA 越野跑和田径运动员数据,并从 The Stride Report 获取新闻。

包含脚本
Data & Analytics2423天前更新

Sports Reporter

machina-sports

通过 sports-skills 命令行工具获取实时数据,生成原创体育新闻文章。

包含脚本
Writing & Content2423天前更新

Volleyball Data

machina-sports

通过 Nevobo API 获取荷兰排球数据:积分榜、赛程、赛果、俱乐部、赛事和新闻。

Data & Analytics2423天前更新

Polymarket

machina-sports

只读访问 Polymarket 体育预测市场:赔率、价格、订单簿、赛事与市场搜索。

包含脚本
Business & Finance2423天前更新

Metadata

machina-sports

通过 TheSportsDB 查询球队队徽、球员照片、球场与俱乐部信息,并支持球队和球员名称搜索。

Research & Analysis2423天前更新