Sunday, February 4, 2007

Optimal staking subject to constraints

This came from a post in Punter's Paradise by The Dark Arts.

It's Sunday night, you've got 5 value calls on that night's NFL games. Let's say you can get 10/11 (1.909) but you make them 55% chances. However, they are each simultaneous kick off times.

What's your stake?

(BTW,I don't know the answer).

tda.


The maths for this is a mess, using partial derivatives and Lagrangian multipliers, but the stake sizes that maximise your bankroll long-term can be calculated.

Here's the situation: you make n simultaneous bets of ki of your bankroll B0 at oi, each of which has probability pi of occurring (for i = 1..n). The expected return Ei for each bet is

Ei = B0 (1 + ki (oi -1)^(pi) (1-ki)^(1-pi). (1)

Your expected bankroll B after the results come in is

B(k) = sum(i=1..n) Ei. (2)

However, you're subject to the constraint that you can't bet more than your entire bankroll:

g(k) := sum(i=1..n) ki <= 1. (3)

This is a problem for Lagrangian multipliers. We want to maximise B (Eq 2) subject to the constraint (Eq 3). We then want to solve for:

∂B/∂ki + λ ∂g/∂ki (4), for all i, and
g(k) <= 1 (5)

The derivation is a mess, with
∂B/∂ki = B0 (1 + ki (oi-1))^(pi-1) (1-ki)^(-pi) (pioi-1 - ki(oi-1)). (6)

I doubt there's a closed-form solution for this, but trial and error works - let's try a complicated case first, with two great-looking bets:

Bet .p. .o.. .k..
.1. 0.9 1.50 0.70
.2. 0.8 2.50 0.67


Our Kelly stakes add to 1.37 bankrolls and we only have one! So what's the best solution? Obviously, if we can't get as much on as we want, we should bet as much as we can, so we have a strict constraint - the <= is an equals sign. The derivatives of g are all one, so we're left with λ = ∂B/∂ki for all i - meaning that all the derivatives of B are the same. In this case, the only solution is for λ ~ 0.225, giving stakes of 41.8% and 58.2%.

The upshot of all this is that the optimal staking strategy is when the partial derivatives ∂B/∂ki are equal and the kis sum to at most one. There are two scenarios: first, if the Kelly stakes generated the usual way sum to less than 1, they're optimal. This is the case in TDA's question, which I'll get back to in a minute. If not, you're going to need to get your Excel solver working hard to satisfy the constraints. Or write some code.

In TDA's question, we had p=0.55, o=1.919 and n = 5. The optimal stake on each is 0.055, making a total stake of 0.275.

No comments: