Betting Analysis
Quick Start
bash
sports-skills betting convert_odds --odds=-150 --from_format=american
sports-skills betting devig --odds=-150,+130 --format=american
sports-skills betting find_edge --fair_prob=0.58 --market_prob=0.52
sports-skills betting evaluate_bet --book_odds=-150,+130 --market_prob=0.52
sports-skills betting find_arbitrage --market_probs=0.48,0.49
sports-skills betting parlay_analysis --legs=0.58,0.62,0.55 --parlay_odds=600
sports-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)
Odds Formats
| Format | Example | Description |
|---|
| American | , | US sportsbook standard. Negative = favorite, positive = underdog |
| Decimal | , | European standard. Payout per $1 (includes stake) |
| Probability | , | Direct implied probability (0-1). Polymarket uses this format |
Conversion rules:
- American negative: prob = -odds / (-odds + 100). Example: -150 → 150/250 = 0.600
- American positive: prob = 100 / (odds + 100). Example: +130 → 100/230 = 0.435
- Decimal: prob = 1 / odds. Example: 1.67 → 0.599
- Kalshi prices (0-100 integer): divide by 100 to get probability format
Commands
| Command | Required | Optional | Description |
|---|
| odds, from_format | | Convert between American, decimal, probability |
| odds | format | Remove vig from sportsbook odds → fair probabilities |
| fair_prob, market_prob | | Compute edge, EV, and Kelly from two probabilities |
| fair_prob, market_prob | | Kelly fraction for optimal bet sizing |
| book_odds, market_prob | book_format, outcome | Full pipeline: devig → edge → Kelly |
| market_probs | labels | Detect arbitrage across outcomes from multiple sources |
| legs, parlay_odds | odds_format, correlation | Multi-leg parlay EV and Kelly analysis |
| | open_odds, close_odds, open_line, close_line, market_type | Analyze open-to-close line movement |
Workflows
Workflow: Compare ESPN vs Polymarket/Kalshi
This is the primary workflow. The agent already has odds from ESPN and a prediction market — no user estimation needed.
- Get ESPN moneyline odds for a game (e.g., from ):
- Get Polymarket/Kalshi price for the same outcome (e.g., home team at ).
- De-vig the ESPN odds to get fair probabilities:
devig --odds=-150,+130 --format=american
→ Fair: Home 57.9%, Away 42.1% (removed ~3.5% vig)
- Compare fair prob to market price:
find_edge --fair_prob=0.579 --market_prob=0.52
→ Edge: 5.9%, EV: 11.3%, Kelly: 0.123
- Or do it all in one step:
evaluate_bet --book_odds=-150,+130 --market_prob=0.52
Workflow: Arbitrage Detection
Spot guaranteed-profit opportunities when prices across sources don't sum to 100%.
- Get the best available price per outcome from different sources:
- Source A (Polymarket): Home team at 0.48
- Source B (Kalshi): Away team at 0.49
find_arbitrage --market_probs=0.48,0.49 --labels=home,away
→ Total implied: 0.97 (< 1.0 = arbitrage!)
→ Guaranteed ROI: 3.09%
→ Allocation: 49.5% on home, 50.5% on away
- For 3-way football markets:
find_arbitrage --market_probs=0.40,0.25,0.30 --labels=home,draw,away
Workflow: Parlay Evaluation
Evaluate multi-leg parlays to see if the offered odds are +EV.
- De-vig each leg to get fair probabilities:
- Leg 1: → fair prob 0.58
- Leg 2: → fair prob 0.55
- Leg 3: → fair prob 0.50
parlay_analysis --legs=0.58,0.55,0.50 --parlay_odds=600
→ Combined fair: 15.95%, offered +600 implies 14.29%
→ Edge: 1.66%, +EV
- If legs are correlated (e.g. same-game parlay): add — this increases combined probability since correlated events are more likely to co-occur
Workflow: Line Movement from ESPN
Quantify how a line has moved and what it implies about sharp money.
- Get ESPN odds for a game — both open and close lines are available:
- Open moneyline: -140, Close moneyline: -160
- Open spread: -6.5, Close spread: -7.5
line_movement --open_odds=-140 --close_odds=-160
→ Probability shift: +3.21% toward favorite
→ Classification: sharp_action
- With spread too:
line_movement --open_odds=-140 --close_odds=-160 --open_line=-6.5 --close_line=-7.5
→ If ML and spread move same direction: sharp action confirmed
→ If they move opposite: reverse line movement (public vs sharp split)
Workflow: De-Vig Sportsbook Odds
Strip the vig/juice from DraftKings odds to see the "true" implied probabilities.
devig --odds=-110,-110 --format=american
→ Each side is 50.0% fair (standard -110/-110 spread/total)
devig --odds=-200,+170 --format=american
→ Favorite: 65.2%, Underdog: 34.8%
devig --odds=-150,+300,+400 --format=american
(3-way football)
→ Home: 47.3%, Draw: 19.8%, Away: 15.7%
Workflow: Odds Conversion
Convert odds from one format to another.
convert_odds --odds=-150 --from_format=american
→ Probability: 60.0%, Decimal: 1.6667
convert_odds --odds=2.50 --from_format=decimal
→ Probability: 40.0%, American: +150
Examples
User: "Is there edge on the Lakers game? ESPN has them at -150 and Polymarket has them at 52 cents"
devig --odds=-150,+130 --format=american
→ Fair home prob ~58%
find_edge --fair_prob=0.58 --market_prob=0.52
→ Edge ~6%, positive EV
kelly_criterion --fair_prob=0.58 --market_prob=0.52
→ Kelly fraction
- Present: edge, EV per dollar, recommended bet size as % of bankroll
User: "Can I arb this? Polymarket has home at 48 cents and Kalshi has away at 49 cents"
find_arbitrage --market_probs=0.48,0.49 --labels=home,away
- If arbitrage_found: present allocation percentages and guaranteed ROI
- If not: present the overround and explain there's no guaranteed profit
User: "Is this 3-leg parlay at +600 worth it?"
- De-vig each leg to get fair probs (e.g. 0.58, 0.62, 0.55)
parlay_analysis --legs=0.58,0.62,0.55 --parlay_odds=600
- Present: combined fair prob, edge, EV, +EV or -EV, Kelly fraction
User: "The line moved from -140 to -160, what does that mean?"
line_movement --open_odds=-140 --close_odds=-160
- Present: probability shift, direction, magnitude, classification (sharp action, steam move, etc.)
User: "What are the true odds for this spread? Both sides are -110"
devig --odds=-110,-110 --format=american
- Present: each side is 50% fair probability, vig is ~4.5%
User: "Convert -200 to implied probability"
convert_odds --odds=-200 --from_format=american
- Present: 66.7% implied probability, 1.50 decimal odds
Commands that DO NOT exist — never call these
— does not exist. This module analyzes odds, it doesn't fetch them. Use nba-data/nfl-data/etc. for ESPN odds, or polymarket/kalshi for prediction market prices.
— does not exist. Use or instead.
— does not exist. Use the skill for cross-platform comparison.
If a command is not listed in the Commands section above, it does not exist.
Key Concepts
- Vig/Juice: The sportsbook's margin. A -110/-110 line implies 52.4% + 52.4% = 104.8% total, meaning 4.8% overround. De-vigging removes this to get fair probabilities.
- Edge: The difference between your estimated true probability and the market price. Positive edge = profitable in expectation.
- Kelly Criterion: Optimal bet sizing that maximizes long-term growth. f* = (fair_prob - market_prob) / (1 - market_prob). For conservative sizing, multiply the Kelly fraction by 0.5 (half-Kelly) or 0.25 (quarter-Kelly).
- Expected Value (EV): Average return per dollar bet. EV = fair_prob / market_prob - 1.
- Arbitrage: When prices across sources don't sum to 100%, you can bet all outcomes and guarantee profit regardless of the result.
- Parlay: A multi-leg bet where all legs must win. Combined probability = product of individual leg probabilities. Higher risk, higher reward. Check if the offered odds exceed the fair combined odds.
- Line Movement: How odds change between open and close. Large moves toward one side suggest sharp/professional money. Reverse line movement (moneyline and spread moving opposite directions) suggests a public vs sharp split.