# Betting with Kelly - Kelly Criterion (Interactive Post)

In a random corner of a casino, you found a spin-the-wheel game.

The wheel seemed to be rigged to your favor - with 1 in 6 chance to triple your bet, 1 in 2 chance to double your bet, 1 in 6 chance to get back what you've bet and only 1 in 6 chance to lose what you've bet. The game master tells you that the casino had made way too much money last year and has created this game to give back.

Everyone in line get 20 spins at the game. You start with \$100 and can bet any amount for each spin.

If you have read the previous post, you might know that you can compound the winnings and bet incrementally allows your balance to grow exponentially. You could bet 100% of your balance each game but you are worried that landing on a 0x will zero you out.

How will you bet to maximise your final balance (and maybe take the casino home)?

Play the game below to test out your strategy:

## The Game

### Balance: \$100

Games Left:
20
History:
Bet:

#### Payouts for Given Bet

Payout
Chance
\$0.00
16.67%
\$10.00
16.67%
\$20.00
50.00%
\$30.00
16.67%

By this time you may have figured that the way to maximise the earnings is to bet a ratio of your total balance for each spin. But what ratio will that be?

Too high, you risk losing too much of your principle when you hit the zero.

Too little, you are not exactly compounding your winnings. After all, you only gets 20 spins.

To help you play many games at once, I've included a simulator below. For a start, you may tinker with the Percentage of wealth to bet to simulate how much you will walk away with by betting a fixed percentage of your balance.

Keep a lookout on the median balance as that will be the number you most likely walk away with. Also, keep a lookout of the distribution of results above and below the red line which denotes the starting balance.

Go ahead and play with the simulator, try a few ratios!

### Strategy Simulator

Percentage of wealth to bet (%):
Number of spins per game:
Number of simulations to run:

At this point, you probably tried simulating with a few ratios (including 100% I suppose). You would have realised the perfect ratio is between the range from 55% to 75%.

What you've done is a Monte Carlo method to figure the best ratio!

However, John Larry Kelly Jr. has a formula for bet sizing that leads almost surely to higher wealth compared to any other strategy in the long run known as the Kelly Criterion.

## Kelly Criterion

The formula is simple:

or

where:

• f* is the fraction of the current bankroll to wager, i.e. how much to bet
• b is the net odds received on the wager ("b to 1")
• p is the probability of winning
• q is the probability of losing, which is 1-p

In the case of this game, the probability of winning a bet (p) is 5/6 and that of losing (q) is 1/6. The only problem is calculating b.

If we assume the compounding effect on the long term, we can take the geometric mean of the odds (given that we landed on a non-zero):

which roughly equals to 1.888. Since b is the net odds, b = 0.888.

With all the numbers, you can calculate that f* roughly equals to 0.6456 or 64.56%.

Now try going back to the simulator with 64.56%. You will likely notice that by using the Kelly ratio:

• the median balance is the highest
• there is the least number of scenarios that end up with less cash than it started with

Try out the simulator with a larger number of spins per game, maybe 50, and you will notice that you will almost always make money with that ratio.

## Application of Kelly Criterion

Naturally, this post is not about a fictitious casino that is dumb enough to offer you a game that could potentially bankrupt them.

This post is to help you manage the risk of a financial asset by adjusting the amount invested in a single asset. Other than determining what fraction to wealth to allocate to an asset to limit your risk, Kelly Criterion can also be used to determine how much to leverage (since the ratio can be greater than 1).

Remember that it's not just all "High risk, high returns". You will need to adjust your portfolio allocation accordingly to the returns and risks involved.