Applying Ruin Math to Your Account: Step-by-Step
How Do You Apply Ruin Math to Your Real Trading Account?
Ruin mathematics becomes valuable only when you stop treating it as an abstract concept and start treating it as a practical tool that guides every position you size. This article is a working guide: you will learn the actual formulas traders use, how to gather the inputs from your own trade history, and how to make a specific position-sizing decision based on your ruin probability output. By the end, you will have a repeatable process that answers the question every profitable trader must ask: "Given my actual edge, what is the probability my account will go to zero if I size at X% of my capital per trade?" Without this calculation, you are flying blind.
> Quick definition: Ruin calculation is the application of probability theory and your specific trading statistics (win rate, payoff ratio, position size) to estimate the likelihood that a losing streak will deplete your account to zero before winning trades can recover it.
Key takeaways
- The Gambler's Ruin formula requires three inputs: win probability, loss probability, and the odds ratio; it outputs ruin probability.
- You must gather at least 30–50 real trades to estimate win rate and payoff ratio with minimal error; fewer trades produce unreliable estimates.
- A realistic ruin probability threshold is 1–5%: anything above 5% indicates overleveraging.
- Ruin probability is non-linear: doubling position size does not double ruin probability—it often increases it 10–50x.
- You should recalculate your ruin probability quarterly as your trade history evolves and your edge may shift.
The Gambler's Ruin Formula: The Math
The classical Gambler's Ruin problem has a closed-form solution. If you have an edge (win probability > loss probability), the formula for ruin probability is:
Ruin Probability = [(1 - p) / p]^N
Where:
- p is your win probability
- (1 - p) is your loss probability
- N is the number of times your initial bankroll
can be divided into units of one bet
However, this formula assumes a fixed payoff ratio of 1:1 (you risk $1 to win $1). Most trading is not 1:1. A more general formula that accounts for varying payoff ratios is:
Ruin Probability = [(q / p)]^N
Where:
- q = (1 - b*p) / (1 - b)
- b is your payoff ratio (average win / average loss)
- p is your win probability
- N is your number of bet units (account size / bet size)
This is more complex, but spreadsheet software handles it easily.
Gathering Your Input Data
Before you can calculate ruin probability, you need three pieces of information from your actual trading history:
Input 1: Win Rate (p)
Review your last 30–100 trades. Count the number of wins and divide by total trades.
Example:
Last 80 trades: 48 wins, 32 losses
Win rate p = 48 / 80 = 0.60
If you have fewer than 30 trades, your win rate estimate is unreliable. Do not trade yet; accumulate more history first.
Input 2: Payoff Ratio (b)
Calculate the average size of your wins and the average size of your losses.
Example:
Sum of all winning trades: $8,000
Number of winning trades: 48
Average win: $8,000 / 48 = $166.67
Sum of all losing trades: -$3,200
Number of losing trades: 32
Average loss: $3,200 / 32 = $100
Payoff ratio b = $166.67 / $100 = 1.67
Include commissions and slippage in the loss calculation (increase the loss amount) to be conservative.
Input 3: Position Size (N)
Determine the unit size you are considering. If your account is $100,000 and you are considering risking $2,000 per trade, your unit size is 50 (because $100,000 / $2,000 = 50 units).
Example:
Account: $100,000
Risk per trade: $2,000
Number of units: N = $100,000 / $2,000 = 50
Step-by-Step Calculation
Let's walk through a complete example. You are a swing trader with:
- Account: $100,000
- Last 60 trades: 36 wins, 24 losses (60% win rate)
- Average win: $250
- Average loss: $150
- Payoff ratio: 250 / 150 = 1.67
- Proposed position size: Risk $3,000 per trade
Step 1: Calculate unit size.
N = $100,000 / $3,000 = 33.33 (round to 33)
Step 2: Calculate q.
q = (1 - b*p) / (1 - b)
q = (1 - 1.67 * 0.60) / (1 - 1.67)
q = (1 - 1.002) / (-0.67)
q = (-0.002) / (-0.67)
q = 0.00298
Step 3: Calculate ruin probability.
Ruin Probability = q^N
Ruin Probability = 0.00298^33
Ruin Probability ≈ 0.000000000000000001 (essentially zero)
This position size is extremely safe. Your ruin probability is effectively zero.
Now let's test a more aggressive sizing: risk $8,000 per trade.
Step 1: Recalculate unit size.
N = $100,000 / $8,000 = 12.5 (round to 12)
Step 2: q remains the same.
q ≈ 0.00298
Step 3: Recalculate ruin probability.
Ruin Probability = 0.00298^12
Ruin Probability ≈ 0.000000000076 (still essentially zero)
Even at $8,000 per trade, ruin probability is negligible with your edge.
Now let's test an overleveraged scenario: risk $15,000 per trade (15% of your account).
Step 1: Recalculate unit size.
N = $100,000 / $15,000 = 6.67 (round to 6)
Step 2: q remains the same (it only depends on your edge, not position size).
Step 3: Recalculate ruin probability.
Ruin Probability = 0.00298^6
Ruin Probability ≈ 0.00000000000077 (still near-zero)
Even here, your ruin probability is minimal. This is because your edge (60% win rate, 1.67:1 payoff) is strong. Your q value is very small, which makes ruin unlikely even at aggressive sizing.
Now consider a marginal edge. Suppose you have:
- Win rate: 52% (p = 0.52)
- Payoff ratio: 1.1 (b = 1.1)
- Account: $100,000
- Proposed risk: $10,000 per trade (N = 10)
Step 1: Calculate q.
q = (1 - 1.1 * 0.52) / (1 - 1.1)
q = (1 - 0.572) / (-0.1)
q = 0.428 / (-0.1)
q = -4.28
A negative q indicates your edge is not strong enough for the formula's assumptions. This often occurs with marginal edges and higher payoff ratios. In this case, use a Monte Carlo simulation or assume your ruin probability is non-negligible—perhaps 10–20% depending on exact parameters.
Using a Spreadsheet
Most traders use a spreadsheet to automate this calculation. Here's a simple setup:
Column A: Description
Column B: Value
Win Rate 0.60
Loss Probability 0.40
Payoff Ratio 1.67
Account Size 100000
Risk per Trade 3000
Unit Size (N) = B5 / B6
q value = (1 - B3*B2) / (1 - B3)
Ruin Probability = q^N
Interpretation (if Ruin Prob < 0.05, SAFE; if > 0.05, REDUCE SIZE)
As you gather new trades, update the Win Rate and Payoff Ratio rows, and the spreadsheet recalculates your ruin probability. This forces you to make position-sizing decisions based on current data, not wishful thinking.
Real-World Application: Three Cases
Case 1: Scalper with Tight Stops
You scalp one-minute charts. Last 120 trades: 84 wins, 36 losses (70% win rate). Average win $45, average loss $50 (0.9:1 payoff ratio, slightly negative). Account: $50,000. Proposed risk: $1,000 per trade.
p = 0.70
b = 0.90
N = $50,000 / $1,000 = 50
q = (1 - 0.90 * 0.70) / (1 - 0.90)
q = (1 - 0.63) / 0.10
q = 0.37 / 0.10
q = 3.7
Ruin Probability = 3.7^50 (this is enormous, essentially 100%)
Your position size is far too large for your marginal edge. Even though your win rate is 70%, the low payoff ratio combined with aggressive sizing makes ruin nearly certain. Reduce size to $100 per trade:
N = $50,000 / $100 = 500
Ruin Probability = 3.7^500 (still essentially 100%)
This strategy requires much smaller sizing or a much stronger edge. Without a better payoff ratio, do not trade it with real money.
Case 2: Swing Trader with Strong Edge
You trade 4-hour charts. Last 80 trades: 52 wins, 28 losses (65% win rate). Average win $400, average loss $200 (2:1 payoff ratio). Account: $80,000. Proposed risk: $4,000 per trade (5% of account).
p = 0.65
b = 2.0
N = $80,000 / $4,000 = 20
q = (1 - 2.0 * 0.65) / (1 - 2.0)
q = (1 - 1.30) / (-1.0)
q = (-0.30) / (-1.0)
q = 0.30
Ruin Probability = 0.30^20
Ruin Probability ≈ 0.00000000036 (near zero)
This sizing is extremely safe. You could even increase to $6,000 per trade (7.5% of account) and still maintain near-zero ruin probability:
N = $80,000 / $6,000 = 13.33 ≈ 13
Ruin Probability = 0.30^13
Ruin Probability ≈ 0.00000000122 (near zero)
Case 3: Trend Follower with Uncertain Edge
You trade daily bars. Last 50 trades: 28 wins, 22 losses (56% win rate, barely above 50%). Average win $300, average loss $250 (1.2:1 payoff ratio). Account: $40,000. Considering risk: $2,000 per trade (5% of account).
p = 0.56
b = 1.2
N = $40,000 / $2,000 = 20
q = (1 - 1.2 * 0.56) / (1 - 1.2)
q = (1 - 0.672) / (-0.2)
q = 0.328 / (-0.2)
q = -1.64
The negative q is a red flag. Your edge is marginal, and the formula is warning you that ruin is possible. Do not size at 5% of account. Reduce to 1–2%:
N = $40,000 / $500 = 80
Use simulation or estimate: With 56% win rate, marginal payoff ratio,
and 80 units, ruin probability is approximately 15–20%.
Reduce further to $250 per trade (N = 160) to bring ruin probability below 5%.
When to Recalculate
Recalculate your ruin probability in these situations:
- Quarterly review (once every 50–100 new trades): Your win rate or payoff ratio may have changed. If so, ruin probability changes significantly.
- After a major losing streak: A 10-trade losing streak may be within the bounds of your edge, but it tells you your most recent trades are performing worse than average. Use the most recent 50 trades only for a more current read.
- After strategy adjustment: If you change your stops, targets, or entry rules, gather 20–30 fresh trades and recalculate.
- If your account size changes significantly: If you add or withdraw capital, recalculate. The N value changes.
- If your risk per trade changes: Obviously, changing your position size is a major ruin probability driver.
Common Mistakes
Mistake 1: Using too few trades. A win rate calculated from 10 trades is almost meaningless. If you have only 10–20 trades of history, your estimates are so uncertain that even a 60% win rate could be random noise. Accumulate at least 50 trades before trusting the calculation.
Mistake 2: Including only profitable strategies in your backtest. Many traders backtest five strategies, find that three are profitable, and calculate ruin probability using those three. They ignore the two losers. In reality, you will trade a mixture of strategies with varying edges. Use your actual trading history, not cherry-picked backtests.
Mistake 3: Assuming payoff ratio is constant. Your average win and average loss change over time, especially as market conditions shift. Recalculate every quarter. If your payoff ratio has degraded from 2:1 to 1.5:1, you need to reduce position size.
Mistake 4: Confusing "low ruin probability" with "guaranteed profit." Even a 0.1% ruin probability is not zero. Over 1,000 trading lifetimes, one would experience ruin. This is a reason to maintain humility, diversify, and not size at the mathematical limit.
Mistake 5: Ignoring the assumptions behind the formula. The Gambler's Ruin formula assumes independent trades (one trade does not influence the probability of the next). In reality, market regimes change. A strategy that works in trending markets may fail in choppy markets. If your trades are not truly independent, actual ruin probability is higher than the formula suggests.
FAQ
What ruin probability should I target?
Most professional traders target 1–3% ruin probability. This allows for modest growth while keeping account safety paramount. 5% is an absolute ceiling. Anything above 5% indicates overleveraging.
Does the formula change if I use a stop loss?
The formula does not directly incorporate stop losses, but stop losses determine your average loss size. A tighter stop reduces average loss, improves the payoff ratio or q value, and lowers ruin probability. A wider stop increases average loss and increases ruin probability. Model this by using real stop-loss sizes in your average loss calculation.
Can I calculate ruin probability for a strategy I've never traded?
Only with low confidence. If you have a backtest, use those statistics, but reduce your payoff ratio by 20–30% to account for slippage, commissions, and overfitting. Better: forward-test the strategy for at least 20–30 real trades before trusting any ruin probability calculation.
What if my win rate is below 50%?
If your win rate is below 50%, you have no edge (or a negative edge). Do not trade. The formula will return either a negative q or a ruin probability near 100%. Focus on improving your strategy first.
Should I calculate ruin probability for individual trades or a portfolio?
Calculate it for your entire account—all strategies combined. If you trade multiple strategies, pool them. However, if one strategy has a 1% ruin probability and another has a 20% ruin probability, the portfolio result will be dominated by the weak strategy. Monitor ruin probability by strategy and consider eliminating very-high-risk ones.
How does volatility affect ruin probability?
The formula does not directly include volatility. Volatility is implicitly captured in your payoff ratio: if markets are more volatile, your stops must be wider, increasing average loss and decreasing payoff ratio. Use recent trade data to reflect current market conditions.
Can I use daily returns instead of individual trades?
Yes, if you prefer. Calculate win rate and payoff ratio on daily P&L instead of individual trades. This aggregates multiple trades per day but can smooth out noise. Use this method only if you trust it more than individual trade data.
Related concepts
- Finding Your Safe Bet Fraction
- Ruin vs. Drawdown: Different Beasts
- Building a Ruin-Proof Sizing System
- What Ruin Means in Trading
- The Kelly Criterion: An Introduction
Summary
Ruin mathematics transforms from an abstract concept into a practical tool the moment you sit down with your own trade data and calculate the actual probability that your proposed position size will lead to total account loss. The inputs are simple: win rate, payoff ratio, account size, and risk per trade. The formula is standard. The output is a number—a ruin probability—that forces you to make a yes-or-no decision: Is this position size acceptable, or must I reduce it? Most traders skip this step, relying instead on vague notions of risk tolerance. The traders who survive and thrive are the ones who run the numbers. By applying ruin mathematics quarterly, you transform position sizing from an emotional decision into a data-driven one, and you shift the odds decisively in your favor.