Home › Guides › Risk of Ruin

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSRisk of RuinThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on risk of ruin. Education only, with example numbers labelled.
WHY BOTS FAIL

Risk of Ruin

Short answer

Risk of ruin is the probability that an account falls to a chosen ruin level before it reaches its goal. It is the question "how likely is the worst case" turned into a number.

Risk of ruin is the chance an account falls to a point it cannot recover from before it grows. It depends on how big each bet is far more than on how often you win.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: run the numbers on your own account

The risk of ruin calculator takes your win rate, payoff and risk per trade and shows the chance of reaching a ruin level.

Reading time7 minutes
Worked exampleExact arithmetic
Tools linked3 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Chance of ruin at win probability 52 percent, by units in the account (simple model)44.9%10 unitsstarting size20.2%20 unitsstarting size1.8%50 unitsstarting size0.03%100 unitsstarting sizeFormula (q/p)^N, p = 0.52, one unit won or lost per trade. Calculated by us on 27 Oct 2026, exact for that simple model.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • Risk of ruin is the probability that an account falls to a chosen ruin level before it reaches its goal. It is the question "how likely is the worst case" turned into a number.
  • For a game where you win or lose one unit per bet, win with probability p, lose with q = 1 - p, and start with N units, the chance of ever reaching zero is (q/p)^N when p is greater than q.
  • With p = 0.52 and N = 20 units that is 20.2%. With N = 10 it is 44.9%, and with N = 50 it is 1.8% (calculated by us on 27 Oct 2026, exact for the simple model).
  • Bet size matters more than win rate: the account size in units sits in the exponent.
  • A martingale ladder with a fixed number of steps fails with certainty if it runs long enough, because every cycle has a small but fixed chance of wiping the account.

What risk of ruin is

An account does not just earn the average. It travels through a path of wins and losses, and a long enough run of losses can end the account before the average has a chance to show. Risk of ruin is the chance that happens. "Ruin" is whatever level you cannot continue from: zero, a margin level, a prop-firm limit or a loss you will not accept.

The answer is not about the average trade. A strategy can have a positive expected value and still have a large risk of ruin if it is bet too big.

The simple model and its formula

The cleanest case is the one-unit game. Every bet wins one unit with probability p or loses one unit with probability q = 1 - p. You start with N units and keep betting forever. The probability of ever reaching zero is:

Risk of ruin = (q / p)^N   when p > q
Risk of ruin = 1   when p is less than or equal to q

This is exact for that game, and it only applies under these conditions: each bet is the same size, each pays 1 to 1, the bets are independent, p is fixed and known, and there is no upper limit. It is a model, not a description of a real account. Real trades have different sizes, payoffs that are not 1 to 1, costs and dependence. Use it for the shape of the answer, not as a prediction.

If p is less than or equal to one half, the formula gives a ratio q/p of 1 or more, and ruin is certain given enough time. A coin flip with no edge ends in ruin, if you keep going.

A computed table

Here is the formula worked out for three win probabilities and three account sizes in units. Calculated by us on 27 Oct 2026, exact for the simple one-unit game.

Win probability pq / pN = 10 unitsN = 20 unitsN = 50 units
0.510.960867.0%44.9%13.5%
0.520.923144.9%20.2%1.8%
0.550.818213.4%1.8%under 0.01%

Look at two things. First, going from p = 0.51 to p = 0.55 helps, and the gain is large. Second, the number of units matters even more. At p = 0.52, moving from 10 units to 50 units takes the risk from 44.9% to 1.8%. Doubling the account in units, or equivalently halving the size of each bet, squares the risk (0.4491 becomes 0.2017). That is why bet size matters more than win rate.

Fixed fractional sizing

Instead of betting a fixed dollar amount, a trader may risk a fixed fraction of the account on each trade, such as 1 percent. The account then holds roughly 100 "units" of risk, where a unit is one trade's risk. The simple model gives a rough picture: with p = 0.52 and 100 units, 0.03%. With 10 percent per trade there are only 10 units, and it is 44.9%.

It is only a rough picture. A fraction of the account shrinks after losses, so the account does not reach exactly zero, and the "ruin level" has to be defined, such as a 50 percent loss. The direction holds: smaller bets mean more units, and more units make ruin fall steeply. See the risk of ruin calculator to try your own numbers.

Chance of ruin by win probability, account of 20 units (simple model)44.9%p = 0.51N = 2020.2%p = 0.52N = 201.8%p = 0.55N = 20Formula (q/p)^N. Calculated by us on 27 Oct 2026, exact for the one-unit game.
Even a good edge leaves a real risk when the account is only 20 bets deep.

Why martingale ends in ruin

A martingale ladder is a different game. After each loss it doubles, and one win ends the cycle with a small profit. Suppose the ladder has k steps and the account can afford exactly k. A cycle fails only if all k trades lose, which for a fair coin has probability 0.5^k. Over c cycles the chance that at least one of them fails is:

Chance of at least one failed cycle = 1 - (1 - 0.5^k)^c

This is exact for independent 50-50 trades, a ladder of k steps and a failed cycle that costs the whole account. Calculated by us on 27 Oct 2026.

Ladder steps (k)Chance one cycle fails10 cycles50 cycles100 cycles500 cycles
53.1%27.2%79.6%95.8%100.0%
70.78%7.5%32.4%54.4%98.0%
100.10%0.97%4.8%9.3%38.6%

A 7-step ladder fails once in 128 cycles, which sounds remote. Over 100 cycles the chance is 54.4%, and over 500 cycles it is 98.0%. Even a 10-step ladder, which fails once in 1,024 cycles, reaches 38.6% after 500. As the number of cycles grows, the chance climbs toward 1. The small chance per cycle is not a safety margin, it is a fixed rate that accumulates. That is the sense in which martingale makes ruin close to certain if it is run long enough. A bot that wins small amounts reliably is also a bot that is walking toward the cycle that ends the account. Real markets are not fair coins, and a real edge or a real bias can change the numbers, but the structure does not change.

Chance a 7-step martingale ladder has failed at least once, by cycles run0%25%50%75%100%010020030040050060054.4%90.5%98.0%Cycles run (each cycle ends in a small win, or a failure after 7 straight losses)Fair coin, 1 - (1 - 1/128)^c. Calculated by us on 27 Oct 2026, exact.
The curve never levels off below 100 percent. Time is on the side of the failure.

How it hits other bots

  • Grid bots hold more positions as price moves away from the middle. Their ruin comes from a sustained trend, and the number of units in the account decides how far a trend can go before the margin ends.
  • DCA bots face ruin through a falling price with no recovery. Average cost drops, but capital runs out, and an instrument can fall to zero.
  • EAs that raise lot size after losses behave like a martingale in part, and their ruin risk is harder to see in a backtest. Look at the biggest position they can open.

How to check before running a bot

  • Find the largest loss one trade or one ladder can cause, as a share of the account. That is your unit.
  • Count how many of those units the account holds, and put the number into the formula along with an honest estimate of the edge.
  • Use a pessimistic p. A small error in p changes the answer a lot, as the p = 0.51 row shows.
  • Run a Monte Carlo simulation on your own trade list, which handles uneven wins and losses better than the one-unit formula.
  • For ladders, read martingale and check the number of steps the account can afford.

What it does not tell you

The formula assumes the win probability is known. It never is. It assumes bets are independent, and markets can cluster losses. It assumes no costs, and costs lower the effective p. A low risk of ruin number does not remove the possibility, and it says nothing about drawdown short of ruin, which can still be more than you can accept.

FAQ

Frequently Asked Questions

Does a higher win rate always lower risk of ruin?

Not by itself. Win rate is one input, and the size of each bet in relation to the account is another. A high win rate with large bets, or with rare large losses as in martingale and grid bots, can still carry a high risk of ruin.

What risk of ruin is acceptable?

That is a personal decision and this page does not give one. The table shows how fast it falls as the account holds more units, and it is worth knowing the number before running a bot rather than after.

Is the (q/p)^N formula exact for trading?

It is exact for the simple one-unit game with independent bets, a fixed p and no upper goal. Real trading breaks several of those conditions, so use it as a guide to the shape of the risk, not a forecast.

Why does p less than or equal to 0.5 mean certain ruin?

With no edge or a negative one, the account drifts down on average. Given enough bets, the random swings eventually carry it to zero. Costs push a coin flip below 0.5.

What is fixed fractional sizing?

Risking the same percentage of the current account on each trade. The size of the bet shrinks after losses and grows after wins, which makes ruin to exactly zero unreachable but still allows a deep drawdown.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It explains a probability model in general terms. The tables are exact arithmetic for the stated simple models, and the strategies are not real.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss