Minor thing: If you already use partial derivatives in the post, I don't see why you couldn't have written the one application of lagrange multiplier theorem for the missing part.
The end result is the most elegant formulation of Kelly betting I've seen, however, I will keep using my usual formulation for my betting on prediction markets as that one is, in my opinion, better for quick calculation using only my head than this one.
Well, the one thing making that difficult is that I did not know the Lagrange multiplier theorem until reading this comment.
I agree this is in practice not directly applicable because buying contracts with all your money is silly.
Might want to mention that Kelly is an upper limit, and that most will then reduce from this on the basis of multiplying by some confidence function.
Kelly betting is a strategy for gambling, maximizing one's log(money) every round, by betting a fixed fraction of one's income. I will define Kelly betting a certain class of discrete prediction markets, give a simple Kelly betting rule for these prediction markets, and show it equivalent to the original Kelly formula in a two-outcome case.
A prediction market consists of a finite set of outcomes O, and a probability measure Q(O) on these outcomes. Participants may buy, for some outcome o, a contract that pays out $1 if o comes true, for a price of $Q(o). This assumes no transaction fees.
Suppose you have m money. You are going to spend all your money on these contracts, with R being a probability measure over O, and R(o) being the portion of money you spend on each type of contract. Note that you can buy some of each contract as an equivalent to holding on to money (e.g. to "hold on" to $2, buy 2 copies of each contract o, costing $2 in total; these contracts combined will always pay out $2). This means it's fine to assume that spending all your money on contracts doesn't compromise optimality.
If your subjective probabilities of the outcomes are defined by a probability measure P(O), what is the optimal R(O) that maximizes your log-money at the end of this round?
Your money conditional on outcome o is mR(o)/Q(o), since you are spending mR(o) on contracts costing Q(o) each. Therefore your expected log-money is:
f(R):=∑o∈OP(o)logmR(o)Q(o)=∑o∈OP(o)(logm+logR(o)−logQ(o))
Note that the log m and log Q(o) terms do not depend on R. We can therefore ignore these terms when taking the partial derivatives with respect to each R(o):
∂f(R)∂R(o)=∂(P(o)logR(o))∂R(o)=P(o)R(o)
If any of these partial derivatives are greater than any other, then expected log-money can be increased by moving a small amount of money from the outcome with the lower partial derivative to the one with the higher partial derivative (since f is continuous). Therefore, at the maximum of f, these partial derivatives all equal some constant c, i.e., P(o)/R(o)=c for some c. (Formally proving this might require some additional work, using the fact that f is concave and R(o) has to be positive whenever P(o) is positive; I'll omit this for brevity.)
Equivalently, R(o)=P(o)/c. But this must imply c = 1, since R and P are both probability measures; any other c value would result in R not summing to 1. This implies R = P. What this means is that the optimal Kelly betting strategy involves spending a P(o) portion of your money on contracts paying out conditional on each outcome o.
Interestingly, this is entirely independent of Q. This can also be seen by noticing that Q only contributes to additive terms in f that do not depend on R, such that the gradient does not depend on Q.
Is this equivalent to the original Kelly rule in a two-outcome case? This rule is given by:
f∗=p−1−pb where f* is the optimal portion of your money to bet, p is the probability of a win, and b is the ratio between how much is gained on a win versus how much is lost on a loss (e.g. on a triple-or-nothing coin toss, b = 2, because twice as much is gained on a win than is lost on a loss).
We can set O = {w, l} (w is win, l is loss) and determine Q as a function of b. Specifically, we set
Q(w)=1b+1
Q(l)=1−1b+1=bb+1
These are the implied house odds for b. If you spend x money on contracts paying out conditional on w, these contracts pay out x(b+1), corresponding to a net gain of xb money, whereas if you lose you simply lose x money; this therefore adequately translates b to a prediction market.
Our rule says to spend a P(w) = p portion of your money on w contracts, and a 1-p portion of your money on l contracts. Suppose your starting money is m. If you win, your ending money is
pm1/(b+1)=pm(b+1)
If you lose, your ending money is
(1−p)mb/(b+1)=(1−p)m(b+1)b
Your loss upon losing is therefore:
m−(1−p)m(b+1)b=m(1−(1−p)(b+1)b)=m(1−(1−p)bb−1−pb)
=m(1−(1−p)−1−pb)=m(p−1−pb)=mf∗ As expected, when you lose, you lose a f* portion of your money. This is how much the original Kelly betting rule would lose upon losing. Therefore, in the 2-outcome cases covered by Kelly betting, our rule would agree.
Why might this simple formulation be useful? The R = P formulation has given me greater intuition for Kelly betting and some ideas for how to extend it to more complex prediction markets. I find the formula a lot more intuitive, and its derivation more obvious, compared to the original Kelly betting formula.