The mathematical expectancy of a trading strategy is calculated as follows: (Win Rate x Average Win) - (Loss Rate x Average Loss). A positive value confirms a statistical edge regardless of win rate. This objective metric lets you compare two strategies without being misled by a flattering win rate or the occasional spectacular gain. According to the Autorité des marchés financiers (AMF), the majority of retail traders lose money over the long term, often because they never measured their real edge before going live. This guide explains how to calculate, interpret, and use expectancy to choose between your trading strategies.
The mathematical expectancy formula
Formal definition
The complete mathematical expectancy formula applied to trading is:
E = (Win Rate x Average Win) - (Loss Rate x Average Loss)
The four components of this formula are:
- Win Rate (WR): proportion of winning trades, expressed between 0 and 1 (0.55 for 55%)
- Average Win (AW): average profit on winning trades, expressed in R (multiples of initial risk)
- Loss Rate (LR): proportion of losing trades, equal to 1 - WR
- Average Loss (AL): average loss on losing trades, expressed in R
Expressing results in R (risk multiples) normalizes comparisons between strategies that use different position sizes. A gain of 2R means the trader won twice their initial risk on that trade, whether they risked 50 or 500 dollars.
Why use R-multiples?
Expressing expectancy in R lets you compare strategies independently of capital invested and position size. An expectancy of 0.5R means the strategy generates an average of 50% of the initial risk per trade, whether that risk is 50 dollars or 500 dollars. This makes direct comparison between a scalper and a swing trader straightforward.
Step-by-step calculation with a concrete example
Consider a strategy with the following parameters, drawn from a 12-month backtest:
- Win Rate: 55% (110 winning trades out of 200)
- Average win per winning trade: 1.5R
- Loss Rate: 45% (90 losing trades out of 200)
- Average loss per losing trade: 1R (stop-losses systematically respected)
Applying the formula:
E = (0.55 x 1.5) - (0.45 x 1) = 0.825 - 0.45 = 0.375R
This strategy generates an average of 0.375R per trade. Over 200 trades with a risk of $100 per trade, that represents an expected gain of 200 x 0.375 x 100 = $7,500. The expectancy is positive and confirms the existence of a statistical edge.
Collect your backtest data
Calculate Win Rate
Calculate average win in R
Calculate Loss Rate and average loss
Apply the formula and interpret
Comparing two strategies by expectancy
Example: scalper vs swing trader
Expectancy reveals counter-intuitive realities. A scalper with a 65% win rate can display negative expectancy, while a swing trader with only 40% winning trades can generate a significantly positive edge. Win rate alone tells you nothing about the real profitability of a strategy.
| Metric | Scalper (Strategy A) | Swing Trader (Strategy B) |
|---|---|---|
| Win Rate | 65% | 40% |
| Average Win (R) | 0.5R | 3.5R |
| Loss Rate | 35% | 60% |
| Average Loss (R) | 1R | 1R |
| Calculated Expectancy | -0.025R (negative) | +0.80R (positive) |
Calculation for Strategy A (scalper): (0.65 x 0.5) - (0.35 x 1) = 0.325 - 0.35 = -0.025R
Calculation for Strategy B (swing trader): (0.40 x 3.5) - (0.60 x 1) = 1.4 - 0.6 = +0.80R
The scalper loses an average of 0.025R per trade despite a 65% win rate, because gains are too small relative to losses. The swing trader generates 0.80R per trade despite a win rate of only 40%. Strategy B is objectively superior from an expectancy standpoint.
Strategy A vs B: how to read the result
To compare two strategies, calculate the expectancy of each from your complete backtest results and compare the absolute values. Also account for trading frequency: a strategy with 0.3R expectancy and 50 trades per month generates more value than a strategy with 0.8R expectancy and only 5 trades per month.
The complete comparison criterion is therefore: Expectancy (R) x Trading frequency (trades per year). This composite metric reflects the annualized R return of each strategy.
For a deeper look at the relationship between expectancy and profit factor, see our dedicated guide on expectancy and profit factor in backtesting.
The limits of expectancy as a standalone metric
Expectancy vs drawdown
Positive expectancy does not guarantee account survival. Two strategies can display the same expectancy (0.3R per trade) with radically different risk profiles depending on how gains and losses are distributed over time.
| Metric | Strategy C (steady) | Strategy D (volatile) |
|---|---|---|
| Expectancy | 0.3R | 0.3R |
| Maximum Drawdown | 8% | 35% |
| Maximum losing streak | 4 consecutive trades | 12 consecutive trades |
| Ruin risk (2% risk per trade) | Very low | High |
Strategy D can wipe out an account before positive expectancy materializes, especially with significant leverage. Always combine expectancy analysis with maximum drawdown, risk/reward ratio, and robustness metrics.
When positive expectancy hides ruin risk
Expectancy alone is not enough
An expectancy of 0.2R with a possible losing streak of 15 consecutive trades can be enough to ruin an account if the trader risks 10% per trade. The prudent rule is to never risk more than 1 to 2% of capital per trade, regardless of the expectancy calculated on the backtest.
Expectancy relies on the law of large numbers: it materializes over hundreds of trades, not the first 10 or 20. On a small sample (fewer than 100 trades), positive expectancy may be due to chance or backtest overfitting. Walk-forward testing is essential to validate that expectancy holds on out-of-sample data.
According to the ESMA (European Securities and Markets Authority), the vast majority of retail accounts on leveraged products record losses, confirming that very few traders rigorously measure and validate their expectancy before trading with real money.
Calculating expectancy with Backtrex
Automatic report reading
Backtrex automatically calculates the mathematical expectancy for each tested configuration and displays it directly in the backtest report. You enter no formulas manually: the system aggregates all your trades, calculates win rate, average win in R, loss rate, and average loss, then displays the final expectancy alongside its evolution over time.
The Backtrex report gives you at a glance:
- Overall strategy expectancy across the entire test period
- Expectancy by parameter configuration (varying stop-loss, take-profit, filters)
- Month-by-month expectancy evolution (to detect gradual degradation)
Discover all Backtrex features for visual no-code backtesting. Also see our comparison of backtesting vs forward testing to understand how to alternate between the two approaches in your validation process.
Optimizing parameters to maximize edge
Backtrex lets you test multiple configurations of the same strategy in parallel (varying stop-loss, take-profit, time filters, or volatility filters) and compare expectancies directly from the drag-and-drop interface. In seconds, you identify which configuration generates the highest and most robust expectancy across the entire test period.
Expectancy and walk-forward testing
Expectancy calculated only on the optimization period may be biased by overfitting. In walk-forward testing, you measure whether expectancy remains positive on out-of-sample periods. This is the most reliable robustness criterion for distinguishing a real edge from a historical data artifact.
For access to advanced expectancy calculation, strategy comparison, and drag-and-drop block optimization features, see our Backtrex pricing page.
Important Risk Warning
Conclusion
Mathematical expectancy is the fundamental metric for evaluating and comparing your trading strategies objectively. A high win rate is not enough: a scalper strategy with a 65% win rate can have negative expectancy, while a swing trader at 40% can generate a powerful edge of 0.80R per trade. By combining expectancy with drawdown analysis and walk-forward validation, you build a rigorous, repeatable strategy selection process. Backtrex automates this calculation for every backtest, letting you compare your configurations in seconds without writing a single line of code.
No. Positive expectancy means the strategy is profitable in expectation over a large number of trades. With a small sample or high variance, extended losing periods remain possible. Expectancy materializes statistically over hundreds of trades. Always combine its analysis with maximum drawdown and position sizing to avoid ruin risk.
Expectancy is calculated on a given historical period. As market conditions evolve (volatility, trends, correlations between assets), expectancy can degrade if the strategy is not adapted to the current regime. In walk-forward testing, you measure whether expectancy remains positive across different periods to validate the strategy's robustness in varied market contexts.
There is no universal threshold, but most professional traders consider an expectancy above 0.2R per trade the minimum viable, calculated over at least 200 backtest trades. An expectancy between 0.4R and 0.8R on a large sample is considered solid. Below 0.1R, the risk of overfitting or edge erosion from transaction costs is high.
Technically yes: if you have a history of live trades with gains and losses in R, you can calculate expectancy manually. But without a backtest on long historical data, the live trade sample is generally too small (fewer than 50 to 100 trades) for expectancy to be statistically significant. Backtesting remains the most reliable initial validation method.
Profit factor (PF) is the ratio of total gains to total losses. A profit factor above 1 implies positive expectancy. The relationship is: PF = (WR x AW) / (LR x AL). A profit factor of 1.5 indicates that total gains represent 1.5 times total losses. Expectancy and profit factor are complementary: expectancy is expressed per trade in R, profit factor as an overall ratio across the period.
Most experts recommend a minimum of 100 to 200 trades for a first estimate of expectancy, and more than 500 trades for robust validation. With fewer than 100 trades, the confidence interval is too wide to distinguish a real edge from chance. In walk-forward testing, each out-of-sample period must itself contain enough trades to be interpretable.
Rarely. In live trading, transaction costs, slippage, and behavioral biases (imperfect stop-loss execution, premature exit from winning trades) typically degrade the expectancy calculated in backtesting. A 20 to 40% gap between theoretical and real expectancy is common. Integrate commissions and slippage from the backtesting phase to obtain a more realistic estimate of net edge.