The Kelly Criterion in Trading

How to use Kelly to determine position size

Huma
7 min readMar 20, 2024

Risk management: a concept foreign to many traders. In an age where trading styles like ‘degen’ and ‘left-curve’ are being promoted daily on crypto Twitter, along with 6 or 7 figure PnL flexes, it is no easy feat to remain rational with regard to position sizing. Managing risk, however, is perhaps the most important principle in trading: one mistake can lead to ruin, after which your trading journey will be over.

When expressing the risk associated with a trade, traders will often reference ‘R/R’, the risk/reward ratio. However, they fail to take into account that the two outcomes have different probabilities. This is where the Kelly criterion comes in. Kelly provides a formula for choosing the optimal bet size based on both the R/R as well as the probability of each outcome such that the long-term PnL is maximized.

This article aims to provide an overview of the Kelly criterion and explore how it can be used in trading. First, we’ll go over the simplest version of Kelly which can be used when gambling. Then, we’ll look at a slightly extended model that can be applied to trades and investments. Lastly, we’ll go over an example and see how Kelly can help determine the position size for your trade idea.

The Kelly criterion for gambles

Before looking at the Kelly formula for investments, let’s start with the most simple bet which you’d encounter when gambling. In this case, you wager a certain amount, and lose that amount in the case of a loss. The Kelly criterion looks as follows:

where:

  • f* is the fraction of your portfolio to wager
  • p is the probability of a win
  • q is the probability of a loss (q=1-p)
  • b is the proportion of the wagered amount gained in case of a win. E.g., if you were to bet $10 and the odds of the bet where 2-to-1, meaning you’d win $20 upon a win, then b=$20/$10=2.0

The Kelly criterion for investments

Now, we consider the Kelly criterion in the case where you do not necessarily lose the entire size of your bet, but rather a fraction a.

where:

  • f*, p, q are the same as above
  • a is the fraction lost in a negative outcome (if a coin drops 10%, you lose 10%, so a=0.1)
  • b is the fraction gained in a positive outcome (if a coin pumps 10%, you gain 10%, so b=0.1)

The below graph is an example showing the optimal Kelly bet: it is the wagered fraction f such that the growth rate r is maximized given the variables a, b, and p.

Graph showing the optimal Kelly bet

Kelly matrices

To gain some intuition with using Kelly, I created some matrices for different values of the probability p (50%, 75%, 90%). The values in the matrices show the optimal bet size for different values of a and b (25%, 50%, 75%, 100%).

Kelly values for p=0.50

Since p=0.50, this matrix is ‘skew-symmetric’. When a=0.5 and b=1, the Kelly bet is f*=0.5, meaning one should long with 50% portfolio size. On the flip side, when a=1 and b=0.5, the value is f*=-0.5, meaning one should short with 50% of portfolio size. This makes sense because if we flip the bearish/bullish outcomes (a/b) we should flip from long to short and vice versa.

Also notice that the values on the diagonal are zero. Clearly, when the probability of winning is 50% (similar to a coin toss) and you stand to gain as much as you stand to lose, it makes no sense to take the bet: the EV is zero.

Kelly values for p=0.75

When we increase p, the matrix starts to look a bit different. First of all, it is no longer skew-symmetric. Secondly, the diagonal elements are no longer zero. Both of these differences are explained by the fact that the odds are favored towards the positive outcome, so even if you were to win less in the positive outcome than you would lose in the negative outcome, the EV may still be positive.

Notice how quickly we’re seeing the sizing increase with leverage: if you were to win and lose 25% while p=75%, then Kelly suggests using 2x your portfolio size. Here, we can start to understand why many suggest using Kelly as a suggestion for ‘maximum size’ rather than using it as a strict rule. In this case, if you were to lose, half your portfolio would be wiped. Even if it may be the optimal choice mathematically, it would likely hit you emotionally and influence your trading afterward.

Kelly values for p=0.90

As we increase the probability of a win to 90%, we can see that the leverage is quickly getting ramped up as well. Another reason to view Kelly as a maximum size is that we can never be sure of the probability p: in practice, we always have to estimate the value of p. Whether you estimate p to be 75% or 90% can have a big impact on the value of f*, as can be seen above.

Example: APT/BTC

Thus far, we have discussed the theory behind Kelly. Next, let’s take a look at how we can apply Kelly in practice.

Main trade thesis

One trade I was personally interested in recently was the APT/BTC long trade. APT/BTC was sitting at support and there were signs of a possible rotation into APT. This made me believe it would make for a good trade. Below is a chart indicating the most important support/resistance zones.

APT/BTC 3D chart indicating horizontal support/resistance

You can see that APT/BTC is in a range between 17 and 30. At the time when I was looking into the trade, the ratio was sitting at 18. I believed there was a decent chance APT/BTC could go to the top of the range. With this range in mind, one can define SL and TP targets. Let’s say our SL is at 16 (failure to hold support) and our TP is at 30 (top of the range). This would give us the following values for a and b:

Estimating p

At this point, the only variable left is p. This is the the most important variable and also difficult to estimate. Not only is its value subjective, but it changes with time. A value of 60% or 80% can change the value of Kelly significantly: all the more reason to stay well below the Kelly criterion.

At the time, I would say my estimate for p was around 50%, indicating that both outcomes are approximately equally likely. However, it is important to realize that this variable is dynamic and can change as a result of many factors including:

  • The price of Bitcoin: BTC has been pumping relentlessly from 38k to 70k,. If it were to continue going up, it would likely suck liquidity out of alts and thus the APT/BTC ratio could take a hit. If, however, BTC were to cool off, we could see some rotation into alts (as we always see after a BTC pump followed by a cool-off), and this would stimulate the APT/BTC ratio.
  • The price of Solana: as the leading ‘alt-L1’, a higher SOL price is good for other alt-L1s because money will likely rotate out of SOL into other alt-L1s at some point.
  • Events and variables specifically related to Aptos: think of the APT/USDT chart, token unlocks, TVL, number of users, etc.

If you want to improve at estimating the probability p, and improve your forecasting skills in general, I highly recommend reading the book Superforecasting: The Art and Science of Prediction by Tetlock and Gardner.

Bringing it all together

Filling in our variables into the Kelly formula, we get the following:

In this case, Kelly would suggest a size of 3.79 times your portfolio size. Again, note that it is best to stay well below this value. And contrary to what SBF suggested, it is also not advisable to exceed the Kelly criterion. The variables a (stop-loss) and b (take-profit) are predetermined, but you can never be sure that your estimate of p is close to the true value. Depending on the confidence you have in your estimate of p, you could choose a value between 1x and 2x portfolio size.

Conclusion

Risk management should be something you think about consciously with every trade you enter. The goal of this article was to help traders manage their risk and choose their position size more consciously in order to maximize long-term PnL. The Kelly criterion should provide a helpful suggestion for the maximum size to use. And remember: never bet more than Kelly, or you might end up the same as SBF.

Further reading

--

--

Huma
Huma

Written by Huma

Researching crypto trading, mathematics, psychology and more

Responses (4)