Skip to content
LeetQuant
QT05 Betting Strategies and Risk Management

QT05 · Betting Strategies and Risk Management · Lesson 3 of 4

Risk of Ruin

Gambler's-ruin probabilities for fixed-size bets, why fixed-fraction betting trades ruin for deep drawdowns, the barrier formula exp(−2μa/σ²) for a drifting walk, and how drawdowns are distributed.

18 min

Objective

Compute the probability that a bettor or strategy with a positive edge still hits a disastrous level, and understand how that probability depends on bet size, edge and volatility.

Two kinds of ruin

  • Fixed size. You stake the same amount each time. Wealth is an additive random walk, and it can reach zero. Ruin is literal.
  • Fixed fraction. You stake a fixed fraction of current wealth (as Kelly does). Wealth is multiplicative and never reaches zero, but it can fall to 10% or 1% of the start.

In practice "ruin" means hitting any level at which you are forced to stop: a margin call, investor redemptions, a desk loss limit. So the general question is the probability of ever hitting a barrier, and the same mathematics answers both cases.

Gambler's ruin with unit bets

You have ii units, bet one unit per round, win with probability pp and lose with q=1−pq = 1 - p, and stop at 00 or NN. Let PiP_i be the probability of ruin. First-step analysis gives

Pi=p Pi+1+q Pi−1,P0=1,  PN=0.P_i = p\,P_{i+1} + q\,P_{i-1}, \qquad P_0 = 1,\; P_N = 0 .

A slicker route: with ρ=q/p\rho = q/p, the process ρXn\rho^{X_n} is a martingale, because

p ρx+1+q ρx−1=ρx(p⋅qp+q⋅pq)=ρx.p\,\rho^{x+1} + q\,\rho^{x-1} = \rho^x\left(p\cdot\tfrac{q}{p} + q\cdot\tfrac{p}{q}\right) = \rho^x .

Optional stopping at the exit time gives ρi=Pi⋅1+(1−Pi)ρN\rho^i = P_i \cdot 1 + (1 - P_i)\rho^N, so

Pi=ρi−ρN1−ρN(p≠q),Pi=1−iN(p=q).P_i = \frac{\rho^i - \rho^N}{1 - \rho^N} \quad (p \neq q), \qquad P_i = 1 - \frac{i}{N} \quad (p = q) .

Against an infinitely rich opponent (N→∞N \to \infty):

P(ruin)={(q/p)ip>q,1p≤q.P(\text{ruin}) = \begin{cases} (q/p)^i & p > q, \\ 1 & p \le q . \end{cases}

Ruin probability decays exponentially in the bankroll measured in bet units. Two consequences: halving the bet size doubles ii and therefore squares the ruin probability; and for a small edge, ln⁡(q/p)≈−2(p−q)\ln(q/p) \approx -2(p - q), so P(ruin)≈e−2(p−q)iP(\text{ruin}) \approx e^{-2(p-q)i}.

Worked example

bet size and ruin

A trader has $100,000 and takes repeated even-money trades that win with probability 0.550.55. What is the probability of ever going broke if each trade risks $5,000? If each risks $10,000?

Show solution

Here q/p=0.45/0.55≈0.8182q/p = 0.45/0.55 \approx 0.8182.

  • $5,000 trades: 20 units, P=0.818220≈0.0181P = 0.8182^{20} \approx 0.0181.
  • $10,000 trades: 10 units, P=0.818210≈0.134P = 0.8182^{10} \approx 0.134.

Doubling the trade size took the ruin probability from 1.8% to 13.4%, and indeed 0.1342≈0.0180.134^2 \approx 0.018. The small-edge approximation gives e−2(0.1)(20)=e−4≈0.0183e^{-2(0.1)(20)} = e^{-4} \approx 0.0183 for the first case, very close.

The continuous version: a drifting Brownian motion

Let Xt=μt+σWtX_t = \mu t + \sigma W_t with μ>0\mu > 0, starting at 0. What is the probability it ever reaches −a-a?

Look for θ\theta such that e−θXte^{-\theta X_t} is a martingale. Its drift is e−θXt(−θμ+12θ2σ2)e^{-\theta X_t}\left(-\theta\mu + \tfrac12\theta^2\sigma^2\right), which vanishes for θ=2μ/σ2\theta = 2\mu/\sigma^2. With an upper barrier bb, optional stopping gives 1=P eθa+(1−P)e−θb1 = P\,e^{\theta a} + (1 - P)e^{-\theta b}, and letting b→∞b \to \infty:

P(ever hit −a)=exp⁡ ⁣(−2μaσ2)=exp⁡ ⁣(−2⋅μσ⋅aσ).P(\text{ever hit } -a) = \exp\!\left(-\frac{2\mu a}{\sigma^2}\right) = \exp\!\left(-2\cdot\frac{\mu}{\sigma}\cdot\frac{a}{\sigma}\right) .

The second form is the useful one: the exponent is twice the Sharpe ratio times the barrier distance measured in units of volatility. The unit-bet walk is the discrete analogue: μ=p−q\mu = p - q, σ2≈1\sigma^2 \approx 1, giving e−2(p−q)ie^{-2(p-q)i} as above.

For a strategy whose log wealth drifts at gg with volatility σ\sigma, the probability of ever losing a fraction 1−x1 - x of starting wealth is e−2gln⁡(1/x)/σ2=x2g/σ2e^{-2g\ln(1/x)/\sigma^2} = x^{2g/\sigma^2}.

Fixed fraction: no ruin, but deep drawdowns

Bet fraction ff of wealth at even odds. Now look for θ\theta with W−θW^{-\theta} a martingale:

p(1+f)−θ+q(1−f)−θ=1.p(1+f)^{-\theta} + q(1-f)^{-\theta} = 1 .

At the Kelly fraction f=p−qf = p - q, θ=1\theta = 1 works exactly: p(1−f)+q(1+f)=1−f(p−q)=1−f2=(1+f)(1−f)p(1-f) + q(1+f) = 1 - f(p - q) = 1 - f^2 = (1+f)(1-f). So 1/Wn1/W_n is a martingale. When wealth first falls to xW0x W_0 or below, 1/W≥1/x1/W \ge 1/x; on paths that never fall that far, 1/W→01/W \to 0. Optional stopping gives

P(wealth ever falls to xW0)≤x.P\left(\text{wealth ever falls to } xW_0\right) \le x .

A full-Kelly bettor has roughly a 50% chance of halving at some point, a 10% chance of losing 90%, and a 1% chance of losing 99%. The inequality is an equality in the continuous limit: with drift μ\mu and volatility σ\sigma, Kelly's f∗=μ/σ2f^* = \mu/\sigma^2 gives log drift g=μ2/(2σ2)g = \mu^2/(2\sigma^2) and log volatility f∗σ=μ/σf^*\sigma = \mu/\sigma, so 2g/(f∗σ)2=12g/(f^*\sigma)^2 = 1 and the probability is x1x^1. In the discrete game the last step overshoots the barrier, so the probability is slightly less than xx.

These numbers do not depend on how large the edge is. That is the hidden cost of full Kelly.

Worked example

Kelly versus fixed size

With p=0.55p = 0.55 at even odds and $100,000, compare (a) a Kelly bettor staking 10% of current wealth and (b) a fixed-size bettor staking $10,000 each time. For each, what is the chance of ever going broke, and of ever falling to $50,000?

Show solution

(a) Kelly. f=p−q=0.1f = p - q = 0.1. The bettor never goes broke, since wealth is multiplied by 1.1 or 0.9. The probability of ever falling to half is at most 0.50.5; a simulation (below) gives about 0.48. The probability of ever falling to a quarter is at most 0.25 (simulation about 0.23).

(b) Fixed size. 10 units, so ruin is 0.818210≈0.1340.8182^{10} \approx 0.134. Falling to $50,000 means losing 5 units net: 0.81825≈0.3670.8182^{5} \approx 0.367.

The fixed-size bettor is less likely to halve, because once he is ahead his stake becomes a small fraction of wealth. But he has a 13% chance of total loss, and his wealth grows only linearly. Kelly removes ruin at the price of constant proportional volatility, so halvings stay likely forever.

A short Monte Carlo check of the Kelly bound:

import math
import random


def prob_ever_falls_to(x, p, f, cap=100.0, trials=20_000, seed=0):
    """Estimate P(wealth ever falls to x * start) for a fixed-fraction bettor.

    Each bet wins with probability p at even odds and stakes fraction f of
    current wealth. Paths that reach `cap` times start are treated as safe.
    """
    rng = random.Random(seed)
    up, down = math.log(1 + f), math.log(1 - f)
    lo, hi = math.log(x), math.log(cap)
    hits = 0
    for _ in range(trials):
        lw = 0.0
        while lo < lw < hi:
            lw += up if rng.random() < p else down
        hits += lw <= lo
    return hits / trials


print(prob_ever_falls_to(0.5, p=0.55, f=0.10))  # full Kelly
print(prob_ever_falls_to(0.5, p=0.55, f=0.05))  # half Kelly

It prints about 0.477 and 0.119. Capping at 100 times the start changes the answer negligibly: from there, falling back to half is a further 200-fold drop. Half Kelly cuts the halving probability by a factor of four; the next lesson shows why.

Drawdown statistics

The drawdown at time tt is the distance below the running peak, Dt=max⁡s≤tXs−XtD_t = \max_{s \le t} X_s - X_t, where XX is log wealth. The maximum drawdown over a period is the largest DtD_t.

  • No drift. For driftless Brownian motion, E[max drawdown over T]=σπT/2≈1.25 σTE[\text{max drawdown over } T] = \sigma\sqrt{\pi T/2} \approx 1.25\,\sigma\sqrt{T}. It grows without bound like T\sqrt{T}.
  • Positive drift μ\mu. The drawdown process is a Brownian motion with drift −μ-\mu reflected at zero. Its long-run distribution is exponential with rate 2μ/σ22\mu/\sigma^2: at a random time, P(D>a)=e−2μa/σ2P(D > a) = e^{-2\mu a/\sigma^2}, and the average drawdown is σ2/(2μ)\sigma^2/(2\mu).
  • Every depth eventually happens. Each new peak is a fresh start with a positive chance of a drawdown of depth aa, so over an infinite horizon every depth is reached with probability 1. With drift, the expected maximum drawdown grows only logarithmically in TT, with coefficient σ2/(2μ)\sigma^2/(2\mu).

Example: a strategy with arithmetic drift 10% and volatility 20% has log drift g=0.10−0.02=0.08g = 0.10 - 0.02 = 0.08. The rate is 2g/σ2=42g/\sigma^2 = 4, so the average log drawdown is 0.250.25 (about 22% below the peak), the chance that at a random time it sits more than 0.20.2 in log terms below its peak is e−0.8≈0.45e^{-0.8} \approx 0.45, and the chance of ever halving from the start is e−4ln⁡2=1/16e^{-4\ln 2} = 1/16.

Knowledge check

You bet one unit at a time against an infinitely rich house, winning each bet with probability 0.6. You start with 5 units. What is the probability you eventually go broke?

Knowledge check

A bettor stakes the full Kelly fraction on a favourable even-money bet, forever. Roughly what is the probability that their wealth ever falls to 25% of the starting amount?

Knowledge check

With fixed-size bets and a positive edge, your probability of ever going broke is 4%. You halve your bet size. What is it now, approximately?

Knowledge check

Log wealth follows a Brownian motion with drift g=5%g = 5\% and volatility σ=10%\sigma = 10\% a year. What is the probability that it ever falls 0.10.1 below its starting level?

Key takeaways

  • Unit-bet ruin against an infinite opponent is (q/p)i(q/p)^i; it decays exponentially in the bankroll measured in bet units, so halving bets squares the risk.
  • For a drifting Brownian motion, P(ever hit −a)=e−2μa/σ2P(\text{ever hit } -a) = e^{-2\mu a/\sigma^2}: twice the Sharpe times the barrier in volatility units.
  • Fixed-fraction betting cannot reach zero, but a full-Kelly bettor falls to a fraction xx of the start with probability about xx, whatever the edge.
  • Drawdowns of a drifting strategy are exponentially distributed with mean σ2/(2μ)\sigma^2/(2\mu); with no drift the expected maximum drawdown grows like 1.25 σT1.25\,\sigma\sqrt{T}.
  • Over a long enough horizon every drawdown depth occurs; loss limits closer than a few volatility units will be hit.

Practice problems

Finished reading?

Answer the 4 knowledge checks to complete this lesson (0 done).