Trading concepts

Risk of Ruin: The Formula, a Computed Curve and How to Lower It

The probability that losses reach the level where you stop trading. The gambler's ruin formula explained step by step, a curve and table computed from it, an approximate formula for unequal wins and losses tested by simulation, and the one input that matters most. Then a test on real trades that shows what happens when losses arrive together.

· Founder of PatternsWizard
Checked 16 min read
Position size from account risk and stop distance: on the left, the account with the small share risked on one trade. On the right, an entry price and a stop price with the distance between them. Position size equals the amount risked divided by the stop distance.
On this page
  1. The risk of ruin formula
  2. Risk of ruin by risk per trade: the curve
  3. The edge form of the formula
  4. Unequal wins and losses: an approximate formula
  5. Fixed fractional sizing changes the answer
  6. Does the formula hold on real trades?
  7. Risk of ruin is not drawdown
  8. How to lower your risk of ruin
  9. Frequently asked questions

Every pattern's results on one sheet

The only pattern cheat sheet with tested stats: 152 patterns, what the textbook says and what really happened on 6 markets. Free PDF, sent to your inbox.

The PDF by email, plus our newsletter: new tests and results that change. Unsubscribe anytime. Privacy.

Risk of ruin is the probability that a run of losses takes your account down to the level at which you would stop trading, before your edge has time to pay. Three inputs decide it: your edge (win rate and the size of wins against losses), the amount you risk on each trade, and the loss you call ruin. Risk per trade is the only one you control completely, and it moves the result the most: with the same hypothetical 55% win rate, risking 2% of the account per trade gives a 0.66% chance of losing half the account, and risking 10% gives 36.7%.

Position size from account risk and stop distance

Position size from account risk and stop distance: on the left, the account with the small share risked on one trade. On the right, an entry price and a stop price with the distance between them. Position size equals the amount risked divided by the stop distance.
Schematic, not market data.The amount risked per trade, set by the stop distance and the position size, is the input that drives the risk of ruin.

The risk of ruin formula

The basic formula comes from the gambler's ruin problem of probability theory. A player wins one unit with probability p and loses one unit with probability q = 1 − p, and starts z units away from ruin. Against an opponent with unlimited money, the probability of eventual ruin is (q/p)z when p is larger than q, and 1 otherwise (Grinstead and Snell, Introduction to Probability, section 12.2, free PDF from Dartmouth). The result is old: the same book credits De Moivre with a derivation in 1711.

For a trader, one unit is the fixed amount risked on a trade, a win pays the same amount as a loss (a 1:1 payoff), and z is the number of those losses that separate you from your ruin level.

Risk of ruin by risk per trade: the curve

The curve below applies the formula to three hypothetical win rates with a 1:1 payoff, ruin set at a loss of 50% of the starting capital, and a fixed dollar amount risked on each trade, expressed as a share of the starting capital.

Risk of ruin against risk per trade, by win rate

Risk of ruin against risk per trade for three hypothetical win rates, 1:1 payoff, ruin defined as losing half of the starting capital. Computed from the formula (q/p) to the power z.
Each curve is labeled with its win rate. Computed from (q/p)z with z = 50 ÷ risk per trade in %. Hypothetical parameters (1:1 payoff, ruin at half the starting capital), not any trader's record.

The same numbers as a table, for quick lookup with a 1:1 strategy:

Win rate1% per trade2%3%5%10%
52%1.83%13.5%26.3%44.9%67.0%
55%0.004%0.66%3.53%13.4%36.7%
60%under 0.001%0.004%0.12%1.73%13.2%

Two things stand out. For the 55% and 60% cases the probability falls below 1% at 2% per trade or less, and above 5% it climbs fast even for the 60% case. And a thin edge is fragile: going from 55% to 52% at 2% per trade multiplies the risk of ruin by about twenty.

The edge form of the formula

The same formula is also written as ((1 − edge) ÷ (1 + edge))u, where edge = win rate minus loss rate and u is the number of units to ruin. With a 1:1 payoff this is exactly (q/p)z, since (1 − p + q) ÷ (1 + p − q) = 2q ÷ 2p.

Unequal wins and losses: an approximate formula

When wins and losses differ in size, the gambler's ruin formula no longer applies directly. The approximation below is attributed to Ralph Vince, but we could not confirm it. His book Portfolio Management Formulas (Wiley, 1990) has a chapter titled Risk of Ruin (publisher's contents page). We could not check the formula against the book, and we found no reference we could verify that ties it to him, so treat the attribution as unconfirmed. What we can do is test it.

A variant of it subtracts the loss term inside the square root of A. Kept with P = 0.5 × (1 + Z ÷ A), it still returns a number, so it can be compared. To see which version holds up, we simulated 200,000 accounts per case, each trading up to 20,000 times with fixed dollar risk, and counted how many lost half of their starting capital.

Hypothetical caseFormula, plus signMinus sign, P = 0.5 × (1 + Z ÷ A)Simulation
55% wins, win 5%, lose 5%13.4%under 0.001%13.4%
40% wins, win 4%, lose 2%1.03%0.004%0.77%
40% wins, win 10%, lose 5%16.1%1.73%14.4%
50% wins, win 3%, lose 2%0.041%under 0.001%0.024%

The plus sign version lands close to the simulation and errs on the cautious side; the minus sign version, computed with the same P, understates it by a factor of eight or more. Wins and losses in the table are shares of the starting capital. How the simulation is done, so that anyone can rerun it: each case starts a fresh NumPy PCG64 generator, default_rng(20261101), draws the trades in blocks of 500 for the accounts still alive, and stops an account the first time it touches half of its starting capital. With 200,000 accounts the sampling error is small: one standard error is about 0.08 percentage points at 13%, and 0.02 at 0.77%, far less than the gap between the two formulas.

The approximate formula against a simulation

The approximate formula against a simulation. 55% wins, win 5%, lose 5%: Formula, plus sign 13.4%, Simulation 13.4%; 40% wins, win 4%, lose 2%: Formula, plus sign 1.03%, Simulation 0.77%; 40% wins, win 10%, lose 5%: Formula, plus sign 16.1%, Simulation 14.4%; 50% wins, win 3%, lose 2%: Formula, plus sign 0.041%, Simulation 0.024%. Our computation; the inputs and the method are in the text. Logarithmic scale: equal distances mean equal ratios, and each power of ten sits the same distance from the next.
  • Formula, plus sign
  • Simulation
Our computation; the inputs and the method are in the text. Logarithmic scale: equal distances mean equal ratios, and each power of ten sits the same distance from the next.Probability of losing half the starting capital, hypothetical cases, logarithmic scale. Simulation: 200,000 accounts per case, up to 20,000 trades each, fixed dollar risk, NumPy PCG64 generator with seed 20261101. The minus sign version is left out: three of its four values are under 0.01%.

If the minus sign version is written with a different P, 0.5 × [(1 + Z) ÷ A], the 1 added to Z before dividing by A, the formula gives no probability at all. In the four cases above, P comes out between 10 and 32, far above 1, so (1 − P) ÷ P is negative and cannot be raised to the power M ÷ A. The same happens with the plus sign. If a calculator returns a risk of ruin from that version, check how it computes P.

Fixed fractional sizing changes the answer

Both formulas assume you risk the same dollar amount on every trade. Fixed fractional position sizing risks a fixed share of the current balance instead, so the stake shrinks after losses. We simulated that case too (55% wins, 1:1 payoff, 100,000 accounts, up to 5,000 trades, ruin at half the starting capital, same generator and seed; one standard error is at most 0.16 percentage points):

Risk per tradeFixed dollars (formula)Fixed share of current balance (simulation)
2%0.66%0.18%
5%13.4%11.7%
10%36.7%47.5%

At small risk, shrinking the stake after losses cuts the risk of ruin. At 10% it makes things worse, because large swings in a compounding account drag the balance down even when wins and losses alternate: a 10% gain followed by a 10% loss leaves 99% of the money. The position size calculator guide shows how to set the share risked per trade.

Fixed dollars or a fixed share of the balance

Fixed dollars or a fixed share of the balance. Risk 2% per trade: Fixed dollars (formula) 0.66%, Fixed share (simulation) 0.18%; Risk 5% per trade: Fixed dollars (formula) 13.4%, Fixed share (simulation) 11.7%; Risk 10% per trade: Fixed dollars (formula) 36.7%, Fixed share (simulation) 47.5%. Our computation; the inputs and the method are in the text.
  • Fixed dollars (formula)
  • Fixed share (simulation)
Our computation; the inputs and the method are in the text.Probability of losing half the starting capital with 55% wins and a 1:1 payoff, hypothetical. Simulation: 100,000 accounts, up to 5,000 trades, NumPy PCG64 generator with seed 20261101. Above about 6% per trade, compounding makes the fixed share riskier, not safer.

Does the formula hold on real trades?

Every formula on this page assumes that trades are independent: the result of one says nothing about the next. Real trades can break that assumption when several positions are open at once in markets that move together. We tested it on a real sequence of trades from our daily price data: the RSI(2) dip-buying signal of our indicator bench on 46 ETFs, from November 22, 1993 to October 15, 2026, each trade with the bench's fixed rules (a stop 2 ATR below the entry, a target at 2R, at most 100 days) and after a cost of 0.05% per round trip.

All the settings were fixed before the first run. A portfolio holds at most 1, 5 or 10 positions at once and takes the signals in the order they come, skipping any signal that arrives when it is full. Each trade risks a fixed dollar amount, a share of the starting capital, as the formula assumes. Ruin is the loss of half the starting capital within 5 years. Each case is measured three ways: the approximate formula above (plus sign), fed with the sequence's own win rate, average win and average loss; the same trades drawn at random, so that they are independent (20 draws for each start date); and the real order, starting from every date in our history that has 5 years of data after it.

Longest losing streak: real order against the same trades shuffled

Longest losing streak: real order against the same trades shuffled. Up to 1 open position: Real order 12 losses, Same trades shuffled 10 losses; Up to 5 open positions: Real order 27 losses, Same trades shuffled 13 losses; Up to 10 open positions: Real order 34 losses, Same trades shuffled 14 losses. Our computation; the inputs and the method are in the text.
  • Real order
  • Same trades shuffled
Our computation; the inputs and the method are in the text.RSI(2) dip buying on 46 ETFs, 1993 to 2026, the bench's normalized trade (stop 2 ATR, target 2R, at most 100 days), after costs. Shuffled: median of 200 random orders of the same trades.

Start with the losing streaks. One position at a time, the longest run of losses in the real order was 12 trades, close to the 10 of a typical shuffled order. With up to 10 positions it was 34 in a row, against 14 for a typical shuffle, and 95% of the 200 shuffles stayed at 19 or fewer. That is what happens when dips in several stock ETFs come in the same sell-off and their stops are hit together. Counted in R, the worst drawdown of the 10-position sequence was 71R, against 29R for a typical shuffle of the same trades.

Chance of losing half the account within 5 years: independent trades against the real order

Chance of losing half the account within 5 years: independent trades against the real order. Up to 1 position, 2% per trade: Independent trades 0.4%, Real order 2.2%; Up to 1 position, 5% per trade: Independent trades 15.2%, Real order 18.6%; Up to 5 positions, 2% per trade: Independent trades 1.7%, Real order 15.9%; Up to 5 positions, 5% per trade: Independent trades 19.3%, Real order 52.5%; Up to 10 positions, 2% per trade: Independent trades 1.9%, Real order 32.1%; Up to 10 positions, 5% per trade: Independent trades 20.1%, Real order 65.7%. Our computation; the inputs and the method are in the text.
  • Independent trades
  • Real order
Our computation; the inputs and the method are in the text.Fixed dollar risk per trade, as a share of the starting capital. Independent: the same trades drawn at random, 20 times for each start. Real order: every start date in our history with 5 years of data after it; those starts share most of their trades, so this column describes one history, not a precise probability.

Then ruin. On independent trades the formula holds up: with up to 10 positions and 2% per trade, it gives 2.5%, and the shuffled trades lose half the account in 1.9% of the starts. In the real order, 32.1% of the 5-year starts did, about 17 times more. At 1% per trade, the formula gives 0.06% and the real order 7.4%. With up to 5 positions and 2% per trade: 2.4% by the formula, 15.9% in the real order.

One position at a time, the formula stayed above the real outcome. At 2% per trade it gives 4.3% and the real order 2.2%; at 5%, 28.4% against 18.6%, with 15.2% for the independent trades. The formula has no time limit, which makes it the most cautious of the three here. The trouble is not the formula but what it counts: ten open positions in markets that fall together behave like one large bet, not ten small ones.

The same test on a second rule of the bench, the 55-day breakout, with up to 10 positions, gives the same picture: a longest losing streak of 50 trades against 14 for a typical shuffle, and at 2% per trade a ruin rate of 3.0% by the formula against 32.3% in the real order.

Risk of ruin is not drawdown

A drawdown is how far an account falls from its peak; risk of ruin is the probability that the fall reaches a level you have fixed in advance. The answer depends on that level, so write it down: for one trader ruin is a 100% loss, for another it is the 30% drop after which they would stop. With a 1:1 payoff and 55% wins, risking 5% per trade gives 13.4% for a 50% ruin level and 1.8% for a 100% level.

How to lower your risk of ruin

  • Cut the risk per trade first. It is the input with the largest effect and the only one you set directly. Along each curve above, it is the only input that changes. That is the opposite of the way scared money don't make money is often read in trading, as a call to bet bigger.
  • Count positions that move together as one bet. In our test, holding up to 10 dip-buying trades on ETFs at once made losing half the account far more likely than the formula said; add up the risk of positions in related markets before you open another one.
  • Define ruin honestly. Use the loss at which you would actually stop, not 100%.
  • Measure the edge on enough trades, and use the pessimistic end of the estimate. The trading math guide covers expectancy and sample size.
  • Check the payoff, not only the win rate. A 40% win rate can be safer than a 55% one if the wins are twice the losses; the risk reward ratio guide shows the break-even win rate for each ratio.
  • Watch leverage on small accounts. High leverage makes it easy to risk 10% or more on one trade without noticing; see the best leverage for a small account.

More risk and sizing topics are in trading concepts.

Frequently asked questions

What is risk of ruin in trading?

The probability that your account falls to a loss level you have defined as ruin, for example half of the starting capital, before your edge has time to pay. It depends on the win rate, the payoff and the amount risked per trade.

What is the risk of ruin formula?

For equal wins and losses and a fixed amount risked per trade: (q/p)z, where p is the win rate, q the loss rate and z the number of losses between you and ruin. If p is not larger than q, the risk of ruin is 1.

Is there a risk of ruin formula for unequal wins and losses?

An approximation attributed to Ralph Vince, not confirmed: Z = W × average win − L × average loss, A = the square root of (W × average win² + L × average loss²), P = 0.5 × (1 + Z ÷ A), and risk of ruin = ((1 − P) ÷ P) to the power (ruin level ÷ A), all in shares of starting capital. We could not confirm the attribution or check it against Vince's book; with a plus sign inside the root it matched our simulations. Watch how P is written: with P = 0.5 × (1 + Z) ÷ A, the formula gives no probability.

Does the risk of ruin formula work on real trades?

It works when trades are independent, and real trades often are not. On a real sequence of RSI(2) dip-buying trades on ETFs, with up to 10 positions at 2% risk each, the formula gave 2.5% for losing half the account and the same trades shuffled 1.9%, but 32.1% of the 5-year starts in the real order got there. One position at a time, the formula gave a higher number than the real order.

What is an acceptable risk of ruin?

There is no official threshold; it is a personal choice. The table on this page shows how much it depends on the edge: with a hypothetical 55% win rate and a 1:1 payoff, risking 2% per trade gives 0.66%, but with 52% the same 2% gives 13.5%, and 5% or more puts both in double digits.

Does a 50% win rate always lead to ruin?

With equal wins and losses and no end to trading, yes: when p equals q, the gambler's ruin probability is 1. Over a limited number of trades it is lower, but nothing protects the account in the long run without an edge.

Is risk of ruin the same as maximum drawdown?

No. Maximum drawdown is the largest fall from a peak that actually happened. Risk of ruin is a probability that a fall reaches a level you fix in advance.

Sources

  1. Charles M. Grinstead and J. Laurie Snell, Introduction to Probability, section 12.2, Gambler's Ruin (Dartmouth, free PDF)
  2. Ralph Vince, Portfolio Management Formulas (Wiley, 1990), publisher's page
, Founder of PatternsWizard

Passionate about finance, quantitative trading and data analysis. Amaury built the PatternsWizard test bench, which detects each pattern on full price history and measures what happened next against random entries.

PatternsWizard tests chart and candlestick patterns on full market history, against random entries. How we test patterns.

179 patterns testedRandom-walk self-test passed

Related guides

All trading concepts articles