Skip to content
Menu
Finabase Learn

Build and test a strategy Lesson 3 of 14

Strategies · Building and testing a strategy

Edge and expectancy: the average trade, worked on real trade lists

How to calculate the expectancy of a strategy from its win rate and average gain and loss, with two real SPY trade lists and a test of how much of each is luck.

On this page
  1. The formula
  2. Two real trade lists
  3. What costs do to expectancy
  4. How much of it is luck?
  5. From expectancy to edge
  6. How Finabase does it
  7. Frequently asked questions
  8. Summary
  9. Check your understanding
  10. Exercise

An edge is a reason to expect that a strategy's trades, added up, come out ahead. Expectancy is the number that measures it: the average result of one trade, counting the wins, the losses and how often each happens. A strategy with positive expectancy makes money if it is repeated enough times. One with zero or negative expectancy does not, however clever its rules look and however many of its trades win.

This lesson gives the formula, works it on two real lists of trades from SPY, and then asks a harder question: with only a few dozen trades, how sure can anyone be that the edge is real? The two lists were chosen because they look opposite. One wins 64% of the time with huge winners. The other wins 79% of the time with small ones.

The formula

It is nothing more than the average of all the trade results, split into two piles so that you can see where it comes from. Gains and losses can be in dollars, in percent of the amount traded, or in multiples of the risk taken on each trade (the R multiples in Risk-reward ratio and R multiples: the math of a trade). The formula is the same in each case.

Two made-up traders show why the split matters.

Trader Win rate Average gain Average loss Expectancy per trade
A 40% $300 $100 0.40 × 300 − 0.60 × 100 = +$60
B 90% $50 $600 0.90 × 50 − 0.10 × 600 = −$15

Trader B is right nine times in ten and loses money. Trader A is wrong most of the time and makes $60 a trade on average. People tend to judge a method by how often it wins, because being right feels good. The market pays on the product of both numbers.

Payoff ratio and the break-even win rate

The payoff ratio is the average gain divided by the average loss. With it, the win rate needed to break even is fixed:

Trader A's payoff ratio is 3, so A breaks even at a 25% win rate and has room to spare at 40%. Trader B's is 0.083, so B needs to win 92.3% of the time and falls short at 90%.

Two real trade lists

Both lists come from rules explained elsewhere in this section. Neither is offered as a rule to follow. They are here because their numbers are real and their shapes differ.

The trend list. The 10-month rule from Moving average trend following: the 10-month rule, tested: hold SPY while its month-end close is above its 10-month average, otherwise hold cash. SPY month-end closes, November 1993 to October 2026, 0.10% cost on every buy and sell, dividends not included. It made 25 trades in 33 years. The last one was still open at the end of the data and is counted at its value then.

The dip list. A short-term rule on daily closes: buy SPY at the close when its 2-day RSI is below 10, and sell at the first close above the 5-day simple average. SPY daily closes, November 18, 2024 to November 17, 2026, the same 0.10% cost, dividends not included. It made 29 trades in two years, also with the last one open.

Measure Trend list (10-month rule) Dip list (RSI 2 rule)
Trades 25 29
Win rate 64.0% 79.3%
Average gain 22.56% 1.23%
Average loss −5.29% −0.78%
Payoff ratio 4.26 1.59
Break-even win rate 19.0% 38.6%
Largest gain 103.5% 2.4%
Largest loss −9.5% −1.6%
Expectancy per trade 12.53% 0.82%

Checking the trend list by hand: 0.64 × 22.56% is 14.44%, and 0.36 × 5.29% is 1.90%. The difference is 12.53% once the unrounded figures are used.

The 10-month rule on SPY, 1993–2026: all 25 trades, best to worst Win rate 64%. A few large gains carry the result. Monthly closes, 0.10% per trade, no dividends.
Every trade of the 10-month rule on SPY, 1993 to 2026, best to worst. Monthly closes, 0.10% per trade, dividends not included.
A buy-the-dip rule on SPY, 2024-11 to 2026-11: all 29 trades, best to worst Win rate 79%. Many small gains and a few larger losses. Daily closes, 0.10% per trade, no dividends.
Every trade of the buy-the-dip rule on SPY, November 2024 to November 2026, best to worst. Daily closes, 0.10% per trade, dividends not included.

The two charts have different vertical scales, and that is the point. The trend list's best trade, January 1995 to August 1998, gained 103.5%, more than every trade of the dip list added together (23.7%). The dip list has nothing like it. Its gains and losses all fit inside a band of a few percent.

Per trade is not per year

An expectancy of 12.53% against 0.82% does not mean the trend rule earned fifteen times as much. The trend rule made about three trades every four years. The dip rule made about fourteen a year. Multiply expectancy by how often it can be collected and the two come much closer: over its own test, the trend rule returned 7.8% a year, and over its much shorter one the dip rule returned 12.6% a year.

Those two annual figures cannot be compared fairly. One covers 33 years with two bear markets. The other covers two years in which SPY itself rose 24.5%. What can be said is that expectancy per trade and the number of trades are separate ingredients, and a strategy needs both.

What costs do to expectancy

Every cost is subtracted from every trade, win or lose. So costs reduce expectancy one for one.

The dip rule pays 0.10% to buy and 0.10% to sell, 0.20% a round trip. With no cost at all its average trade was 1.02%. With the cost it was 0.82%. A fifth of the edge went to trading it. For the trend rule the same 0.20% is taken from an average trade of 12.5% and barely shows.

This is the general pattern. The smaller the average trade, the larger the share that costs take, and the more exactly the cost has to be known. Trading costs in a strategy: what costs and slippage do to a backtest runs the dip rule at five different cost levels; at 0.50% a trade its edge is gone.

How much of it is luck?

Twenty-five trades is not many. One way to see how much weight the number can bear is to take trades away.

Trend list Expectancy per trade
All 25 trades 12.53%
Without the best trade 8.74%
Without the best three trades 5.29%

More than half of the trend rule's expectancy came from three trades in 33 years. Someone who followed the rule but missed those three, by starting late or by giving up during a losing stretch, got a very different strategy.

A second way is resampling. Draw 25 trades at random from the list, allowing repeats, and take their average. Do that 10,000 times. The spread of the averages shows what could have happened with the same kind of trades in a different mix.

Resampled average trade Trend list Dip list
5th percentile 5.24% 0.51%
Median 12.16% 0.82%
95th percentile 21.13% 1.11%

For the trend list the plausible range runs from about 5% to about 21% a trade, a factor of four. The dip list's range is tighter in relative terms, because its trades are more alike. In neither case did a resample come out at or below zero.

That last sentence needs care. Resampling measures the luck in which trades happened to come up. It cannot measure the two risks that matter most:

  • The period. Every trade of the dip list comes from two years in which the market rose. The list does contain the fall of February to April 2025, and the rule got through it. It contains nothing like 2008. Short-term buying of falls is the kind of rule whose worst trades arrive together in a long decline.
  • The search. If a rule was picked because it tested well, its trade list is flattered before any resampling starts. See Overfitting and backtest bias: 4,094 rules tested on SPY.
640 660 680 50-day average Oct Nov Dec

Two frozen snapshots of daily bars: SPY for two years and Apple for one, to late October 2026. Close to close, no costs, and cases at least 20 trading days apart so no two share an outcome. A handful of cases is far too few to judge any signal.

From expectancy to edge

Expectancy is arithmetic on trades that have already happened. An edge is a claim about trades that have not. To get from one to the other, a strategy needs a reason, something about how markets or people behave that would make the pattern continue.

The usual candidates are:

  • Payment for a risk. Stocks have paid more than cash over long periods because they can fall by half. Holding them is a positive-expectancy strategy that is unpleasant to follow.
  • Behaviour. Investors react slowly to news and then too much. Trend rules lean on the first habit and dip-buying rules on the second.
  • Supplying something. A trader who buys when others are forced to sell is paid for providing liquidity, in the way a market maker earns the spread.

A rule with good numbers and no reason behind it is more likely to be a pattern in the noise. A rule with a reason can still stop working once enough people follow it.

One more caution. Positive expectancy says the average is on your side. It says nothing about the path. In 2022 the trend rule lost 9.0% and then 6.4% on two trades in a row, and its value stayed below an earlier peak for 37 months. How much is held on each trade decides whether such a stretch is survivable, which is the subject of Position sizing: how many shares to buy for a set risk.

How Finabase does it

  • Backtest. The Backtest tool reports the pieces of expectancy for the signals you choose on one symbol: the number of trades, how many won and lost, the win rate and the total gain, split into long and short. Dividing the gain by the number of trades gives the average trade in dollars. Two things differ from the lists on this page: every signal trades a fixed $10,000, and no trading cost is charged, so the average trade it shows is before costs.
  • The transactions table under the result lists every trade. Sorting it by gain shows at once whether a result rests on one or two trades, as the trend list does.
  • Strategy. The Strategy tool replays if/then allocation rules over two years. Two years holds very few trades for a slow rule, so its return there is closer to a single outcome than to an expectancy.
  • Chart. The RSI study with a period of 2 shows each day the dip rule would have bought. The link above opens it on SPY. No Finabase tool places these trades or tells you to.

Frequently asked questions

What is a good expectancy?

Any expectancy above zero after realistic costs is workable; how good it is depends on how often it can be collected and how deep the losing stretches run. A rule earning 0.8% a trade fourteen times a year and one earning 12.5% a trade less than once a year can end up in a similar place.

Is a high win rate better?

Not by itself. A high win rate usually comes with small gains and occasional large losses, and a low one with the reverse. The dip list won 79% of the time and the trend list 64%, yet the trend list's average trade was fifteen times larger.

How many trades are needed to trust an expectancy?

More than most backtests have. With 25 to 30 trades the plausible range for the average is wide: for the trend list here it ran from about 5% to about 21%. A few hundred trades across different kinds of market narrow it, and no number of trades protects against a rule that was chosen because it fitted the past.

Can expectancy be negative while the account grows?

Over a short run, yes. A negative-expectancy method can string wins together by luck. The longer it is repeated, the more certainly the average shows up in the account.

Summary

Expectancy is the average trade: win rate times average gain, minus loss rate times average loss. It, not the win rate, decides whether repeating a strategy makes money. Two real SPY trade lists show the two classic shapes: a trend rule with a 64% win rate, large winners and 12.5% a trade, and a dip-buying rule with a 79% win rate, small winners and 0.8% a trade. Costs come straight off the average, so they matter most where the average is small. A list of a few dozen trades leaves the true figure uncertain, and removing the trend rule's three best trades more than halves it. Expectancy turns into an edge only when there is a reason for the pattern to last.

Check your understanding

4 questions on this lesson. Each answer comes with the reason, and nothing is scored.

  1. A rule wins 30% of its trades. Its average gain is $500 and its average loss is $150. What is its expectancy per trade?

    1. −$45: it loses money because it is wrong most of the time
    2. +$45: 0.30 × $500 minus 0.70 × $150
    3. +$350: the gain minus the loss
    Show the answer

    B. +$45: 0.30 × $500 minus 0.70 × $150 Expectancy weights each pile by how often it happens: $150 from the wins minus $105 from the losses. Being wrong 70% of the time does not matter when the gains are more than three times the losses.

  2. Two rules both have positive expectancy: 12.5% per trade on about one trade a year, and 0.8% per trade on about fourteen trades a year. What can be concluded?

    1. The first rule earns about fifteen times as much
    2. Nothing about yearly return until expectancy is combined with how often it is collected
    3. The second rule is safer because its trades are smaller
    Show the answer

    B. Nothing about yearly return until expectancy is combined with how often it is collected Expectancy is per trade. Yearly return depends on the number of trades as well, and risk depends on how the losses cluster, which neither number shows.

  3. Why do trading costs hurt a rule with a 0.8% average trade more than one with a 12.5% average trade?

    1. The cost is subtracted from every trade, so it is a larger share of a small average
    2. Short-term rules are charged higher commissions
    3. Costs only apply to winning trades
    Show the answer

    A. The cost is subtracted from every trade, so it is a larger share of a small average A 0.20% round trip takes about a fifth of a 1.02% average trade and almost nothing from a 12.7% one. The smaller the edge per trade, the more exactly the cost has to be known.

  4. Removing the three best of 25 trades cuts the trend rule’s expectancy from 12.5% to 5.3%. What does that say?

    1. The rule is broken and the three trades should be ignored
    2. The result leans on a few large trades, so the true average is uncertain and missing those trades changes everything
    3. The win rate was calculated wrongly
    Show the answer

    B. The result leans on a few large trades, so the true average is uncertain and missing those trades changes everything Rare large gains are how trend rules make money, so they belong in the result. They also mean that 25 trades pin the average down loosely, and that someone who skipped those trades got a very different outcome.

Exercise

One task to do in Finabase. Nothing is graded or saved.

Open the sample backtest and find the Results table. From the Total column, write down Average win and Average loss, and note the Win rate above. Divide the average win by the average loss to get the payoff ratio, then work out the break-even win rate: 1 ÷ (1 + payoff ratio). Is the sample's win rate above or below its break-even rate, and does that agree with the sign of P&L average?

Open the sample backtest
What you should find

The two always agree: a win rate above break-even goes with a positive P&L average, and one below it with a negative average, however high or low the win rate looks alone. P&L average is the expectancy per trade in dollars. It is before costs and on a fixed $10,000 per signal, so it cannot be set beside the percentages in the lesson.

Sources and further reading

  1. Van K. Tharp, Trade Your Way to Financial Freedom, 2nd ed. (McGraw-Hill, 2007) — expectancy and R multiples
  2. Bradley Efron and Robert J. Tibshirani, An Introduction to the Bootstrap (Chapman & Hall, 1993) — resampling to measure uncertainty
  3. Finabase chart data — SPY monthly bars, 1993 to October 2026, and SPY daily bars, November 18, 2024 to November 17, 2026; rules and results computed by Finabase