Optimizing Betting on Korea Professional Baseball with the Frank–Wolfe Algorithm
Mon, May 19, 2025
by SportsBetting.dog
Introduction
The intersection of optimization algorithms and sports betting has opened up sophisticated ways for bettors and quantitative analysts to gain an edge in prediction and portfolio management. Among such algorithms, the Frank–Wolfe algorithm (also known as the conditional gradient method) stands out for solving constrained convex optimization problems efficiently.
In this article, we explore how the Frank–Wolfe algorithm works and delve into how it can be applied to betting on Korea Professional Baseball (KBO), one of Asia’s most popular baseball leagues. We'll discuss the mathematics behind the method, how it fits into a sports betting framework, and propose a system that leverages Frank–Wolfe to maximize expected returns from a portfolio of bets.
What is the Frank–Wolfe Algorithm?
The Frank–Wolfe algorithm is an iterative first-order optimization method used to solve problems of the form:
Where:
-
is a convex and differentiable objective function.
-
is a convex feasible region (e.g., a polyhedron or simplex).
Algorithm Steps
Given an initial point , the method iterates as follows:
-
Direction Finding Step:
-
Update Step:
where is a step size, either set via a line search or a predefined schedule such as .
Why Use Frank–Wolfe?
-
Simplicity: Only requires solving a linear subproblem at each step.
-
Efficiency in High Dimensions: Well-suited for large-scale optimization with sparse constraints.
-
Projection-Free: Does not require projecting onto the constraint set, unlike many other gradient-based methods.
Sports Betting as a Convex Optimization Problem
Modeling Sports Betting as a Portfolio
Betting can be viewed analogously to investing in assets. Each bet represents an asset with a probabilistic return. The bettor’s objective is to allocate capital among a set of bets to maximize expected utility or return, while managing risk and satisfying constraints like budget or betting limits.
Let’s Define:
-
Let be the number of possible bets (e.g., KBO game outcomes).
-
Let be a vector of fractions of capital allocated to each bet.
-
Let be the vector of true winning probabilities (subjectively estimated).
-
Let be the vector of odds offered by the bookmaker.
-
The expected return function is:
The goal is to minimize negative expected return, subject to:
This is a convex optimization problem over the probability simplex, ideal for Frank–Wolfe.
Applying Frank–Wolfe to Korea Professional Baseball Betting
Step 1: Data Collection and Probability Estimation
To apply the Frank–Wolfe algorithm, you need accurate probability estimates for each game outcome.
Sources:
-
Historical match data (scores, win/loss, pitcher stats, etc.)
-
Team and player performance metrics
-
Lineup announcements and injury reports
-
Weather and venue information
Use statistical modeling or machine learning methods (logistic regression, XGBoost, Bayesian models) to estimate probabilities of each team winning.
Step 2: Odds Retrieval
Gather bookmaker odds for all KBO games on a given day. You can use APIs like OddsAPI or scrape sportsbook websites.
Step 3: Constructing the Optimization Problem
Each bet corresponds to a possible team win or loss. Let’s say you’ve estimated that for a particular KBO match:
-
Doosan Bears win probability: 0.60
-
Bookmaker odds for Doosan Bears: 1.80
Then expected value for betting on Doosan is:
Now, compile this for all games and bets into a vector form:
Define the objective:
Subject to:
-
(capital allocation)
-
(no short betting)
Step 4: Applying Frank–Wolfe
-
Initialize: Start with as uniform allocation or betting nothing.
-
Compute Gradient:
-
Direction Finding: Solve:
This reduces to putting all capital on the best EV bet.
-
Update Allocation:
-
Repeat until convergence or a practical iteration limit is reached.
This process yields a betting portfolio: a distribution of your bankroll across the available KBO bets that (according to your model) maximizes expected profit.
Advantages of Frank–Wolfe in KBO Betting Predictions
-
Handles Simplex Constraints Naturally: No need for complex projection onto probability simplex.
-
Efficient for Daily Re-Optimization: As KBO games occur frequently, recalculating optimal bets daily is computationally feasible.
-
Robust to Noise: Small perturbations in odds or probabilities do not drastically affect the solution.
-
Sparse Solutions: Tends to produce solutions where only a few bets get large allocations – mimicking expert bettors who only bet when value exists.
Practical Considerations
Estimation Errors
If your probability estimates are inaccurate, the optimization won't help. It’s crucial to:
-
Regularly backtest your prediction model
-
Incorporate uncertainty (e.g., using Bayesian intervals)
-
Avoid overfitting to past seasons
Market Impact and Limits
Bookmakers may restrict bet sizes or change odds when large bets are placed. Thus, you may need to include liquidity constraints:
This remains a convex problem and still works with Frank–Wolfe.
Risk Management
Consider including variance or drawdown constraints:
-
Maximize Sharpe ratio instead of expected value.
-
Add a constraint on total variance:
Where is variance of return from bet .
Example Code (Python + CVXPY Approximation)
import numpy as np
import cvxpy as cp
# Example data
p = np.array([0.60, 0.45, 0.55]) # Estimated win probabilities
o = np.array([1.8, 2.1, 1.95]) # Bookmaker odds
n = len(p)
x = cp.Variable(n)
expected_return = cp.sum(cp.multiply(x, p * o - 1))
objective = cp.Maximize(expected_return)
constraints = [cp.sum(x) == 1, x >= 0]
prob = cp.Problem(objective, constraints)
prob.solve()
print("Optimal betting fractions:", x.value)
To apply the Frank–Wolfe algorithm explicitly, you'd use custom iterative updates as described in the algorithm section.
Conclusion
The Frank–Wolfe algorithm offers a powerful, projection-free method for optimizing sports betting portfolios, particularly when dealing with probability-simplex constraints as found in KBO betting strategies. Its iterative nature and sparsity-inducing properties align well with real-world betting behaviors, where only a few bets may be truly profitable.
By combining high-quality probabilistic modeling of KBO games with this convex optimization approach, bettors can move from intuitive gambling toward quantitatively grounded betting systems that aim to maximize expected return under risk and budget constraints.
Sports Betting Videos |