Risk of ruin in algorithmic trading: how to calculate and avoid it
Risk of ruin is the probability you hit a floor before edge manifests. Learn practical approximations, why tail risk breaks naive formulas, and how kill-switches change the survival problem.
Risk of ruin sounds academic, but it is the correct language for a common retail failure mode: you sized too large relative to drawdown tolerance, then a normal losing streak ended the account.
Exact closed-form solutions rarely match reality because returns are not IID and leverage is nonlinear.
The operational definition
Pick a ruin threshold:
- account equity below X dollars
- or drawdown beyond Y percent where you must stop trading
Risk of ruin is the probability you hit that threshold before your process recovers.
Practical estimation without pretending you are a casino
Instead of fragile formulas, use a Monte Carlo or bootstrap simulator that respects:
- fat tails
- volatility clustering
- your actual position sizing rule
- fees and slippage
Then simulate many paths and measure the fraction that cross the ruin threshold.
The real lever: position sizing and stop-trading rules
Most "ruin" is not Gaussian noise. It is:
- leverage + liquidation
- one broken execution path
- one strategy bug
So the strongest interventions are operational:
- cap leverage
- cap per-strategy drawdown budgets
- automated kill-switch on execution drift
Why "edge percentage" is not enough without path risk
Even positive expectancy processes can hit ruin thresholds if:
- bet sizing grows with short-term performance
- leverage is dynamic
- drawdown constraints are soft
If your simulator assumes static sizing but you scale up after wins, your modeled ruin risk is fiction.
A practical Monte Carlo recipe (high level)
- build daily or trade-by-trade return series from OOS periods (preferred) or stressed IS
- resample blocks to preserve volatility clustering
- apply your real sizing rule and fee model
- count paths that hit the ruin threshold
Repeat with stressed costs. If ruin probability jumps orders of magnitude, your edge was partly a liquidity illusion.
Ruin is a joint statement about edge, variance, and discipline
Improving only the model while loosening sizing rules can increase ruin risk even if backtest returns rise.