Tuesday, September 29, 2026

Risk-of-Ruin Max Stake Calculator - Ceiling Not Target

WCMI Risk-of-Ruin Max Stake Calculator — Ceiling, Not Target

From a Stylised Trade to a Real Session

In the TMDA post we asked whether one repeated wager is profitable, sustainable, and survivable, and found the largest stake fraction whose probability of a 50% drawdown inside 2,300 bets stayed under 5%. Clean inputs, clean answer.

A real exchange session is not like that. There is no single win probability and no single price. What there is is a history: a spreadsheet of every bet, with its stake and the market's net result. This post turns the survivability question loose on such a history and asks: what is the most I can put at risk in one market without a realistic chance, over time, of halving the starting bank?

Conservative ceiling
0.52%
€52.13 per market on a €10,000 bank
Basis
330 markets
5,880 bets · racing Win markets only
Observed return
+5.77%
€913.27 on €15,824.53 liability
Actual mean liability
€47.95
median €43.00 · max €252.98
Uncomfortable finding: the trader's average liability over the period (€47.95) sat within 8% of the ceiling the history itself implies (€52.13). The largest single-market liability was 4.9× over it. The session was profitable, but it was not being run comfortably under its own survivability limit — it was being run at it, with excursions well above.

The Question TMDA Left Open

So the question becomes: given this history, and a bank I refuse to see halved more than one time in twenty, what is the maximum liability I should carry into any one market?

Key Insight: the answer is a ceiling, not a target. It says where survivability breaks down, not where growth is fastest. Kelly asks the growth question and accepts a one-in-two chance of ever halving the bank; this asks for one-in-twenty, so the ceiling sits well below the Kelly fraction (roughly m / v, about 1.6% on this session).

The Model: Fixed-Stake Ruin

Treat the bank as a random walk with drift. Each market adds a result drawn from the same distribution: mean m and variance v per unit of liability. Stake a fixed fraction s of the starting bank in every market. The classical continuous-time result (Feller, Ross) gives the probability that the walk ever falls by D before drifting away:

RoR = exp( −2 · m · D / (s · v) )
s_max = 2 · m · D / ( v · ln(1/r) )
Symbol Meaning Value
s_max Maximum liability per market, as a fraction of the starting bank. Held fixed for a session; recalculated at session end. answer
m Mean market result per unit of liability history
v Variance of those results history
D Drawdown that counts as ruin, from the starting balance 50%
r Accepted probability of ever hitting that drawdown 5% → ln(1/r) = 2.9957

Two properties matter for what follows. First, s_max is linear in m and inversely proportional to v: how you measure the mean and variance from history decides the number. Second, if m ≤ 0 the ceiling is zero — no positive stake is safe without an edge, and the formula says so bluntly.

Attribution: this expression is often called the “Mason Malmuth formula” in poker circles. That attribution has been publicly retracted by Malmuth himself. It is the standard gambler's-ruin result for Brownian motion with drift and has no single eponym; cite Feller (1971, Vol. 2, Ch. XIV) or Ross (1996). Chen & Ankenman (2006, Ch. 22) give the poker-facing derivation.

The Data: An Exchange Report

The input is the exchange's own market P&L report, one row per bet: Date, Market, Ref No, Selection, Odds, Stake, Bet P&L, Market P&L, Net P&L. The file covers 2 March to 30 April 2026. A market is one betting event; its liability is the sum of stakes placed into it, and its result is the net P&L the exchange reports for it after commission. The calculator keeps racing Win markets only — other market types are other strategies and are sized separately — and drops any market whose recorded liability cannot bound its loss.

Quantity Win markets only
Bets (rows) 5,880
Markets 330
Total liability €15,824.53
Total net P&L €913.27
Overall return on liability 5.77%
Bets per market (mean) 17.8

The result per market is expressed as return on liability: net P&L divided by liability. A total loss is −1.00; scratching is 0.00; the best Win market in the period (€26 liability, €300.54 net) is +11.56. These ratios are the raw material for m and v.

Three Ways to Read the Same History

The formula wants a mean and a variance. There are at least three defensible ways to extract them from 330 market results, and they disagree by a factor of 3.3. Working through them is the point of the exercise.

Method 1 — Wins and Losses

The spreadsheet-trader's instinct: count profitable markets, compute a strike rate p, take the average odds of the winning selections O, and treat every market as a coin that pays O − 1 or loses 1.

p = 108 / 330 = 32.73%    O = 25.00 (mean odds of winning selections)
m = p · (O − 1) + (1 − p) · (−1) = 0.3273 × 24.00 − 0.6727 = 7.182
v = p · (24 − m)² + (1 − p) · (−1 − m)² = 137.60
s_max = 2 × 7.182 × 0.50 / (137.60 × 2.9957) = 1.74% = €174.22

Read m = 7.182 again. It claims the average market returns seven times its liability. The session's actual return was 5.77%. The method has silently assumed each win puts the whole liability on one selection at 25.0, when in fact the trader spreads eighteen bets across the field and a winning market returns about 2.6× liability, not 24×. Both m and v are inflated by orders of magnitude; the ratio happens to net out to a stake 2.5× too generous.

Why it flatters: Wins-and-Losses discards outcome size. It cannot distinguish a session of small wins and rare catastrophic losses from a session of large wins and modest losses, so long as the counts match. Prefer the size-weighted figures.

Method 2 — Profit and Loss (banded)

The spreadsheet approach: sort each market's return-on-liability into five bands, weight each band by how often it occurs and by its mean result. Sizes now survive, but each band is collapsed onto its mean.

Why these five bands, and not some other five: the cut points are not tuned to the data; they are the three values of return-on-liability that mean something to a trader. −1 is a total loss, the floor for anyone backing — you cannot lose more than you staked. 0 is a scratch: liability committed, nothing won or lost. +1 is the point where a market returns more than the liability that was risked in it. Those three points partition the number line into exactly five regions — total loss, partial loss (reds), scratch, modest win (greens), and outsized win — which is also how a trader describes a day. The regions do not overlap and, between them, cover every result a backer can record, so each market lands in exactly one band and the probabilities must sum to 100% by construction. When the checksum reads anything else, the bands are not what is wrong; the data is.
Band Meaning Count Probability Mean result Contribution to m
> 1 returned more than the liability 80 24.24% +258.72% +0.62720
0 .. 1 modest wins 28 8.48% +62.80% +0.05329
= 0 scratched 9 2.73% 0.00% 0.00000
−1 .. 0 partial losses 13 3.94% −66.86% −0.02634
= −1 total losses 200 60.61% −100.00% −0.60606
Total 330 100.00% m = +0.04809
m = Σ pi · xi = 0.04809    v = Σ pi · (xi − m)² = 2.2775
s_max = 2 × 0.04809 × 0.50 / (2.2775 × 2.9957) = 0.70% = €70.49

Now m is a believable 4.8% per unit of liability, in line with the observed 5.77% return. Three in five markets are total losses; one in four returns more than 2.5×. This is what a dutching session at long prices looks like, and the stake falls to 0.70%.

Method 3 — Raw Outcomes

Drop the bands. Weight all 330 market results equally at their own return on liability and compute the moments directly.

m = mean(xi) = 0.04809    v = var(xi) = 3.0796
s_max = 2 × 0.04809 × 0.50 / (3.0796 × 2.9957) = 0.52% = €52.13

The mean is identical to Method 2 — a probability-weighted mean does not care how finely you partition the outcomes. The variance is 35% higher. Banding replaced eighty individual wins ranging from +1.0 to +11.6 with a single value of +2.59, and two hundred losses with exactly −1; it threw away the spread within each band. The true per-market variance includes that spread, so the Raw stake is never higher than the banded one, and here it is a quarter lower.

Raw Outcomes is the honest method. It makes no distributional assumption beyond “the future draws from the same urn as the past”, it loses no information, and it is the one to act on.

Comparison and the Conservative Ceiling

Method m v s_max Cash Verdict
Wins and Losses 7.18179 137.602 1.74% €174.22 discards size
Profit and Loss (banded) 0.04809 2.278 0.70% €70.49 understates v
Raw Outcomes 0.04809 3.080 0.52% €52.13 ceiling
Wins and Losses
1.74% · €174.22
Profit and Loss
0.70% · €70.49
Raw Outcomes
0.52% · €52.13

Wins-and-Losses is 2.5× the banded figure; banded is 1.4× Raw. The calculator reports the minimum of the three as the conservative ceiling. In practice that is always Raw, and the other two are there so you can see how much the shortcut methods would have over-staked you.

Ceiling Versus What Was Actually Staked

The per-market detail the script writes alongside the report makes one more comparison possible: the ceiling against the liabilities the trader actually carried.

Ceiling (Raw, s_max)
€52.13
Median liability
€43.00
Mean liability
€47.95
Largest liability
€252.98

The median market was staked at 82% of the ceiling; the mean market at 92% of it; the largest at 485%. Caveat 1 says to stay comfortably underneath. This session was sitting close to the line and periodically jumping over it. It was profitable in the period — but with a 5% lifetime chance of halving at s_max, and materially worse odds on the €250 markets, “profitable in the period” is exactly what the 95% branch is supposed to look like.

Actionable: cap per-market liability at the ceiling and treat anything above two-thirds of it as needing a reason. On this bank that is roughly €35–€52 per market, recalculated at the end of each session (week or month) from the updated history.

Interactive Dashboard

To explore the ceiling across different parameters, we have created an interactive dashboard where you can:

  • Load the three measured (m, v) pairs from this session, or type your own from your report
  • Move the bank, the drawdown threshold and the risk tolerance
  • See s_max, the cash liability, and the round-trip RoR check update live
  • Read the ruin probability at multiples of the ceiling, with an Accept / Reduce / Avoid verdict


(Opens in a new window; allow popups if prompted)

How This Relates to TMDA

TMDA (Feb 2026) This calculator
Input One wager: P, O A history: 330 market results
Staking Fixed fraction of current bank (compounding) Fixed fraction of starting bank per market (fixed stakes)
Space Log-returns: μ, σ Arithmetic P&L per unit liability: m, v
Horizon Finite: n bets Infinite: “ever”
Question Is this stake survivable over n bets? What is the largest stake that is survivable at all?
Decision Accept / Reduce / Avoid A ceiling; m ≤ 0 ⇒ ceiling is zero (Avoid)

They are the same diffusion, asked two different questions. TMDA's finite horizon makes it less pessimistic than the “ever” version here; its compounding makes ruin in the strict sense impossible and so it measures drawdown instead, which is the same thing this calculator does with D.

The TMDA post's closing section on asymmetric payoffs is directly relevant. Whelan (2025) showed the diffusion approximation understates ruin when wins are rare and large. The Win session here has a 33% strike rate and winning selections at average odds of 25 — an asymmetry ratio of order K ≈ 24, far beyond the K = 9 example where diffusion missed by ten percentage points. So the 5% in “5% chance of halving at s_max” is best read as a lower bound; the discrete-chain figure will be materially higher. One more reason the number is a ceiling to stay under, not a target to reach.

Caveats

These travel with every result the script prints. Numbered so they can be cited.

  1. Treat s_max as a ceiling to stay comfortably underneath, not a target to reach.
  2. Asks whether you will ever hit the drawdown, not whether you will hit it in the next N markets. Pessimistic on that axis.
  3. Measures drawdown from the starting balance, not the running peak, which flatters the result — on balance the number errs generous.
  4. Assumes the reported history represents the session you are about to trade.
  5. Assumes fixed stakes: no resizing or moving down as the bank moves.
  6. Treats an observed edge as the true edge; optimistic on small samples. 330 markets is not many for a 33% strike rate at long prices.
  7. Continuous approximation of discrete outcomes. With K ≈ 24 the approximation understates ruin (Whelan 2025).
  8. Wins-and-Losses discards outcome size, so it flatters a session of small wins and rare large losses. Prefer the size-weighted figures.
  9. Profit-and-Loss collapses each band onto its mean, understating variance. Raw Outcomes is the honest one; prefer that.
  10. If m ≤ 0, s_max is 0%: no positive stake is safe without an edge.
Bottom Line: TMDA told you whether a bet is survivable. This tells you, from your own record, how big a bet could be before it stops being survivable. On this session the answer is under half a percent of the bank per market — and the session was already there.

References

  • Feller, W. (1971). An Introduction to Probability Theory and Its Applications, Vol. 2, Ch. XIV. Wiley.
  • Ross, S. M. (1996). Stochastic Processes, 2nd ed. Wiley.
  • Chen, B. & Ankenman, J. (2006). The Mathematics of Poker, Ch. 22. ConJelCo.
  • Whelan, K. (2025). “Ruin Probabilities for Strategies with Asymmetric Risk.” University College Dublin. [PDF]
  • matekus (2026). TMDA — Profitable, Sustainable, Survivable.

Claude used for the final sanity check of the analysis and for the complete generation of the visual theme.