Trading concepts

Trading Math: Expectancy, Position Size, Losing Streaks and Compounding

Six formulas that decide whether a trading method can pay and whether the account survives its bad runs. Each one is explained with a hypothetical example, and every number was computed by script.

· Founder of PatternsWizard
Checked 7 min read
Trade results measured in R: horizontal levels at three, two and one R above the entry and at one and two R below it, R being the distance from the entry to the initial stop. Three trades start at the entry: one reaches a target at plus two R, one is stopped at minus one R, and one gaps past the stop to minus two R.
On this page
  1. R: measuring every trade by its risk
  2. Expectancy: the trading edge in one number
  3. Break-even win rate
  4. Position size
  5. Losing streaks: how long the bad runs get
  6. Compounding and drawdown recovery
  7. Frequently asked questions

Trading math needs no more than arithmetic, but a handful of formulas decide whether a method can pay and whether an account survives the bad runs. This page covers six of them: expectancy, the break-even win rate, position size, losing streaks, compounding and the recovery from a drawdown. Every number below was computed by script and every example is hypothetical, labeled with its inputs.

R: measuring every trade by its risk

Van Tharp defines R as "The initial risk taken in a given position, as defined by one's initial stop loss." A trade bought at $50 with a stop at $45 has 1R = $5; exiting at $60 is a 2R gain. Expressing results in R makes trades of different sizes comparable, and it shows the losses that went past the stop: in Tharp's own example, a trade bought at $22 with a $20 stop exited at $16, a 3R loss.

Trade results measured in R

Trade results measured in R: horizontal levels at three, two and one R above the entry and at one and two R below it, R being the distance from the entry to the initial stop. Three trades start at the entry: one reaches a target at plus two R, one is stopped at minus one R, and one gaps past the stop to minus two R.
Schematic, not market data.A gap can carry a loss past the stop, which is why results in R are measured at the exit, not at the stop.

Expectancy: the trading edge in one number

A trading edge is a positive expectancy after costs. Tharp writes that "the mean ... of a system's R-multiple distribution equals the system's expectancy", which "tells you how much you can expect to make on the average, per dollar risked". His four example trades (+2R, −3R, +10R, −1R) total 8R, an expectancy of 2R. With a win rate and two average sizes, the same number is:

Expectancy per trade for four hypothetical methods

Expectancy per trade for four hypothetical methods. 40% wins, average win 2R, average loss 1R: +0.2R; 30% wins, average win 3R, average loss 1R: +0.2R; 55% wins, average win 1R, average loss 1R: +0.1R; 60% wins, average win 1R, average loss 1.5R: 0R, nothing earned. Hypothetical example, computed from the assumptions in the text.
Hypothetical example, computed from the assumptions in the text.Hypothetical inputs, before costs, computed with the formula above.

Hypothetical, before costs. A 60% win rate with losses 1.5 times the wins earns nothing; a 30% win rate with wins three times the losses earns 0.2R per trade. Costs come straight off the result: at 40% wins, 2R wins and 1R losses, a cost of 0.1R per trade halves the expectancy to 0.1R.

An expectancy measured on few trades is uncertain. Tharp writes that "you can only get a good idea of your system's expectancy when you have a minimum of thirty trades to analyze" and that a clear picture takes "somewhere between 100 and 200".

Break-even win rate

If the average win is b times the average loss, expectancy is zero at a win rate of 1 ÷ (1 + b).

Win rate needed to break even, by payoff

Win rate needed to break even, by payoff. Average win half the average loss: 66.7%; Average win equal to the loss: 50%; Average win 1.5 times the loss: 40%; Average win 2 times the loss: 33.3%; Average win 3 times the loss: 25%. Our computation; the inputs and the method are in the text.
Our computation; the inputs and the method are in the text.1 ÷ (1 + b), where b is the average win divided by the average loss. Before costs.

Costs raise every line: with 2R wins, 1R losses and 0.1R of cost per trade, the break-even win rate becomes 1.1 ÷ 3, or 36.7%. Payoffs are compared in more detail on risk reward ratio.

Position size

The size follows from the amount you accept to lose and the distance to the stop, not the other way around.

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.Position size comes from two inputs you set: the amount risked and the distance to the stop.

Losing streaks: how long the bad runs get

Even a profitable method meets long runs of losses. The chart gives the probability of at least one streak of a given length over 100 independent trades, computed exactly and checked by simulation.

Chance of at least one losing streak in 100 trades

Chance of at least one losing streak in 100 trades. 5 losses in a row or more: Win rate 40% 97.6%, Win rate 55% 64.7%; 8 losses in a row or more: Win rate 40% 49.0%, Win rate 55% 8.4%; 10 losses in a row or more: Win rate 40% 20.5%, Win rate 55% 1.7%. Our computation; the inputs and the method are in the text.
  • Win rate 40%
  • Win rate 55%
Our computation; the inputs and the method are in the text.Independent trades, computed exactly and checked by simulation.

At a 40% win rate, which pays well with 2R wins, a run of 8 losses in 100 trades is about as likely as not. At 2% risk per trade, 8 losses in a row cost 14.9% of the account (0.988 = 0.851); at 10% per trade, 57.0%. The probability that the losses reach a level you call ruin is computed on our risk of ruin page: with a 55% win rate and a 1:1 payoff, it goes from 0.66% when ruin is 25 losses away to 13.4% when it is 10 losses away. The pressure of a run like that on the trader is the subject of scared money don’t make money.

Compounding and drawdown recovery

Gains and losses multiply rather than add. A loss of x needs a gain of x ÷ (1 − x) to get back to the start.

Gain needed to recover from a drawdown

Gain needed to recover from a drawdown. Drawdown of 10%: +11.1%; Drawdown of 20%: +25%; Drawdown of 25%: +33.3%; Drawdown of 50%: +100%; Drawdown of 75%: +300%; Drawdown of 90%: +900%. 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.
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.x ÷ (1 − x), where x is the drawdown. The gain needed grows much faster than the loss.

The same rule makes volatility costly: +10% then −10% leaves 0.99 of the start, a 1% loss, and +50% then −50% leaves 0.75. Compounding works the other way for steady gains: (1 + r)n, so 1% a period for 100 periods multiplies capital by 2.70. A hypothetical 1% per trading day for 250 days would multiply it by 12.0; nothing on this page shows such a rate is achievable, and the losing streaks above are why it rarely lasts. The penny doubled for 30 days puzzle takes the same arithmetic to its extreme.

More definitions are in trading concepts.

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.

Frequently asked questions

What math do you need for trading?

Arithmetic and percentages: expectancy, the break-even win rate, position size, the odds of losing streaks, compounding and drawdown recovery. The formulas on this page cover them.

What is a trading edge?

A positive expectancy after costs, measured on enough trades. Tharp considers thirty trades a minimum for a first idea and 100 to 200 for a clear picture.

How do you calculate expectancy in trading?

Multiply the win rate by the average win, subtract the loss rate times the average loss, all in R. At 40% wins of 2R and 60% losses of 1R, the expectancy is +0.2R per trade.

What win rate do I need to be profitable?

1 ÷ (1 + average win ÷ average loss), before costs: 50% with equal wins and losses, 33.3% when wins are twice the losses, 25% when they are three times.

How much do I need to gain to recover from a drawdown?

A loss of x needs a gain of x ÷ (1 − x): 25% after a 20% loss, 100% after a 50% loss and 900% after a 90% loss.

How many losing trades in a row should I expect?

It depends on the win rate. Over 100 trades, at least one run of 8 losses has a 49% probability at a 40% win rate and 8.4% at 55%.

Sources

  1. Van Tharp Institute, Tharp Think Trading Concepts
  2. Van Tharp, A Short Lesson on R and R-Multiples (PDF)
  3. Charles M. Grinstead and J. Laurie Snell, Introduction to Probability, section 12.2, Gambler's Ruin (Dartmouth, free PDF)
, 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