Sports Bet Portfolio
IPL in-play betting hedge calculator. Mean-variance optimisation, Kelly Criterion, and Gemini AI for real-time cricket betting.
Sports betting is a market — and like any market, the edge comes from portfolio thinking, not individual bets. This tool treats a bettor's open positions like an investment portfolio and applies the same mathematical frameworks: Kelly Criterion for optimal sizing, mean-variance optimization for diversification, and dynamic hedging for risk control.
The core innovation is the in-play hedge calculator. As a cricket match unfolds — wickets fall, run rates shift — the odds move. The system monitors these shifts and identifies the exact moment and stake to place a counter-bet that locks in guaranteed profit regardless of the match outcome. It turns a speculative bet into an arbitrage.
Gemini AI is integrated as a reasoning layer: it reads match context (pitch conditions, batting order, momentum) and generates probability adjustments that feed into the Kelly calculator. The result is a human-readable recommendation with the math visible behind it.
- ▸Three-layer architecture: data layer (odds feeds), math layer (Kelly + mean-variance), and AI layer (Gemini for contextual adjustment).
- ▸Hedge calculator uses binary outcome payoff matrices — pre-match bet + in-play hedge = guaranteed profit band.
- ▸Portfolio frontier computed via constrained optimization (scipy.optimize) across correlated bets.