kelly criterion: Nonlinear Function
Created: November 15, 2022
Modified: November 16, 2022

kelly criterion

This page is from my personal notes, and has not been specifically reviewed for public consumption. It might be incomplete, wrong, outdated, or stupid. Caveat lector.

We are given the opportunity to bet some fraction of our wealth on a coin flip with probability pp. We can repeat this as many times as we like. How much should we bet?

This seems like a tricky question because it has the form of a sequential decision problem: we can imagine a branching tree of decisions for how much to bet at each step, depending on how the previous bets have gone. Just as finding the optimal first move in chess would require solving the entire game, in the worst case determining the optimal first bet might require gaming out its potential repercussions into the infinite future.

The problem is also underspecified: the answer will depend on what our utility function is. However there are (at least) two natural choices of utility function for which the sequential decision problem simplifies dramatically: linear and logarithmic utility.

Formally, let wtw_t be a random variable for our wealth after tt steps, and rt{1,1}r_t \in \{1, -1\} represent the coinflip at step tt. If at each step we bet fraction btb_t of our current wealth, then our wealth will be multiplied by (1+rtbt)(1 + r_t b_t), that is, either (1+bt)(1 + b_t) or (1bt)(1 - b_t) depending on the outcome of the coinflip. Then our wealth after TT steps will grow as

wT=w0t=1T(1+rtbt).w_T = w_0 \cdot \prod_{t=1}^T (1 + r_t b_t).

In the case of linear utility, we try to maximize

E[wT]=w0E[t=1T(1+rtbt)]=w0t=1TE[1+rtbt]\mathbb{E}[w_T] = w_0 \cdot \mathbb{E}\left[\prod_{t=1}^T (1 + r_t b_t)\right] =w_0 \cdot \prod_{t=1}^T \mathbb{E}\left[1 + r_t b_t\right]

where we can move the expectation inside the product because each step is independent of the others. This shows that we can simply maximize E[rtbt]\mathbb{E}[r_tb_t] independently at each step, which simply means taking bt=1b_t = 1 (betting the entire bankroll) at all steps assuming that the rtr_t's have positive expectation. This is a counterintuitive strategy, since in the vast majority of cases we will lose everything, but those losses are offset by the enormous compounding of wealth in the world where we win all bets (which happens with probability pTp^T).

The other (and debatably more natural) assumption is that of logarithmic utility, where we try to maximize

E[logwT]=E[logt=1T(1+rtbt)]+logw0=E[t=1Tlog(1+rtbt)]+logw0=t=1TElog(1+rtbt)+logw0\begin{align*} \mathbb{E}[\log w_T] &= \mathbb{E}\left[\log \prod_{t=1}^T (1 + r_t b_t)\right] + \log w_0\\&= \mathbb{E}\left[\sum_{t=1}^T \log(1 + r_t b_t)\right] + \log w_0\\ &= \sum_{t=1}^T \mathbb{E} \log(1 + r_t b_t) + \log w_0\end{align*}

Taking logs converts compounding into a simple sum, where linearity of expectation works so that we need only consider the expectation at a single step, i.e., we need only maximize the expected growth rate

Elog(1+rtbt)=plog(1+b)+(1p)log(1b).\mathbb{E} \log(1 + r_t b_t) = p\log(1 + b) + (1 - p) \log (1 - b).

This can be solved by straightforward calculus, setting the derivative with respect to bb equal to zero,

p1+b=1p1b\frac{p}{1 + b} = \frac{1 - p}{1-b}

and solving for the optimal bet (the Kelly criterion),

b=2p1.b = 2p - 1.

Let's plug in numbers for intuition. If p=0.51p=0.51, the Kelly criterion says that we should bet 20.511=0.022 \cdot 0.51 - 1 = 0.02 of our wealth at each round. On the other hand, if p=0.8p=0.8, we should bet 20.81=0.62 \cdot 0.8 - 1 = 0.6 of our wealth.

Alternative arguments for the Kelly criterion

There are some alterative goals that also lead to the Kelly criterion: for example, maximizing wealth in the median outcome. See: