A common assumption is that a strategy that wins 40% of the time will "usually" lose three or four in a row. Then the trader hits eight losses in a row, decides the strategy is broken, and abandons it the week before it would have worked.

Eight in a row is not bad luck for that strategy. Over 100 trades it is close to a coin flip. This post shows how to calculate it exactly, with a short function you can run in the browser console.

The question

Given:

  • n trades,
  • a probability q of losing any single trade (so the win rate is 1 - q),
  • trades that are independent of each other,

what is the probability that somewhere in those n trades there is a run of at least k losses in a row?

The tempting shortcut is q ** k. For a 60% loss rate and k = 8 that gives about 1.7%, which looks reassuringly small. It is the probability that a specific block of eight trades is all losses. But a 100-trade sample has 93 places where such a block could start, and those blocks overlap, so you can't just multiply by 93 either. You need to track the run as it happens.

Dynamic programming over the current run

Walk through the trades one at a time and keep a probability distribution over "how long is the losing run I'm in right now?" The run length can be 0 up to k - 1. Once it reaches k we have seen the streak, so we add that probability to a hit total and stop tracking that path.

// Probability of at least one run of >= k losses in n independent trades. // q = probability of a loss on any single trade. function pLosingStreak(n, k, q) { let state = new Array(k).fill(0); // state[r] = P(current losing run is r, no k-run yet) state[0] = 1; let hit = 0; for (let i = 0; i < n; i++) { const next = new Array(k).fill(0); for (let r = 0; r < k; r++) { if (!state[r]) continue; next[0] += state[r] * (1 - q); // a win resets the run if (r + 1 >= k) hit += state[r] * q; // a loss completes the streak else next[r + 1] += state[r] * q; // a loss extends the run } state = next; } return hit; } 

It runs in O(n * k) time, which is instant for any realistic trade count.

The expected length of the longest losing run falls out of the same function. For a non-negative integer variable, E[X] = sum over k >= 1 of P(X >= k):

function expectedLongestLosingRun(n, q) { let e = 0; for (let k = 1; k <= n; k++) e += pLosingStreak(n, k, q); return e; } 

The numbers, for 100 trades

Win rate Expected longest losing run P(≥ 5) P(≥ 6) P(≥ 7) P(≥ 8) P(≥ 10)
40% 7.9 97.6% 87.3% 68.9% 49.0% 20.5%
50% 6.0 81.0% 54.6% 31.8% 17.0% 4.4%
60% 4.6 45.9% 21.2% 8.9% 3.6% 0.6%

A few things stand out:

  • A 40% win-rate strategy almost certainly has a five-loss streak in 100 trades, and has about even odds of an eight-loss streak. Many trend-following and breakout systems live in this range and make their money from a few large winners.
  • Even a 60% strategy has close to a coin-flip chance of five losses in a row.
  • The streak you should plan for grows with sample size. Run the function with n = 500 and every column shifts right. A long-term trader will eventually see streaks that a 50-trade backtest never showed.

If you want to play with other inputs without opening a console, there is a free losing streak probability calculator.

What a streak does to your account

A streak only matters because of what it does to the balance. If you risk a fixed fraction r of the current balance on every trade, k consecutive losses leave you with (1 - r) ** k of where you started:

const drawdownAfterStreak = (r, k) => 1 - (1 - r) ** k; 
Risk per trade 6 losses 8 losses 10 losses
1% −5.9% −7.7% −9.6%
2% −11.4% −14.9% −18.3%

At 1% risk, an eight-loss streak is an unpleasant week. At 2%, it is close to a 15% drawdown, and many prop-firm accounts have a maximum loss of 10%. At 5% risk, which is common among new traders, the same streak removes about a third of the account.

So the useful way to use the table is backwards: decide the drawdown you can tolerate without abandoning the plan, look up the streak you are likely to see, and choose the risk per trade that keeps you inside that limit.

Caveats

  • Independence is an assumption. Real trades are not coin flips. Losses cluster when market conditions change, so real streaks tend to be longer than this model predicts. Treat these numbers as a floor, not a ceiling.
  • Your win rate is an estimate. A backtest that shows 55% might really be 48%. Running the function at a few win rates around your estimate is more honest than using one number.
  • The streak is only half the story. A 40% win rate with an average win three times the average loss is a profitable system; a 60% win rate with wins half the size of losses is not. Expectancy (average win × win rate − average loss × loss rate) decides whether the strategy works; the streak decides whether you survive long enough to find out. There is an expectancy calculator and a risk of ruin calculator for those two questions.

Checking the function

If you don't trust a DP you just read, simulate it. This Monte Carlo version should land within a fraction of a percent of the exact value:

function simulate(n, k, q, runs = 200000) { let count = 0; for (let t = 0; t < runs; t++) { let run = 0, seen = false; for (let i = 0; i < n && !seen; i++) { run = Math.random() < q ? run + 1 : 0; if (run >= k) seen = true; } if (seen) count++; } return count / runs; } console.log(pLosingStreak(100, 8, 0.6)); // 0.490... console.log(simulate(100, 8, 0.6)); // ~0.49 

The exact function is the one to keep: it is faster, it gives the same answer every time, and it makes it easy to build a table like the ones above.

The practical lesson is boring but important: before you trade a strategy, run its win rate through this function, size your positions for the streak it predicts, and write that streak down. When it arrives, you will know it was expected.

Disclosure: I run CROZAX, a free markets and trading-tools site for Pakistani traders, which includes the calculators linked above. The code and numbers in this post are reproducible from the functions shown. This post was drafted with an AI assistant; every number in it was checked by running the code above.