45. Kelly Criterion – Definition and Application

Published at 1659287136.706932

The Kelly criterion is the optimal ratio of assets to risk on each trade to maximize the long-term results. Different algorithms may need different amounts of capital or different amounts of leverage to perform well. The Kelly criterion shows that it’s not always optimal to risk 100% of our assets on every trade.

Kelly’s Formula

The Kelly criterion was first developed for a game to find the optimal ratio to bet. In this game, you either double your money or lose it in every bet. For example, suppose you have a 60% chance of winning on each bet and you can bet 300 times. Intuitively, if you bet all your capital every time, you would go bankrupt sooner or later even with a positive expected return on each bet. The optimal bet should thus be less than 100%.

The formula for the best bet is:

f* = p - q÷b = p - (1 - p)÷b 

where:

–   f* is the optimal percentage to bet;

–   p is the chance of winning;

–   q is the chance of losing (q = 1 − p);

–   b is the ratio between the amount won to the amount lost.

We can explain this formula as follows:

Kelly(%) = Chance of winning − Chance of losing ÷ (amount won ÷ amount lost)

Using the formula for the example above:

Kelly(%) = 60% − 40% ÷ 1 = 20%

So betting 20% of your total money is the best strategy in this example.

Note that this formula implies that you should never bet on anything with a negative expected return.

Investment Formula

Investing often involves partial losses, unlike gambling where the player may lose everything. There’s a need for a more universal form of the Kelly criterion to be applicable in the investment field:

   f* = p÷a - q÷b

where:

–   f* is the optimal percentage to bet;

–   p is the chance of winning;

–   q is the chance of losing (q = 1 − p);

–   a is the percentage of capital lost when losing;

–   b is the percentage of capital gained when winning.

One of the challenges of using Kelly is that it requires knowing the exact return on investment for each scenario, which is very hard to do in investing. Therefore, the Kelly criterion is not very popular among investors.

Kelly Criterion for Algorithmic Trading

According to the law of large numbers, algorithmic traders can estimate the long-term outcomes of their investments, such as expected return, MDD, winning rate, losing rate, and the profit or loss ratio in each case. These parameters enable the use of the Kelly criterion.

For example, after carefully backtesting and forward testing, an algorithmic trader finds out an algorithm has the following performance and expectations:

Intuitively, if two consecutive trades have 1 successful and 1 unsuccessful trade, this algorithm will make this profit:

(1 + 2%)*(1 - 1,84%) - 1 = 0,12%

This profit margin is small, so the trader uses maximum leverage to maximize their profit. In the Vietnamese derivative market, they use the default leverage of 5, hoping to make a profit of 0.12%*5 = 0.6% after one losing trade and one winning trade.

After a year of trading, they keep losing without knowing the reason. The Kelly criterion is the answer.

 

A good algorithm turns into a losing investment by using the default leverage on the Vietnamese derivatives market.

To find the optimal leverage parameter, Kelly’s formula can be applied as follows:

f*= 50%÷1.84% - 50%÷2% = 2.17

Using the Kelly criterion as above, the algorithmic trader will make a significant profit instead of a loss, while only using parts of the leverage. This approach can also benefit the entire trading system, as it allows another algorithm to take advantage of the unused capital. 

Note that using too much leverage will increase borrowing costs and transaction fees. It will negatively affect the final performance of the algorithm.

The Kelly criterion is a decisive parameter for algorithmic traders in gold, forex, and crypto markets. In these markets, the leverage can be up to 500 times the invested capital.