The Kelly Criterion: Introduction
This is the first post in a four-part series exploring the Kelly criterion:
- The Kelly Criterion: Introduction (this post)
- The Kelly Criterion: Multiple Investment Opportunities
- The Kelly Criterion: Where does the logarithm come from?
- The Kelly Criterion: Comparison with Expected Values
The Kelly criterion is a formula used to determine the optimal size of a series of bets in order to maximize wealth. It is often described as optimizing the logarithm of wealth, and will do better than any other strategy in the long run.
Let's look at a simple gamble: when you play, you win with probability and lose with probability . If you win, you get back your initial bet plus a fraction of that bet. If you lose, your bet is forfeited. The Kelly formula calculating the optimal fraction of your available wealth to bet is:
Here is a small demo to explore the formula:
Kelly calculation demo
Probability of winning: 80 %
Profit on win, as percentage of placed bet: 40 %
Optimal fraction of wealth bet in this game: 30 %
The main takeaways are:
- In each game you invest a fraction of the total amount of money you have. If you play the game from the demo () and you have $100 available, you should invest $30 (since ). If you win, you will have $112 () and invest $33.60 () in the second round. If you lost the first round you'd have $70, and invest $21 in the second round. If you can not reinvest your earnings, Kelly does not apply.
- This formula holds when a large number of games are played. If you play only few rounds of a game this may not apply.
- When it applies, the Kelly strategy will generate the most wealth out of your initial starting capital.
Derivation of the Kelly criterion
We will take a short dive into mathematics to understand how Kelly came up with this formula. Let's compute the wealth after the first round of gaming, when starting from an initial wealth :
Here, is the fraction of money bet, is the profit on win, is the fraction of the bet forfeited on loss (in the above scenario, ). is a random variable that's with probability and with . So with probability we'll have , giving , with probability we'll get .
We can reformulate the expression in a way that will show an important generalization:
The two expressions look very different, but they are equivalent since can only take on the values and . If the second term will vanish since , and we will get the same result for . The same consideration holds for .
If we repeat this game times, we arrive at
with being the number of wins in those games. Essentially, each won round adds a factor to the expression, each lost round .
Now comes a crucial step: how many wins do we expect after playing many games? Asked mathematically, what value will have for large ? Because of the law of large numbers we expect . So for and we would expect to win 8000 out of the 10000 games.
Let's plug this into our formula:
The law of large numbers allowed us to eliminate the random variables , and instead obtain an explicit formula in terms of . Since we are interested in maximizing our profit, we are looking for — the value that maximizes .
We are free to introduce the logarithm and drop the factor because this does not change the value of .1 Differentiating the logarithmic expression and solving for gives:
This is identical with the formula given in the introduction after substituting .
Extension to games with more than two possible outcomes
We can extend the Kelly argument to games that have a greater number of possible outcomes. Such games could be:
- A game with 6 different rewards selected by roll of a 6-sided die, where rewards may be negative (money lost)
- An investment in a stock, here we have a continuous range of outcomes.
If we have multiple outcomes , each happening with probability , we obtain:
While this equation is not easily solvable analytically, it is trivial to solve numerically. This allows us to extend the Kelly approach to a new kind of game with some interesting practical applications.
If you're interested in interactive plots that really helped me understand this material, you can find them in this Jupyter Notebook.
The Kelly formalism can be generalized further still, taking into account multiple parallel investment opportunities. We'll look at this in the next post.
1 The logarithm is a strictly monotonically increasing function, so . Thus it doesn't change the location of any maxima: . See Mark Schmidt's Argmax and Max Calculus paper for more information about properties of .