BullsEdges algo trading guide: An edge is a repeatable advantage that makes money over many trades. Expectancy is how you measure it. Here is the formula and how to use it.
Traders talk about "having an edge" all the time, often without defining it. An edge is simply this: over a large number of trades, after all costs, the strategy makes more than it loses. Expectancy is the number that tells you whether you have one.
BullsEdges algo trading application: Calculate expectancy after costs and examine the average loss as carefully as the win rate before judging an edge.
The expectancy formula
Expectancy = (Win rate x Average win) - (Loss rate x Average loss)
Example: - Win rate 40%, average win $150. - Loss rate 60%, average loss $80. - Expectancy = 0.40 x 150 - 0.60 x 80 = 60 - 48 = $12 per trade.
Positive expectancy means the strategy makes money on average. Negative means it loses, however good some individual trades look.
Expectancy in R
Dividing by the average risk per trade gives expectancy in R multiples. If the average risk was $50, the strategy above earns 0.24R per trade. This makes strategies comparable across account sizes and markets.
Win rate alone means nothing
- 80% win rate, average win $20, average loss $100: expectancy = 16 - 20 = -$4. A losing strategy that feels like winning.
- 35% win rate, average win $300, average loss $100: expectancy = 105 - 65 = +$40. A winning strategy that feels like losing.
Break-even win rate
For a given ratio of average win to average loss, there is a win rate where expectancy is zero:
Break-even win rate = Average loss / (Average win + Average loss)
If wins and losses are equal, you need 50%. If losses are twice as large as wins, you need 67%. This is a quick sanity check on any strategy idea.
Costs must be included
Expectancy before costs is a fantasy number. Subtract spread, commission, swap and slippage per trade. A strategy with $3 expectancy and $3 of costs has no edge.
How many trades do you need?
Expectancy from 20 trades is mostly noise. As a rough guide:
- Under 100 trades: an idea, not evidence.
- 200-500 trades: a reasonable estimate.
- Many hundreds across different market conditions: a solid one.
Check expectancy separately in different years and in each half of the data. A real edge should be positive in most periods.
Where edges come from
- Market behaviour that repeats (trends after breakouts, ranges in quiet hours).
- Better execution or lower costs than others.
- Discipline - taking every valid signal when others hesitate.
- Risk management that keeps losses small relative to wins.
BullsEdges takeaway for algo trading
Before asking "how much can this make?", ask "what is the expectancy after costs, over how many trades?" If you cannot answer that, you do not know yet whether you have an edge.
Trading forex and gold carries a high level of risk and may not be suitable for every investor. Past performance and backtests do not guarantee future results. This article is education, not financial advice.
