The Kelly Factor or How to Size Your Bets
The Kelly factor is a powerful tool that allows us to size our bets in a way that maximizes the expected return while minimizing the risk of ruin.
The Kelly factor is a powerful tool that allows us to size our bets in a way that maximizes the expected return while minimizing the risk of ruin.
Gambling may be a dirty word, but decisions under uncertainty are everywhere. From the stock market to the poker table, we are constantly faced with the need to make decisions with incomplete information. One issue that often comes up is how much to bet. In the stock market, this is known as position sizing, in poker, it’s called bankroll management. In both cases, the goal is to maximize the expected return while minimizing the risk of ruin.
First let’s set up a game. We have a coin with a given probability of heads, $P$. We also have our initial capital, $C_0$. We can bet any fraction of our capital, $F$, on each flip.
Let’s say we bet $B = C * F$ on heads. If the coin comes up heads, we win $B * W$. If it comes up tails, we lose $B * L.$
We are interested in selecting $F$ such that our wealth after $N$ flips is maximized.
The Kelly factor, $F^*$, is the factor that maximizes the expected log wealth after $N$ flips. It is given by:
$$ F^* = \frac{P}{L} - \frac{Q}{W} $$Where:
Let’s unpack this formula, a bit:
Given that we bet $F^* * C$ on each flip, our capital is expected to grow exponentially at a rate of:
$$ \frac{1}{N} \log(1 + F^* * W - F^* * L) $$The Kelly factor was first introduced by John Kelly in 1956 in a rather readable paper (A New Interpretation of Information Rate). It is a powerful tool that allows us to size our bets in a way that maximizes the expected return while minimizing the risk of ruin. It is widely used in the stock market, poker, and other games of chance.
Interestingly enough, Kelly also deduced that the F factor is equal to the channel transmission rate in information theory. This is a powerful result that shows the connection between information theory and decision theory.
Let’s take a look at a more concrete example. We have the following game:
Intuitively, we would have no reason to bet, since the expected return is 0. However, let’s see what the Kelly factor says.
Let’s say we’re considering betting on A. The parameters are:
For the sake of completeness, let’s see what happens if we bet on B:
Thus, the Kelly factor matches our intuition and it reveals that the proposed bets are not profitable.
Let’s make things interesting. Suppose you have a better ML model than the bookmaker. You give player A a 0.7 probability of winning. The parameters are now:
If, on the other hand, we consider B:
In this case we are able to take advantage of the imbalance between the bookmaker’s odds and our own model’s odds. The Kelly factor tells us how much to bet in order to maximize our expected return.
While the Kelly factor is a powerful tool, it is not without its limitations. The most obvious one is that it assumes that the probabilities of the outcomes are known. In practice, this is rarely the case. In the stock market, for example, the probabilities of the outcomes are unknown and constantly changing. In poker, the probabilities are known, but the opponents are constantly adapting to your play.
In a subsequent post, I will combine the Kelly factor with reinforcement learning techniques to create a more robust betting strategy that explores and learns the underlying probabilities.
To help you get an intuition for the Kelly factor, I’ve created a simple simulator. Give it a go, tell me what you think.
The number of draws we have in a game.
The number of games we simulate.
The probability of winning a draw.
The factor by which we multiply our bet when we win.
The factor by which we multiply our bet when we lose.
The amount of money we start with.
Kelly factor:
The optimal fraction of our capital we should bet in each round.
Other factors:
I have introduced the Kelly factor, a powerful tool that allows us to size our bets in a way that maximizes the expected return while minimizing the risk of ruin. We have seen how it can be used in practice to size bets in a tennis match. In a subsequent post, I will combine the Kelly factor with reinforcement learning techniques to create a more robust betting strategy that learns the underlying probabilities while also maximizing the expected return.