VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Entries, exits and risk control

Trading edge: what it is in numbers and how many trades you need

A trading edge is an expectancy per trade that stays above zero after commission and slippage, measured from a trade list and best written in units of risk (R). A few dozen trades rarely show whether the edge is real; a few hundred begin to, and the band of uncertainty around the number tells you how far you are.

By · Published · updated · Editorial policy

Contents
  1. What is a trading edge in numbers?
  2. How do you measure edge per trade and per unit of risk?
  3. How many trades do you need before the edge means something?
  4. What does a measured edge look like in a real trade list?
  5. Where do retail edges usually come from?
  6. Why the edge in a backtest is usually larger than the real one
  7. How does an edge decay, and how do you notice it in time?
  8. Frequently asked questions
  9. References

What is a trading edge in numbers?

A trading edge is an expectancy per trade that stays above zero after commission and slippage. You measure it from a trade list: win rate times average win, minus loss rate times average loss, best written in units of risk (R). A few dozen trades rarely settle whether the edge is real. A few hundred begin to.

Expectancy is the average result of one trade, counting wins and losses together, after every cost of taking the trade. A pattern that looks good on a chart is not an edge yet. It becomes an edge when you have counted the trades and the average is positive with room to spare. The free win rate and expectancy calculator turns a win rate, an average win and an average loss into expectancy per trade, which is the first number this article is about.

When you measure a trade list, one of three results comes out:

  1. Edge. Expectancy after costs is above zero, and the uncertainty band around it (explained below) is also above zero.
  2. No edge. Expectancy is above zero before costs and below zero after them. This is the most common result for rules that trade often.
  3. Not known yet. Expectancy is above zero, but the band still crosses zero. More trades are needed before the number means anything.

How do you measure edge per trade and per unit of risk?

Expectancy per trade is win rate times average win minus loss rate times average loss, and dividing each trade by the amount risked turns it into a figure you can compare across markets and contract sizes. This is the one formula in the article:

Expectancy = W × AW − L × AL

  • W is the win rate: the share of trades that ended with a gain, after costs.
  • AW is the average win: the mean gain of those winning trades.
  • L is the loss rate: the share of trades that ended with a loss, so L equals 1 − W.
  • AL is the average loss: the mean loss of the losing trades, written as a positive number.

Costs go in before anything else. Subtract commission and slippage from every trade first, then compute W, AW and AL from the net results. Slippage is the difference between the price your rule assumed and the price you would actually have been filled at. The article on commission, slippage and the average trade explains how to set these amounts honestly.

R is the amount you risk on one trade: the distance from entry to stop, multiplied by the point value and the number of contracts. If you risk $100 on a trade and it closes with a net gain of $200, that trade is +2.0 R. If it hits the stop, it is −1.0 R. Writing every trade in R removes the contract size and the market from the number. A strategy on TAIEX futures and a strategy on a micro S&P contract can then be read side by side. The same expectancy in dollars would tell you almost nothing, because one contract is worth many times the other. To hold R at the same $100 on a TAIEX contract and on a micro S&P contract, the position size calculator turns account risk and stop distance into a contract count.

Doubling the position size doubles the dollar expectancy from 20 to 40 dollars per trade, while the expectancy in R stays at plus 0.20 R per trade Double the size, same R Hypothetical, $100 risk per contract Dollars In R 1 contract +$20 +0.20 R 2 contracts +$40 +0.20 R Size changes dollars, not the edge. So: write every trade in R.
Expectancy weighs the wins against the losses. Written in R, the same trades give the same figure whatever the contract size.

Hypothetical example

A strategy wins 40% of its trades with an average win of +2.0 R and loses 60% with an average loss of −1.0 R. Expectancy = 0.40 × 2.0 − 0.60 × 1.0 = 0.80 − 0.60 = +0.20 R per trade. With one micro contract and $100 risked per trade, that is +$20 per trade. With two contracts it is +$40 per trade. The dollar figure doubled; the edge did not change. It is still +0.20 R.

A win rate on its own is not an edge.

Hypothetical example

A rule that wins 70% of the time with average wins of +0.5 R and average losses of −1.5 R has an expectancy of 0.35 − 0.45 = −0.10 R.

The article on expected value and how to trust expectancy goes deeper into the relation between win rate and payoff.

How many trades do you need before the edge means something?

The measured expectancy of a small trade list swings widely by chance, and the band of uncertainty around it shrinks only with the square root of the trade count, so a few dozen trades rarely settle the question and a few hundred start to. Think of a coin. Thirteen heads in 20 flips tells you almost nothing about the coin. Six hundred and fifty heads in a thousand flips tells you a lot. Trades work the same way.

The standard deviation of your per-trade results is a measure of how spread out they are around the average; a list of many +3 R and −2 R trades has a larger spread than a list of +0.4 R and −0.3 R trades. The standard error is the typical distance between the expectancy you measured and the true expectancy. You get it by dividing the standard deviation of the per-trade R results by the square root of the number of trades. A range of about two standard errors on each side of the measured expectancy covers the true value most of the time. That range is the band used throughout this article.

The square root is the painful part. To halve the width of the band you need four times as many trades. Doubling the trade count only shrinks the band by about 30%.

Hypothetical bands around a true expectancy of plus 0.20 R after 20, 100, 225, 500 and 1000 trades: the band crosses zero up to 225 trades and stays above zero only from 500 trades on The band shrinks slowly True edge +0.20 R, hypothetical 0 R 20 100 225 500 1000 trades Crosses 0 Above 0 It clears zero after a few hundred. So: never judge on a few dozen trades.
Hypothetical example: the band around a true expectancy of +0.20 R narrows slowly. It stops crossing zero only after a few hundred trades.

Hypothetical example

Take the strategy above, true expectancy +0.20 R, with a standard deviation of per-trade results of 1.5 R. After 20 trades the standard error is 1.5 ÷ 4.5 ≈ 0.34 R, so the band is about −0.47 R to +0.87 R. It includes zero and also includes very large edges, so you know almost nothing. After 100 trades the band is about −0.10 R to +0.50 R. Still crossing zero. After 225 trades the standard error is 0.10 R and the band just touches zero. After 500 trades the band is about +0.07 R to +0.33 R. After a thousand trades it is about +0.11 R to +0.29 R.

Two things make the real requirement larger than the arithmetic suggests. Trades that all come from one market condition, for example one trending year, count for less than the same number of trades spread over several years. And the lower the expectancy relative to the spread of results, the more trades are needed. A rule with a small edge and large swings per trade may need thousands of trades before the band clears zero.

What does a measured edge look like in a real trade list?

Taking a trade list through five steps shows exactly what a credible and a non-credible edge look like side by side. The steps are the same for a backtest trade list and for a live trading log.

  1. Subtract commission and slippage from each trade to get its net result.
  2. Divide each net result by the risk taken on that trade to express it in R.
  3. Count wins and losses; compute the average win and the average loss in R.
  4. Compute expectancy: win rate × average win − loss rate × average loss.
  5. Compute the standard error: the standard deviation of the R results divided by the square root of the trade count. The band is about two standard errors on each side of the expectancy.
Five steps from a trade list to expectancy with a band, shown for hypothetical strategy A: subtract costs, divide by risk, compute win rate and averages, compute expectancy of plus 0.20 R, and a band of plus 0.02 to plus 0.38 R Five steps to a measured edge Strategy A, hypothetical 1 2 3 4 5 Subtract costs Divide by risk Rates and averages Expectancy Band (±2 SE) $215 → $211 +2.11 R 40%, +2 R, −1 R +0.20 R +0.02 to +0.38 R Band above zero: a measured edge. So: record expectancy with its band.
From raw trade list to expectancy with a band, in five steps. The values shown are from the hypothetical example below.

Hypothetical example

Steps 1 and 2 on the first three trades of a strategy that risks $100 per trade on one micro contract, with $4 of commission and slippage per round trip: trade 1 gained $215 gross, net $211, which is +2.11 R; trade 2 lost $100 gross at the stop, net −$104, which is −1.04 R; trade 3 gained $48 gross, net $44, which is +0.44 R. Note that the stop-loss trade costs more than 1 R once costs are included.

Steps 3 to 5 for two complete strategies:

Strategy AStrategy B
Trades after costs30040
Win rate40%45%
Average win+2.0 R+2.0 R
Average loss−1.0 R−1.1 R
Expectancy+0.20 R+0.30 R
Standard deviation of results1.5 R1.6 R
Standard error0.09 R0.25 R
Band (two standard errors)+0.02 R to +0.38 R−0.20 R to +0.80 R

Strategy A has the lower expectancy, but its band stays above zero. That is a measured edge. Strategy B has the higher expectancy, but its band runs from a clear loss to a very large gain. Nothing is known about B yet; it needs several times more trades before the number means anything.

Keep both figures in your records: the expectancy and the band. When a strategy with 40 trades shows +0.30 R, write it as "+0.30 R, band −0.20 to +0.80". That one line stops you from treating a guess as a result.

Where do retail edges usually come from?

Retail edges almost never come from speed or information; they come from accepting a cost that other participants avoid, or from applying a simple rule more consistently than other people do. Every one of these still has to pass the measurement above. The list says where to look, not what works.

  • Session-time effects. Different hours have different participants. A rule that only trades the first hour, or only the night session, is taking a condition that many traders do not want, for example thin liquidity or an awkward local time.
  • Holding through breaks or overnight. Carrying a position across a session break or a weekend means accepting gap risk. Some participants cannot or will not hold, and a rule that does may be paid for taking that risk.
  • Taking the other side of forced flows. Stop-loss cascades, settlement-day adjustments and month-end position changes are trades that have to happen regardless of price. A rule that steps in against them is providing something others need.
  • Consistent execution of a simple rule. Many people know a rule but skip it after three losses. A rule applied every time, with the same size and the same stop, collects what the inconsistent trader leaves behind.
  • Fewer trades at lower cost. A rule that trades less often pays less in commission and slippage per unit of edge, which is itself a reason it can stay above zero after costs when a faster rule cannot.

Speed advantages, information advantages, order-book queue position and exchange rebate structures belong to firms with co-located servers and large volumes. A retail rule built on them is measuring something it cannot actually collect.

Sources a retail trader can collect: session times, overnight holds, forced flows, consistent rules and fewer trades; sources that belong to firms only: speed, information, order queue and rebates Where retail edges come from Each one still has to pass the test Retail can collect Firms only Session times Overnight holds Forced flows Consistent rules Fewer trades Speed Information Order queue Rebates
Where retail edges tend to come from, and which sources belong to a different kind of participant.

Why the edge in a backtest is usually larger than the real one

When you pick the best of many tested variants, the chosen result includes luck that will not repeat, so the out-of-sample or forward edge should be expected to be smaller and the in-sample figure treated as an upper bound. Imagine 500 people each flipping a coin 50 times. The best flipper might get 35 heads. That person has no skill; being the best of 500 is enough to produce that record. Testing 500 parameter sets and keeping the best one does the same thing to expectancy.

Bailey, Borwein, López de Prado and Zhu (2014) show that the expected performance of the best of many backtests rises with the number of trials even when none of them has any real edge, and Bailey and López de Prado (2014) give a correction for the number of trials tested. The practical lesson is simple: record how many variants you tested, and treat the in-sample figure of the winner as a ceiling, not a forecast. The article on why the best backtest is usually inflated covers this research in more detail.

Walk-forward analysis is the usual way to see the smaller number. It tunes the strategy on one window of data, tests the chosen settings unchanged on the window that follows, and repeats forward, so the joined out-of-sample trades were all taken with settings chosen before their data was seen. The expectancy of those out-of-sample trades is the figure to plan with. Strategy validation in AlphaPrime (Valynox) includes walk-forward analysis, so the out-of-sample trade list is available for the measurement in this article.

Hypothetical: the best of 500 variants shows plus 0.35 R in-sample, the same rules show plus 0.15 R out-of-sample, and the gap between them is selection luck Best of 500 is inflated Hypothetical: one rule, 500 variants In-sample, best variant +0.35 R Out-of-sample +0.15 R selection luck In-sample is a ceiling, not a forecast. So: plan with out-of-sample numbers.
Hypothetical example: the best of 500 variants shows +0.35 R in-sample. The same rules measured out-of-sample show +0.15 R. The gap is the selection effect.

Hypothetical example

A search tests 500 parameter variants of one rule. The best variant shows an in-sample expectancy of +0.35 R over 400 trades. Walk-forward analysis of the same rule gives an out-of-sample expectancy of +0.15 R over 180 trades, with a standard deviation of 1.4 R, so the band is about −0.06 R to +0.36 R. The honest summary is: an edge of about +0.15 R is plausible, it is not yet confirmed, and +0.35 R is the most it could be.

How does an edge decay, and how do you notice it in time?

An edge fades gradually as markets change, so tracking expectancy over a rolling window of recent trades and comparing it against the band measured in the backtest tells you whether a drawdown is normal variance or a lost edge. Decay has ordinary causes: the participants who created the forced flow change their behaviour, volatility shifts so the stop distance no longer fits, or more traders find the same pattern. None of these announce themselves. The trade list does.

The procedure has four steps, and the trigger is set before the first live trade, not after a losing week:

  1. From the out-of-sample backtest trades, compute the expectancy and its band as above.
  2. After each live trade, recompute the expectancy of the most recent 50 trades (the rolling expectancy). Fifty is a common window; a rule with very few trades per month may use 30, a very active one 100.
  3. Plot the rolling expectancy against the backtest band.
  4. Define the review trigger in advance, for example: the rolling expectancy stays below the lower edge of the band for 50 consecutive trades.

A rolling line that dips toward the bottom of the band and comes back is a normal losing streak; the backtest contained streaks like it. A rolling line that leaves the band and stays out is a different thing. It means recent trades are being drawn from a distribution the backtest did not describe, and the strategy needs a review before it trades again.

Hypothetical 50-trade rolling expectancy plotted against a backtest band of plus 0.05 to plus 0.35 R: a dip that stays inside the band is variance, a slide that leaves the band and stays below it is the signal to review Dip or lost edge? Rolling 50-trade expectancy Backtest band +0.35 +0.05 variance review Staying below the band is the signal. So: set the trigger before going live.
Hypothetical example: a dip inside the band is variance. A rolling expectancy that leaves the band and stays below it is the signal to review.

Hypothetical example

A strategy's out-of-sample band is +0.05 R to +0.35 R. In live trading, the 50-trade rolling expectancy stays inside that band for 400 trades, once dipping to +0.06 R during a losing streak and then recovering. Over the next 50 trades it slides to −0.10 R and stays below +0.05 R for 150 trades in a row. The dip at trade 300 was variance; the slide after trade 400 meets the review trigger.

The trade list is the raw material for all of this. The Performance Report in AlphaPrime shows the individual trades, the equity curve, drawdown and periodic performance for a strategy, which gives you the per-trade results to compute the band once and compare live trades against it later.

What this means if you use AlphaPrime: run the measurement in this article on the out-of-sample trades from validation, write down the expectancy with its band, and use that band, not the in-sample figure, as the reference for sizing and for noticing decay once the exported strategy is trading.

Frequently asked questions

What is a trading edge in simple terms?

A trading edge is a positive average result per trade after commission and slippage, measured over enough trades that the result is unlikely to be chance. It is written as expectancy: win rate times average win minus loss rate times average loss. A chart pattern or a high win rate on its own is not an edge until it has been counted this way.

How many trades do you need to prove a trading edge?

It depends on the size of the edge relative to the spread of per-trade results. The uncertainty band around measured expectancy shrinks with the square root of the trade count, so halving the band takes four times as many trades. For a typical rule with an expectancy of a few tenths of an R, a few dozen trades say little, and a few hundred trades are usually the point where the band stops crossing zero.

Is a 60% win rate an edge?

Not by itself. A 60% win rate with average wins of +0.5 R and average losses of −1.0 R gives an expectancy of 0.30 − 0.40 = −0.10 R, which is a losing rule. A 35% win rate with average wins of +3.0 R and average losses of −1.0 R gives +0.40 R. The win rate and the payoff ratio only mean something together.

Why should I measure edge in R instead of dollars?

R is the amount risked on one trade, so a result in R does not depend on the contract size or the market. Two strategies on different contracts can be compared directly, and doubling the position size does not change the figure. Dollar expectancy changes every time you change size, which hides whether the rule itself improved.

How do I know if my edge has disappeared?

Compute the expectancy of your most recent 50 trades after every trade and compare it with the band measured from your out-of-sample backtest trades. A dip toward the bottom of the band that recovers is a normal losing streak. A rolling expectancy that leaves the band and stays below it for a pre-set number of trades is the signal to stop and review the strategy.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
  • Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.