Kelly criterion


In probability theory and intertemporal portfolio choice, the Kelly criterion, also known as the scientific gambling method, is a formula for bet sizing that leads almost surely to higher wealth compared to any other strategy in the long run. The Kelly bet size is found by maximizing the expected value of the logarithm of wealth, which is equivalent to maximizing the expected geometric growth rate. The Kelly Criterion is to bet a predetermined fraction of assets, and it can seem counterintuitive.
It was described by J. L. Kelly, Jr, a researcher at Bell Labs, in 1956. The practical use of the formula has been demonstrated.
For an even money bet, the Kelly criterion computes the wager size percentage by multiplying the percent chance to win by two, then subtracting one. So, for a bet with a 70% chance to win, doubling 0.7 equates 1.4, from which you subtract 1, leaving 0.4 as your optimal wager size: 40% of available funds.
In recent years, Kelly-style analysis has become a part of mainstream investment theory and the claim has been made that well-known successful investors including Warren Buffett and Bill Gross use Kelly methods. William Poundstone wrote an extensive popular account of the history of Kelly betting.

Example

In one study, each participant was given $25 and asked to bet on a coin that would land heads 60% of the time. Participants had 30 minutes to play, so could place about 300 bets, and the prizes were capped at $250. The behavior of the test subjects was far from optimal:
Using the Kelly criterion and based on the odds in the experiment, the right approach would be to bet 20% of one's bankroll on each toss of the coin. If losing, the size of the next bet gets cut; if winning, the stake increases. If the bettors had followed this rule, an average of 94% of them would have reached the cap, and the average payout would be $237.36.
In this particular game, because of the cap, a strategy of betting only 12% of the pot on each toss would have even better results.

Statement

For simple bets with two outcomes, one involving losing the entire amount bet, and the other involving winning the bet amount multiplied by the payoff odds, the Kelly bet is:
where:
As an example, if a gamble has a 60% chance of winning, and the gambler receives 1-to-1 odds on a winning bet, then the gambler should bet 20% of the bankroll at each opportunity, in order to maximize the long-run growth rate of the bankroll.
If the gambler has zero edge, i.e. if, then the criterion recommends for the gambler to bet nothing.
If the edge is negative the formula gives a negative result, indicating that the gambler should take the other side of the bet. For example, in American roulette, the bettor is offered an even money payoff on red, when there are 18 red numbers and 20 non-red numbers on the wheel. The Kelly bet is, meaning the gambler should bet one-nineteenth of their bankroll that red will not come up. There is no explicit anti-red bet offered with comparable odds in roulette, so the best a Kelly gambler can do is bet nothing.
The top of the first fraction is the expected net winnings from a $1 bet, since the two outcomes are that you either win $ with probability, or lose the $1 wagered, i.e. win $−1, with probability. Hence:
For even-money bets, the first formula can be simplified to:
Since, this simplifies further to
A more general problem relevant for investment decisions is the following:
  1. The probability of success is.
  2. If you succeed, the value of your investment increases from to.
  3. If you fail the value of your investment decreases from to.
In this case, as is proved in the next section, the Kelly criterion turns out to be the relatively simple expression
Note that this reduces to the original expression for the special case above for.
Clearly, in order to decide in favor of investing at least a small amount, you must have
which obviously is nothing more than the fact that the expected profit must exceed the expected loss for the investment to make any sense.
The general result clarifies why leveraging decreases the optimal fraction to be invested, as in that case. Obviously, no matter how large the probability of success,, is, if is sufficiently large, the optimal fraction to invest is zero. Thus, using too much margin is not a good investment strategy when the cost of capital is high, even when the opportunity appears promising.

Proof

Heuristic proofs of the Kelly criterion are straightforward. The Kelly criterion maximizes the expected value of the logarithm of wealth. We start with 1 unit of wealth and bet a fraction of that wealth on an outcome that occurs with probability and offers odds of. The probability of winning is, and in that case the resulting wealth is equal to. The probability of losing is, and in that case the resulting wealth is equal to. Therefore, the expected value for log wealth is given by:
To find the value of for which the expectation value is maximized, denoted as, we differentiate the above expression and set this equal to zero. This gives:
Rearranging this equation to solve for the value of gives the Kelly criterion:
For a rigorous and general proof, see Kelly's original paper or some of the other references listed [|below]. Some corrections have been published.
We give the following non-rigorous argument for the case with to show the general idea and provide some insights.
When, a Kelly bettor bets times their initial wealth, as shown above. If they win, they have after one bet. If they lose, they have. Suppose they make bets like this, and win times out of this series of bets. The resulting wealth will be:
Note that the ordering of the wins and losses does not affect the resulting wealth.
Suppose another bettor bets a different amount, for some value of . They will have after a win and after a loss. After the same series of wins and losses as the Kelly bettor, they will have:
Take the derivative of this with respect to and get:
The function is maximized when this derivative is equal to zero, which occurs at:
which implies that
but the proportion of winning bets will eventually converge to:
according to the weak law of large numbers.
So in the long run, final wealth is maximized by setting to zero, which means following the Kelly strategy.
This illustrates that Kelly has both a deterministic and a stochastic component. If one knows K and N and wishes to pick a constant fraction of wealth to bet each time, one will end up with the most money if one bets:
each time. This is true whether is small or large. The "long run" part of Kelly is necessary because K is not known in advance, just that as gets large, will approach. Someone who bets more than Kelly can do better if for a stretch; someone who bets less than Kelly can do better if for a stretch, but in the long run, Kelly always wins.
The heuristic proof for the general case proceeds as follows.
In a single trial, if you invest the fraction of your capital, if your strategy succeeds, your capital at the end of the trial increases by the factor, and, likewise, if the strategy fails, you end up having your capital decreased by the factor. Thus at the end of trials, the starting capital of $1 yields
Maximizing, and consequently, with respect to leads to the desired result
Edward O. Thorp provided a more detailed discussion of this formula for the general case. There, it can be seen that the substitution of for the ratio of the number of "successes" to the number of trials implies that the number of trials must be very large, since is defined as the limit of this ratio as the number of trials goes to infinity. In brief, betting each time will likely maximize the wealth growth rate only in the case where the number of trials is very large, and and are the same for each trial. In practice, this is a matter of playing the same game over and over, where the probability of winning and the payoff odds are always the same. In the heuristic proof above, successes and failures are highly likely only for very large.

Using Python and SymPy

For a symbolic verification with Python and SymPy one would set the derivative of the expected value of the logarithmic bankroll to 0 and solve for :

>>> from sympy import *
>>> x, b, p = symbols
>>> y = p * log + * log
>>> solve

Bernoulli

In a 1738 article, Daniel Bernoulli suggested that, when one has a choice of bets or investments, one should choose that with the highest geometric mean of outcomes. This is mathematically equivalent to the Kelly criterion, although the motivation is entirely different.
An English-language translation of the Bernoulli article was not published until 1954, but the work was well-known among mathematicians and economists.

Multiple outcomes

Kelly's criterion may be generalized on gambling on many mutually exclusive outcomes, such as in horse races. Suppose there are several mutually exclusive outcomes. The probability that the -th horse wins the race is, the total amount of bets placed on -th horse is, and
where are the pay-off odds., is the dividend rate where is the track take or tax, is the revenue rate after deduction of the track take when -th horse wins. The fraction of the bettor's funds to bet on -th horse is. Kelly's criterion for gambling with multiple mutually exclusive outcomes gives an algorithm for finding the optimal set of outcomes on which it is reasonable to bet and it gives explicit formula for finding the optimal fractions of bettor's wealth to be bet on the outcomes included in the optimal set.
The algorithm for the optimal set of outcomes consists of four steps.
If the optimal set is empty then do not bet at all. If the set of optimal outcomes is not empty, then the optimal fraction to bet on -th outcome may be calculated from this formula:
One may prove that
where the right hand-side is the reserve rate. Therefore the requirement may be interpreted as follows: -th outcome is included in the set of optimal outcomes if and only if its expected revenue rate is greater than the reserve rate. The formula for the optimal fraction may be interpreted as the excess of the expected revenue rate of -th horse over the reserve rate divided by the revenue after deduction of the track take when -th horse wins or as the excess of the probability of -th horse winning over the reserve rate divided by revenue after deduction of the track take when -th horse wins. The binary growth exponent is
and the doubling time is
This method of selection of optimal bets may be applied also when probabilities are known only for several most promising outcomes, while the remaining outcomes have no chance to win. In this case it must be that

Application to the stock market

In mathematical finance, a portfolio is called growth optimal if security weights maximize the expected geometric growth rate.
Computations of growth optimal portfolios can suffer tremendous garbage in, garbage out problems. For example, the cases below take as given the expected return and covariance structure of various assets, but these parameters are at best estimated or modeled with significant uncertainty. Ex-post performance of a supposed growth optimal portfolio may differ fantastically with the ex-ante prediction if portfolio weights are largely driven by estimation error. Dealing with parameter uncertainty and estimation error is a large topic in portfolio theory.
The second-order Taylor polynomial can be used as a good approximation of the main criterion. Primarily, it is useful for stock investment, where the fraction devoted to investment is based on simple characteristics that can be easily estimated from existing historical data – expected value and variance. This approximation leads to results that are robust and offer similar results as the original criterion.

Single asset

Considering a single asset and a risk-free rate, it is easy to obtain the optimal fraction to invest through geometric Brownian motion.
The value of a lognormally distributed asset at time is
from the solution of the geometric Brownian motion where is a Wiener process, and and are constants. Taking expectations of the logarithm:
Then the expected log return is
For a portfolio made of an asset and a bond paying risk-free rate, with fraction invested in and in the bond, the expected one-period return is given by
however people seem to deal with the expected log return for one-period instead in the context of Kelly:
Solving we obtain
is the fraction that maximizes the expected logarithmic return, and so, is the Kelly fraction.
Thorp arrived at the same result but through a different derivation.
Remember that is different from the asset log return. Confusing this is a common mistake made by websites and articles talking about the Kelly Criterion.

Many assets

Consider a market with correlated stocks with stochastic returns, and a riskless bond with return. An investor puts a fraction of their capital in and the rest is invested in the bond. Without loss of generality, assume that investor's starting capital is equal to 1.
According to the Kelly criterion one should maximize
Expanding this with a Taylor series around we obtain
Thus we reduce the optimization problem to quadratic programming and the unconstrained solution
is
where and are the vector of means and the matrix of second mixed noncentral moments of the excess returns.
There is also a numerical algorithm for the fractional Kelly strategies and for the optimal solution under no leverage and no short selling constraints.

Criticism

Although the Kelly strategy's promise of doing better than any other strategy in the long run seems compelling, some economists have argued strenuously against it, mainly because an individual's specific investing constraints may override the desire for optimal growth rate. The conventional alternative is expected utility theory which says bets should be sized to maximize the expected utility of the outcome. Even Kelly supporters usually argue for fractional Kelly for a variety of practical reasons, such as wishing to reduce volatility, or protecting against non-deterministic errors in their advantage calculations.