Monte Carlo Backtest of Kelly and Fractional Kelly Strategies
You run a Monte Carlo backtest of a Kelly-style betting strategy on a sequence of independent favorable bets. Each bet wins with probability $p > 1/2$ and pays net odds of $b:1$ on a win (you gain $b$ times your bet on a win and lose your bet on a loss).
(a) Derive the Kelly-optimal fraction $f^{*}$ of wealth to bet each round to maximize expected log-wealth.
(b) In practice, you bet a fraction $cf^{*}$ with $c \in (0, 1)$ ("fractional Kelly"). How do the long-run expected log-growth rate and the volatility of log-wealth depend on $c$? Derive explicit expressions.
(c) Describe how you would use Monte Carlo simulation to compare the distribution of terminal wealth across different choices of $c$ over a finite horizon of $T$ rounds. Why do interviewers (and practitioners) emphasize the tradeoff between theoretical optimality and finite-horizon risk?
Hints
- Start with the standard Kelly derivation: maximize $G(f) = p \ln(1 + bf) + (1-p) \ln(1 - f)$. How does $G$ change when you replace $f$ with $cf^{*}$?
- For fractional Kelly, the growth rate loss is quadratic in $(1 - c)$ while volatility reduction is linear in $c$. What does this say about the risk-reward tradeoff near $c = 1$?
- In your Monte Carlo, use log-wealth as the primary metric (not arithmetic wealth). Plot the median and percentiles of terminal wealth vs. $c$ -- you will see that $c = 0.5$ often dominates $c = 1$ in risk-adjusted terms over finite horizons.
Worked Solution
How to Think About It: This problem connects the Kelly Criterion theory to practical implementation. Part (a) is the standard Kelly derivation. The interesting parts are (b) and (c): in theory, full Kelly ($c = 1$) maximizes long-run growth, but over any finite number of bets, the path can be extremely volatile. Fractional Kelly ($c < 1$) sacrifices some growth for dramatically lower variance, which matters when you have a finite bankroll and a finite horizon. The Monte Carlo simulation is how you quantify this tradeoff empirically.
Part (a): Kelly-Optimal Fraction
The expected log-growth rate per round when betting fraction $f$ is: $$G(f) = p \ln(1 + bf) + (1-p) \ln(1 - f)$$
Setting $G'(f) = 0$: $$\frac{pb}{1 + bf} = \frac{1-p}{1 - f}$$
Cross-multiplying and solving: $$f^{*} = \frac{pb - (1-p)}{b} = p - \frac{1-p}{b}$$
This is positive when $pb > 1-p$, i.e., when the expected return per dollar bet is positive.
The maximum growth rate is: $$G^{*} = G(f^{*}) = p \ln\left(1 + bf^{*}\right) + (1-p) \ln\left(1 - f^{*}\right)$$
Part (b): Fractional Kelly -- Growth Rate and Volatility as Functions of $c$
When you bet $f = cf^{*}$ with $c \in (0, 1)$, the log-growth rate per round is: $$G(c) = p \ln(1 + bcf^{*}) + (1-p) \ln(1 - cf^{*})$$
Growth rate: $G(c)$ is a concave function of $c$ that peaks at $c = 1$ (full Kelly). For small deviations from Kelly, the growth rate is approximately: $$G(c) \approx G^{*} - \frac{1}{2}|G''(f^{*})|(f^{*})^2(1 - c)^2$$
So the growth loss from fractional Kelly is quadratic in $(1-c)$: halving to $c = 0.5$ costs only about $25\%$ of the maximum growth rate, not $50\%$.
Volatility of log-wealth: The variance of the single-round log-return when betting $cf^{*}$ is: $$\sigma^2(c) = p(1-p)\left[\ln\left(\frac{1 + bcf^{*}}{1 - cf^{*}}\right)\right]^2$$
This is approximately proportional to $c^2$ for small $cf^{*}$: $$\sigma^2(c) \approx c^2 (f^{*})^2 (b+1)^2 p(1-p)$$
So the standard deviation scales linearly with $c$. Over $T$ rounds (independent bets), the total log-wealth has: - Mean: $T \cdot G(c)$ (roughly linear in $c$ near $c = 0$) - Standard deviation: $\sqrt{T} \cdot \sigma(c)$ (linear in $c$)
The Sharpe ratio of log-returns (growth rate divided by volatility) is approximately: $$\text{SR}(c) \approx \frac{G(c)}{\sigma(c)}$$
Since $G(c)$ is roughly linear in $c$ for small $c$ and $\sigma(c)$ is also linear in $c$, the Sharpe ratio is approximately constant for small $c$. But for larger $c$, the concavity of $G(c)$ means the Sharpe ratio actually decreases -- full Kelly has the highest growth but not the highest risk-adjusted return over finite horizons.
Part (c): Monte Carlo Simulation Design
Simulation procedure:
1. Fix parameters $p$, $b$, initial wealth $W_0 = 1$, horizon $T$ (e.g., $T = 1000$ rounds). 2. Choose a grid of $c$ values: e.g., $c \in \{0.1, 0.2, 0.3, \ldots, 1.0, 1.5, 2.0\}$. 3. For each $c$, run $M$ independent simulations (e.g., $M = 10{,}000$): - In each simulation, generate $T$ independent Bernoulli($p$) outcomes. - Track wealth: $W_{t+1} = W_t \cdot (1 + bcf^{*})$ on a win, $W_{t+1} = W_t \cdot (1 - cf^{*})$ on a loss. - Record terminal wealth $W_T$. 4. For each $c$, compute: - Median terminal wealth (more informative than mean for multiplicative processes). - 5th and 95th percentiles of terminal wealth. - Probability of drawdown exceeding some threshold (e.g., $P(W_T < 0.5 W_0)$). - Mean and standard deviation of $\log W_T$.
```python import numpy as np
def kelly_mc(p, b, T, c_values, M=10000): f_star = (p * b - (1 - p)) / b results = {} for c in c_values: f = c * f_star # Generate all outcomes at once: shape (M, T) wins = np.random.binomial(1, p, size=(M, T)) log_returns = np.where( wins, np.log(1 + b * f), np.log(1 - f) ) log_wealth = np.sum(log_returns, axis=1) wealth = np.exp(log_wealth) results[c] = { 'median': np.median(wealth), 'p5': np.percentile(wealth, 5), 'p95': np.percentile(wealth, 95), 'mean_log': np.mean(log_wealth), 'std_log': np.std(log_wealth), 'prob_ruin': np.mean(wealth < 0.5), } return results ```
Why the tradeoff matters:
Full Kelly ($c = 1$) maximizes the median terminal wealth as $T \to \infty$. But over finite horizons: - The distribution of terminal wealth under full Kelly is extremely right-skewed (log-normal with high variance). The mean is enormous, but the median can still be disappointing for moderate $T$. - Drawdowns under full Kelly can be severe: losing 50-80% of wealth before recovering is common. - Fractional Kelly ($c = 0.5$) gives up only about 25% of the growth rate but cuts the volatility of log-wealth in half, dramatically reducing the probability of large drawdowns. - Over-Kelly ($c > 1$) is catastrophic: expected log-growth decreases, and the probability of severe drawdown increases. At $c = 2$, expected log-growth is approximately zero.
Interviewers emphasize this because it tests whether you understand that theoretical optimality (infinite-horizon, log-utility) does not equal practical optimality (finite horizon, real constraints, career risk). A trader who bets full Kelly will eventually go through drawdowns that get them fired, even if the strategy is positive-EV.
Answer: (a) $f^{*} = (pb - q)/b$. (b) Growth rate $G(c)$ is concave in $c$, peaking at $c = 1$; volatility $\sigma(c)$ scales linearly with $c$. Half-Kelly sacrifices about 25% growth but halves volatility. (c) Simulate $M$ paths of $T$ rounds for each $c$, compare median wealth, percentiles, and drawdown probabilities. The key lesson: full Kelly is theoretically optimal but practically too aggressive for finite horizons and real-world constraints.
Intuition
The Kelly Criterion is a beautiful theoretical result, but the gap between theory and practice is the real lesson here. In theory, full Kelly maximizes long-run growth, and that is true -- over infinite horizons. But no trader has an infinite horizon. Over 1000 bets, the difference between $c = 1.0$ and $c = 0.5$ in median wealth is modest, but the difference in worst-case drawdowns is dramatic. A fund manager who loses 70% of capital is fired long before the law of large numbers kicks in.
The Monte Carlo simulation is the tool that makes this tradeoff concrete. It lets you see the full distribution of outcomes, not just the expected value. This is a general principle in quantitative finance: any time you have a strategy that is optimal "on average" or "in the limit," simulate it over realistic horizons to check whether the tails are survivable. The Kelly-to-fractional-Kelly story is the cleanest example of why mean-optimal is not the same as practically optimal.