The edge equation: expectancy as the core idea
Win rate and payoff combined into one number, what that number does and does not promise, and why every later module is a way of estimating it honestly.
In this lesson you will
- Calculate expectancy in R from a win rate, an average win and an average loss.
- Work out the breakeven win rate for a given payoff, and the effect of costs.
- Explain why a positive expectancy can still produce losing stretches.
- Describe why a small sample gives an unreliable estimate of expectancy.
Traders argue about win rates, reward-to-risk ratios and "accuracy" as if each one settled the question of whether a strategy works. None of them does on its own. The number that combines them is expectancy: the average result you can expect per trade if the past statistics hold. It is the closest thing systematic trading has to a single definition of an edge, and most of this course is about estimating it honestly.
Measuring in R
Expectancy is easiest to reason about in R, where 1R is the amount you planned to lose on a trade if the stop is hit. A trade that makes twice the planned risk is +2R; a full stop-out is −1R. Measuring in R separates the quality of the rules from the size of the account, so a result means the same thing whether you risk 50 or 5,000 per trade.
The equation
With a win rate , an average win of and an average loss of , both in R, expectancy is:
In words: the share of trades that win, times what they make, minus the share that lose, times what they cost.
Take a system that wins 40% of the time, makes 2R on an average winner and loses 1R on an average loser:
On average, each trade adds a fifth of the planned risk. Over 100 trades, that is +20R on average. Notice that this system loses more often than it wins. A low win rate is not a flaw if the winners are large enough, and a high win rate is not a strength if the losers are larger.
Breakeven and costs
Setting expectancy to zero and solving for gives the breakeven win rate, the point at which a given payoff neither makes nor loses money:
For 2R winners and 1R losers, that is , or about 33.3%. Every trade also pays costs: commissions, the bid-ask spread and slippage. Expressed in R, they come straight off the result. The code below wraps the equation in two small functions and adds a cost per trade.
def expectancy(win_rate, avg_win_r, avg_loss_r, cost_r=0.0):
"""Average result per trade in R, after a fixed cost per trade."""
return win_rate * avg_win_r - (1 - win_rate) * avg_loss_r - cost_r
def breakeven_win_rate(avg_win_r, avg_loss_r):
"""Win rate at which expectancy is exactly zero, before costs."""
return avg_loss_r / (avg_win_r + avg_loss_r)
print(f"Before costs: {expectancy(0.40, 2.0, 1.0):+.2f}R")
print(f"After 0.08R of costs per trade: {expectancy(0.40, 2.0, 1.0, cost_r=0.08):+.2f}R")
print(f"Breakeven win rate at 2R wins and 1R losses: {breakeven_win_rate(2.0, 1.0):.1%}")Before costs: +0.20R
After 0.08R of costs per trade: +0.12R
Breakeven win rate at 2R wins and 1R losses: 33.3%A cost of 0.08R per trade removes 40% of this edge. For a strategy with tight stops, where 1R is a small price distance, the spread alone can be a large fraction of R. This is why a test that ignores costs is not a test.
A positive edge does not mean a smooth ride
Expectancy describes the average of many trades. It says nothing about the order in which wins and losses arrive. The simulation below takes the same system, 40% winners at 2R and losers at 1R, and plays out five separate runs of 100 trades each. It uses numpy, a library for working with arrays of numbers, and a random number generator with a fixed seed so that you get exactly the same "random" results shown here.
import numpy as np
win_rate = 0.40 # 40% of trades win
avg_win_r = 2.0 # an average winner makes 2R
avg_loss_r = 1.0 # an average loser costs 1R
expectancy = win_rate * avg_win_r - (1 - win_rate) * avg_loss_r
print(f"Expectancy per trade: {expectancy:+.2f}R")
rng = np.random.default_rng(seed=7)
for run in range(1, 6):
wins = rng.random(100) < win_rate
results = np.where(wins, avg_win_r, -avg_loss_r)
print(f"Run {run}: {wins.sum()} wins, total {results.sum():+.1f}R over 100 trades")Expectancy per trade: +0.20R
Run 1: 42 wins, total +26.0R over 100 trades
Run 2: 35 wins, total +5.0R over 100 trades
Run 3: 43 wins, total +29.0R over 100 trades
Run 4: 42 wins, total +26.0R over 100 trades
Run 5: 30 wins, total -10.0R over 100 tradesEach run draws 100 random numbers between 0 and 1 and counts a trade as a win when its number is below 0.40. The rules never change, yet the totals range from −10R to +29R. Run 5 is the same edge as run 3, with a different sequence of luck.
Two lessons follow. First, a losing stretch does not prove that an edge has gone, and a winning stretch does not prove that one exists. Second, your risk per trade has to survive the bad runs, not the average one. The Expectancy Simulator lets you change the win rate, payoff and number of trades and watch many runs at once.
Why every later module comes back to this
If expectancy were easy to measure, systematic trading would be simple. It is hard because the estimate can be wrong in many quiet ways, and each part of this course deals with one of them:
- Data (Module 02) can flatter results through errors, missing history or companies that no longer exist.
- Statistics (Module 03) tells you how much a sample can actually say.
- Rules (Module 04) have to be fixed before testing, or the estimate measures your hindsight.
- Backtesting (Module 05) has to include costs and avoid using information that was not available at the time.
- Validation (Module 06) checks whether the estimate holds on data the rules have never seen.
- Risk (Module 07) decides how much to bet on an estimate you know is uncertain.
The core idea
An edge, stated plainly, is a positive expectancy after costs that holds on data you did not use to design the rules. Every part of that sentence matters, and the rest of this course takes it apart piece by piece. The next lesson lays out the workflow for doing that, from first idea to running system.
Key takeaways
- Expectancy is the average result per trade, measured in R. An edge is a positive expectancy after costs.
- Win rate alone says nothing; it only means something together with the average win and the average loss.
- Costs come straight off expectancy, and small edges can disappear entirely.
- A positive expectancy describes the average of many trades. Any particular run of trades can still lose.
- Most of the course is about estimating expectancy without fooling yourself.
Estimate expectancy from your own records
Take the last 30 or more trades from a journal, or invent a realistic list if you have none. Express each result in R, then compute the win rate, the average win, the average loss and the expectancy. Repeat after subtracting a fixed cost per trade, and note how large the cost has to be before the expectancy reaches zero.
Self-check
Answer in your own words first, then reveal the answer.
A system wins 55% of the time, with an average win of 0.8R and an average loss of 1R. What is its expectancy?
Show answerHide answer
0.55 × 0.8 − 0.45 × 1.0 = 0.44 − 0.45 = −0.01R. Despite winning more often than it loses, it slightly loses money on average, before costs.
What is the breakeven win rate for trades that make 3R when they win and lose 1R when they lose?
Show answerHide answer
1 ÷ (3 + 1) = 25%. Any win rate above 25% gives positive expectancy before costs.
In the simulation, every run used the same rules and the same +0.20R expectancy, yet one run lost 10R. Why?
Show answerHide answer
Expectancy is an average over many trades. Over 100 trades, the number of winners varies by chance, and a run with fewer winners than average can lose money even though the underlying edge is positive. Longer samples narrow the spread but never remove it.
