Risk of ruin
If you bet one unit at a time on even-money bets with an edge, this is the chance you go broke before your bankroll runs away from zero. It falls exponentially with the number of units you start with.
01The formula
- the probability of winning each even-money bet
- the probability of losing it
- your starting bankroll, counted in betting units
- the chance you eventually lose the whole bankroll if you keep betting forever
02See it move
03Where it is used
- Retail traderChecks whether a positive-edge system is safe at their trade size, or likely to wipe them out on a bad run first.
- Risk managerUses ruin-style thinking to set loss limits so that a desk with a real edge survives its unlucky streaks.
- Market makerDecides how much capital a strategy needs, in units of its typical loss, before switching it on.
04Why traders use it
An edge only pays if you survive long enough to collect it. The formula shows that the cure for ruin is not a bigger edge but smaller bets: halving the bet size doubles n and squares the risk of ruin.
05Worked example
With a 52.0% chance of winning each bet and 20 units in the bankroll, the risk of ruin is 20.17%. Betting half as much cuts it to 4.07%. The edge per bet is only 4.0%, and you need about 57.5 units to bring the risk down to 1%.
06How it is built
- Let be the chance of ruin starting from units. After one bet you have or , so , with .
- Try : this gives , with roots and .
- With an edge, the chance of ruin must go to 0 as grows, so the answer is .
- Bets half the size double the number of units, so the risk becomes , the square of the old risk.
07The common mistake
Thinking a positive edge means you cannot go broke. With a 52% win rate and a small bankroll, ruin is still likely. And with no edge () ruin is certain if you play long enough.
08In Python and LaTeX
p, units = 0.52, 20 r = (1 - p) / p print(round(r**units, 4), round(r**(2*units), 4))
P(\text{ruin}) = \left(\frac{1 - p}{p}\right)^{n}, \qquad p > \tfrac1209Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.