Fixed-Odds Betting Arbitrage II

My recent post on fixed-odds betting arbitrage left some rather intriguing questions unanswered. Although I used Linear Programming to find an arbitrage opportunity, the focus was on constraint satisfaction, rather than optimality. But, then, if betting can be viewed as playing a sequential game with fate, what would the word “optimal” even mean in this context?

In this post, I will focus on optimality. I will assume the reader is already acquainted with my previous post and, therefore, for convenience I will abstain from “beginning at the beginning”. In other words, this post is not self-contained.

__________

Arbitrage

Given the odds matrix \Omega, the set of admissible \theta vectors \Theta \subseteq \mathbb{F}_2^m, and a budget c > 0, we would like to find a money allocation matrix X such that 1_{m n}^T \text{vec}(X) \leq c and

P (\theta, X; \Omega) \geq 0, \quad{} \forall \theta \in \Theta

so that, regardless of what \theta vector fate happens to choose, we make a profit. Let us enumerate the \theta vectors, \Theta = \{\theta^{(1)}, \theta^{(2)}, \dots, \theta^{(|\Theta|)}\}, where m \leq |\Theta|\leq 2^m. Since P (\theta, X; \Omega) = \text{vec}^T \left( R (\theta;  \Omega) \right) \text{vec}(X), the |\Theta| arbitrage inequalities can be written as

\left[\begin{array}{c} \text{vec}^T \left( R (\theta^{(1)};  \Omega) \right) \\ \text{vec}^T \left( R (\theta^{(2)};  \Omega) \right)\\ \vdots \\ \text{vec}^T \left( R (\theta^{|\Theta|};  \Omega) \right)\end{array}\right] \text{vec}(X) \geq \left[\begin{array}{c} 0 \\ 0 \\ \vdots \\ 0\end{array}\right].

Let \tilde{x} := \text{vec}(X). Hence, the inequality 1_{m n}^T \text{vec}(X) \leq c can be rewritten as 1_{m n}^T \tilde{x} \leq c. Let us define q_k := \text{vec} \left( R (\theta^{(k)}; \Omega) \right), and let

Q := \left[\begin{array}{cccc} q_1 & q_2 & \ldots & q_{|\Theta|}\end{array}\right]

be the m n \times |\Theta| matrix whose k-th column is q_k. Thus, the |\Theta| arbitrage inequalities can be written more compactly as Q^T \tilde{x} \geq 0_{|\Theta|} or, equivalently, as -Q^T \tilde{x} \leq 0_{|\Theta|}. Hence, so far, we have 1+|\Theta| inequality constraints

\left[\begin{array}{c} 1_{mn}^T\\ -Q^T\end{array}\right] \tilde{x} \leq \left[\begin{array}{c} c \\ 0_{|\Theta|}\end{array}\right].

Since the m n entries of matrix X must be non-negative, we have m n additional inequality constraints \tilde{x} \geq 0_{m n} or, equivalently, - I_{m n} \tilde{x} \leq 0_{m n}, where I_{m n} is the m n \times m n identity matrix.

To make the model more realistic, let us suppose that the amount of money being betted on outcome i \in [m] at bookmaker j \in [n] is bounded above by b_{ij} \geq 0, i.e., 0 \leq x_{ij} \leq b_{ij}. This is useful not only because bookmakers impose upper bounds on how much money one can bet, but also because it may happen that not all bookmakers are posting odds on the very same outcomes. By making b_{ij} = 0 one can make sure that no money will be betted on a certain outcome at a certain bookmaker. If bookmaker j is not imposing any upper bound on x_{ij} then we can make b_{ij} = c, i.e., the most we can bet on outcome i at bookmaker j is our budget c > 0. Let

B = \left[\begin{array}{cccc}b_{11} & b_{12} & \ldots & b_{1n}\\b_{21} & b_{22} & \ldots & b_{2n}\\\vdots & \vdots & \ddots & \vdots\\b_{m1} & b_{m2} & \ldots & b_{mn}\\\end{array}\right]

be the matrix of upper bounds, and let \tilde{b} := \text{vec}\left(B\right). Then, the m n inequalities x_{ij} \leq b_{ij} can be written more compactly as \tilde{x} \leq \tilde{b} or, equivalently, as I_{m n} \tilde{x} \leq \tilde{b}.

Finally, we have a total of 1+|\Theta| + 2 m n inequality constraints

\left[\begin{array}{c} 1_{mn}^T\\ -Q^T\\ - I_{m n}\\ I_{m n}\end{array}\right] \tilde{x}  \leq \left[\begin{array}{c} c \\ 0_{|\Theta|} \\ 0_{m n} \\ \tilde{b}\end{array}\right].

If we can find an m n-dimensional decision vector \tilde{x} that satisfies the 1+|\Theta| + 2 m n inequality constraints above, then we conclude that an arbitrage opportunity does exist. This is a constraint satisfaction problem.

As we discussed before, the 1+|\Theta| + 2 m n inequality constraints define a polytope in \mathbb{R}^{m n}. If this polytope is non-empty, then there exists at least one arbitrage opportunity. We can determine if the polytope is non-empty by solving a linear program with an arbitrary objective function

\begin{array}{ll} \displaystyle\min_{\tilde{x} \in \mathbb{R}^{mn}} & 0_{m n}^T \tilde{x} \\ \text{subject to} & \left[\begin{array}{c} 1_{mn}^T\\ -Q^T\\ - I_{m n}\\ I_{m  n}\end{array}\right] \tilde{x}  \leq \left[\begin{array}{c} c \\  0_{|\Theta|} \\ 0_{m n} \\ \tilde{b}\end{array}\right]\end{array}

where we chose 0_{m n}^T \tilde{x}, the most nihilistic of all linear objective functions. If this linear program is feasible, then an arbitrage opportunity does exist. In other words, we solve the constraint satisfaction problem via linear programming.

__________

Minimum Guaranteed Profit

We can go beyond mere arbitrage. Suppose we want to guarantee a minimum return of \alpha \geq 0 regardless of what \theta is chosen by fate, i.e.,

P (\theta, X; \Omega) \geq \alpha c, \quad{} \forall \theta \in \Theta.

Hence, instead of the linear inequality constraints Q^T \tilde{x} \geq 0_{|\Theta|}, we now have the linear inequality constraints Q^T \tilde{x} \geq \alpha c 1_{|\Theta|} or, equivalently, -Q^T \tilde{x} \leq -\alpha c 1_{|\Theta|}. Suppose also that the bookmakers impose no upper bounds on the x_{ij}. Hence, we have b_{ij} = c, and \tilde{b} = c 1_{m n}. We then have the following 1+|\Theta| + 2 m n inequality constraints

\left[\begin{array}{c} 1_{mn}^T\\ -Q^T\\ - I_{m n}\\ I_{m  n}\end{array}\right] \tilde{x}  \leq \left[\begin{array}{c} c \\ -\alpha c 1_{|\Theta|} \\ 0_{m n} \\ c 1_{m n}\end{array}\right].

Yet once again, we have a constraint satisfaction problem that can be solved via linear programming with an arbitrary objective function

\begin{array}{ll} \displaystyle\min_{\tilde{x} \in  \mathbb{R}^{mn}} & 0_{m n}^T \tilde{x} \\ \text{subject to} & \left[\begin{array}{c} 1_{mn}^T\\ -Q^T\\ - I_{m n}\\ I_{m   n}\end{array}\right] \tilde{x}  \leq \left[\begin{array}{c} c \\ -\alpha  c 1_{|\Theta|} \\ 0_{m n} \\ c 1_{m n}\end{array}\right]\end{array}.

Starting with a small \alpha, say \alpha = 0.01, and increasing it in a successive fashion until the linear program is no longer feasible, one can obtain money allocation matrices that yield higher and higher minimum guaranteed profits.

__________

Beyond Constraint Satisfaction

Instead of trying various values of \alpha until the linear program that solves the constraint satisfaction problem is no longer feasible, we can find the maximum \alpha via optimization. Note that Q^T \tilde{x} \geq \alpha c 1_{|\Theta|} can be rewritten as

\alpha c 1_{|\Theta|} - Q^T \tilde{x} \leq 0_{|\Theta|}.

Hence, we can find the maximum \alpha that yields a feasible linear program by solving the following maximization problem in (\alpha, \tilde{x}) with the additional inequality constraint \alpha \geq 0 or, equivalently, -\alpha \leq 0

\begin{array}{ll} \displaystyle\max_{(\alpha, \tilde{x}) \in   \mathbb{R}^{1 + mn}} & \left[\begin{array}{cc} 1 & 0_{m n}^T \end{array}\right]\left[\begin{array}{c} \alpha \\ \tilde{x}\end{array}\right] \\\\ \text{subject to} &  \left[\begin{array}{cc} -1 & 0_{m n}^T\\ 0 & 1_{mn}^T\\ c 1_{|\Theta|} & -Q^T\\ 0_{m n} & - I_{m n}\\ 0_{m n} & I_{m    n}\end{array}\right] \left[\begin{array}{c} \alpha \\ \tilde{x}\end{array}\right]  \leq \left[\begin{array}{c} 0\\ c \\ 0_{|\Theta|} \\ 0_{m n} \\ c 1_{m n}\end{array}\right]\end{array}

Note that now we do have an actual optimization problem, i.e., the linear program above is a maximization problem, not merely a constraint satisfaction problem. Since maximizing \alpha is the same as minimizing -\alpha, we can rewrite the maximization problem as a minimization problem, as follows

\begin{array}{ll} \displaystyle\min_{(\alpha, \tilde{x}) \in    \mathbb{R}^{1 + mn}} & \left[\begin{array}{cc} -1 & 0_{m n}^T  \end{array}\right]\left[\begin{array}{c} \alpha \\  \tilde{x}\end{array}\right] \\\\ \text{subject to} &  \left[\begin{array}{cc} -1 & 0_{m n}^T\\ 0  & 1_{mn}^T\\ c 1_{|\Theta|} & -Q^T\\ 0_{m n} & - I_{m n}\\  0_{m n} & I_{m    n}\end{array}\right] \left[\begin{array}{c} \alpha  \\ \tilde{x}\end{array}\right]  \leq \left[\begin{array}{c} 0\\ c \\  0_{|\Theta|} \\ 0_{m n} \\ c 1_{m n}\end{array}\right]\end{array}

The solutions of the maximization / minimization problems are maximin solutions, i.e., we are maximizing the minimum profit. In other words, we are pessimists and assume that fate will always choose the most damaging \theta \in \Theta. Hence, we choose a money allocation matrix X such that the minimum profit will be maximized. We are looking for the best worst-case scenario.

__________

Example: Sharapova versus Kirilenko

Let us revisit the tennis match we considered previously. Suppose that n = 2 bookmakers are posting odds for a Sharapova versus Kirilenko match, and that the bookies are offering odds for m = 2 mutually exclusive outcomes: Sharapova wins, or Kirilenko wins. Imagine that the bookies posted the following decimal odds

\Omega = \left[\begin{array}{cc} 1.25 & 1.43\\ 3.90 & 2.85\end{array}\right]

which means that bookie #1 is offering odds 1.25 for a Sharapova victory, whereas bookie #2 is offering odds 1.43 for the same outcome. Note that |\Theta| = 2 and that the Q matrix is

Q = \left[\begin{array}{cc} 0.25 & -1\\ -1 & 2.90\\ 0.43 & -1\\ -1 & 1.85\end{array}\right].

Assuming that the bookies impose no upper bounds on the x_{ij}, then the maximin return and the maximin money allocation matrix can be found by solving the linear program

\begin{array}{ll} \displaystyle\min_{(\alpha, \tilde{x}) \in     \mathbb{R}^{5}} & \left[\begin{array}{cc} -1 & 0_{4}^T   \end{array}\right]\left[\begin{array}{c} \alpha \\   \tilde{x}\end{array}\right] \\\\ \text{subject to} &   \left[\begin{array}{cc} -1 & 0_{4}^T\\ 0  & 1_{4}^T\\ c  1_{2} & -Q^T\\ 0_{4} & - I_{4}\\  0_{4} & I_{4}\end{array}\right] \left[\begin{array}{c} \alpha  \\  \tilde{x}\end{array}\right]  \leq \left[\begin{array}{c} 0\\ c \\   0_{2} \\ 0_{4} \\ c 1_{4}\end{array}\right]\end{array}

where c > 0 is our budget. The following Python 2.5 / CVXOPT script solves a linear program to determine whether there are arbitrage opportunities and, if so, what the maximin solution is:

 from cvxopt import matrix
 from cvxopt import spmatrix
 from cvxopt import solvers

 # available budget
 c = 100

 # build (decimal) odds matrix
 Omega = matrix([[1.25, 3.90],
                 [1.43, 2.85]])

 # build q vectors and Q matrix
 q1 = matrix([0.25, -1.0, 0.43, -1.0])
 q2 = matrix([-1.0, 2.90, -1.0, 1.85])
 Q = matrix([[q1], [q2]])

 # build 4x4 identity matrix
 Id = spmatrix(1.0, range(4), range(4))

 # ---------------
 # linear program
 # ---------------

 # build objective vector
 f = matrix([-1.0, matrix(0.0, (4,1))])

 # build inequality constraint matrices
 A = matrix([[-1.0, 0.0, c*matrix(1.0, (2,1)), matrix(0.0, (8,1))],
 [matrix(0.0, (1,4)), matrix(1.0, (1,4)), -Q.T, -Id, Id]])
 b = matrix([0.0, c, matrix(0.0, (6,1)), c*matrix(1.0, (4,1))])

 # solve linear program
 solvers.options['show_progress'] = True
 solution = solvers.lp(f, A, b)

 # print solution and profits
 sol = solution['x']
 alpha = sol[0]
 x = sol[1:5]

 # build money allocation matrix
 X = matrix([[sol[1], sol[2]],[sol[3], sol[4]]])

 print "\nMaximin return (%):"
 print 100 * alpha
 print "\nMaximin money allocation matrix:"
 print X
 print "Profit if Sharapova wins:"
 print q1.T * x
 print "Profit if Kirilenko wins:"
 print q2.T * x
 print "Total amount at stake:"
 print sum(x)

The output of this script is the following:

     pcost       dcost         gap    pres   dres   k/t
 0:  1.7194e-002 -5.0054e+002  7e+002 4e-001 2e+002 1e+000
 1:  1.9534e-001 -1.7513e+001  2e+001 2e-002 7e+000 1e+000
 2:  1.3994e-001 -2.3748e+000  2e+000 2e-003 1e+000 2e-001
 3:  1.4821e-002 -8.9421e-001  9e-001 8e-004 4e-001 7e-002
 4: -1.7326e-002 -9.9421e-002  7e-002 7e-005 3e-002 9e-004
 5: -3.8136e-002 -5.1946e-002  1e-002 1e-005 6e-003 3e-004
 6: -4.6244e-002 -4.6469e-002  2e-004 2e-007 9e-005 8e-006
 7: -4.6340e-002 -4.6343e-002  2e-006 2e-009 9e-007 8e-008
 8: -4.6341e-002 -4.6341e-002  2e-008 2e-011 9e-009 8e-010
Optimal solution found.

Maximin return (%):
4.63414537166

Maximin money allocation matrix:
[ 2.31e-006  7.32e+001]
[ 2.68e+001  1.53e-006]

Profit if Sharapova wins:
[ 4.63e+000]

Profit if Kirilenko wins:
[ 4.63e+000]

Total amount at stake:
99.999998456

Since a solution has been found, we conclude that at least one arbitrage opportunity exists. Moreover, the maximin return is 4.63\% and, hence, no matter what \theta fate does happen to choose, we have a guaranteed profit of at least 4.63\%. Indeed, note that regardless of which Maria wins the tennis match, the profit will be 4.63 for a budget of c = 100. The money allocation matrix is approximately

X = \left[\begin{array}{cc} 0.00 & 73.2\\ 26.8 & 0.00\end{array}\right].

As we have rounded off the money allocation matrix produced by the CVXOPT script, the profits will deviate slightly from the maximin ones:

Profit if Sharapova wins:
[ 4.68e+000]

Profit if Kirilenko wins:
[ 4.52e+000]

Total amount at stake:
100.0

Note that the profit in case Sharapova wins is slightly increased, whereas the profit in case Kirilenko wins is slightly decreased.

How “good” is the maximin solution? Let us compare the maximin solution we have just obtained with the mere constraint-satisfying solution we found before:

Profit if Sharapova wins:
[ 2.71e+000]

Profit if Kirilenko wins:
[ 9.14e-001]

Total amount at stake:
80.4618403492

where we have a return of 3.37\% in case Sharapova wins, and a return of 1.14\% in case Kirilenko wins. It is clear that the maximin solution is superior, not only because the returns are higher, but also because the variance of the returns is considerably lower.

Tags: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 47 other followers