Quant from Scratch by QuantWright

Backtesting Essentials · Lesson 6

Hypothesis tests

Luck or edge? Ask how often pure luck would do as well as your strategy did.

Know the basics? Read the lesson notes

Is this a coin?

A trading strategy is a rule that decides when to trade. Here are six made-up strategies, each with its record: how many of its trades won, out of how many it made. The share it won is its win rate. In all six, a win and a loss are the same size, so only the number of wins matters.

A strategy with no edge (no real reason to win more often than it loses) is like a fair coin. It wins half its trades on average, but any one record lands a bit above or below half. For each record: could a coin have done this, or would it be hard for a coin?

A7 wins of 10 tradeswin rate 70%
B540 wins of 1,000 tradeswin rate 54%
C136 wins of 250 tradeswin rate 54.4%
D14 wins of 20 tradeswin rate 70%
E60 wins of 100 tradeswin rate 60%
F145 wins of 250 tradeswin rate 58%

Keep your answers. Near the end of the lesson you'll check all six.

Start by assuming it's a coin

Take strategy C: 136 wins of 250 trades, a win rate of 54.4%. A coin wins 50% on average, so 54.4% looks better. But a coin's record also wanders above and below half.

So start from the dull explanation: suppose C has no edge and is just a coin. A coin is a case where we can work out exactly what luck does; "it has some edge" doesn't say how much, so it gives no single number. We test luck first. Then ask how often a coin would do this well. Find out by running a coin: 250 trades, each a 50–50 win or loss. Run it five times.

A no-edge coin, 250 trades a run (simulated)

Each block is one run, placed at the number of trades it won; the black block is this run. The line marks strategy C's 136.

Runs0
This run won–
Runs with 136 wins or more–

A guess before 10,000 runs

Next, the same coin runs 10,000 times, 250 trades each. How many of the 10,000 runs will win 136 trades or more, as many as strategy C did?

Keep your guess in mind. On the next screen the coin runs all 10,000 times.

Run it 10,000 times

Each run is one no-edge strategy that could have happened. Run all 10,000 and watch where they pile up. Runs that won 136 or more are coloured.

10,000 runs of a no-edge coin, 250 trades each (simulated)

The height of each bar is how many runs won that many trades.

Runs0
Won 136 or more–
Share of all runs–

That share has a name: the p-value. It answers one question: if the strategy had no edge, how often would luck alone do at least this well?

About 1 time in 11 is not rare. A coin often does what strategy C did, so C's record is weak evidence of an edge at best. It isn't proof that C has no edge either: this record simply can't tell the two apart.

Where does rare begin?

People call a result rare when fewer than 5 runs in 100 reach it, a convention. Drag the marker along the same 10,000 runs: the further right you go, the fewer runs reach it. Find the first number of wins that fewer than 5 runs in 100 reach.

The same 10,000 no-edge runs: how many reach the marker?

Coloured: the runs that won at least as many trades as the marker. Drag on the chart or use the slider.

Runs that get there–
The p-value–

At 139 wins (a win rate of 55.6%), 467 of the 10,000 runs get there: 4.67%, under 5 in 100. At 138, 605 runs still do: 6.05%.

A result with a p-value under 5% is called statistically significant: luck alone does that well less than 5 times in 100. This is the 5% line. 5 in 100 is 1 in 20.

Keep one thing in mind. The line is fair for one strategy, tested once. What happens when you try many is the next lesson.

For the preciseCounting every possible sequence of 250 coin flips exactly, instead of running 10,000 of them, a coin wins 139 or more with chance 0.0438 (4.38%) and 138 or more with 0.0568. The 10,000 runs give 4.67% and 6.05%: a share from 10,000 runs wobbles by about 0.2 percentage points from one set of runs to the next. Both put the line at 139.

What a p-value doesn't say

Picture one strategy, tested once. Its test gives a p-value of 3%. What does that tell you?

The test starts by assuming no edge, so it can't give the chance of an edge. It says how often a coin would do this well: about 3 times in 100.
That turns it around. The 3% assumes the result is luck and asks how often luck gets this far. It can't tell you how likely luck was in the first place.
The p-value assumes no edge and counts how often luck reaches the result. It never gives the chance that the strategy works.
So "significant" means rare for a coin, not proven.

Back to your six records

Now the same test on all six. For each record, the coin runs 10,000 times with that record's number of trades. Pick a record to see where its luck lands and its p-value. Look at all six.

10,000 no-edge runs for each record's number of trades (simulated)

The axis now shows win rate (wins ÷ trades), so different trade counts line up. Bars: how many runs landed there. Coloured: the runs at least as good as the record.

Your answer–
The p-value–
The test says–

A and D both won 70%, and a coin still matches them: A about 17 times in 100, D about 5.4 times in 100, so D just misses the line. Over 10 or 20 trades luck has lots of room. B won only 54%, yet over 1,000 trades a coin rarely strays that far from half: about 0.7 times in 100. The fewer the trades, the wider luck spreads, and the further a win rate has to be from 50% before it is rare for a coin.

Theory

The null hypothesis and the p-value

Every test on this page followed one recipe, called a hypothesis test. Start from the null hypothesis: the dull explanation, here "no edge, just a coin". See what results it produces, then where yours falls. The p-value is the share of those results at least as good as yours. If it is under a line set before you look, the significance level α (alpha, usually 5%), the result is statistically significant. The line comes first because a line picked after seeing the result can be moved to suit it.

p-value = (no-edge runs at least as good as yours) ÷ (all no-edge runs)
significant when p-value < α
no-edge runs
results the null hypothesis produces: here, a coin with the same number of trades
α
the significance level, chosen before the test: usually 0.05, the 5% line

This counts one side only, a one-sided test, because the question is "does it beat a coin?". A two-sided test asks "is it different from a coin, better or worse?" and also counts runs as far from half on the losing side. Because the bars are the same on both sides, that about doubles the p-value. A p-value is not the chance the strategy works, nor the chance the result was luck: it is worked out by assuming luck.

Worked example: strategy C

945 of the 10,000 runs won 136 or more: p = 945 ÷ 10,000 = 0.0945, or 9.45%. That is above 5%: not significant.

Two-sided: 136 is 11 wins above the coin's 125, so also count runs 11 or more below it, at 114 wins or fewer. 1,874 runs land on one side or the other: 18.74%, about double.

Holds when
  • the no-edge runs match the real test: the same number of trades, the same win and loss sizes;
  • one strategy is tested once, and the test and the line are chosen before you look;
  • trades are independent: one trade's result doesn't change the next one's.
Breaks when

You try many versions and keep the best. Each try is another chance for luck to pass, so the 5% line stops meaning 5% (lesson B7, The best of many).

A different test: someone ran 2,000 no-edge versions of it, and 34 did at least as well as the real result. What is the p-value? Type a percentage.

34 ÷ 2,000 = 0.017, or 1.7%. That is under 5%: significant, for one test.
Divide the runs at least as good by all the runs: 34 ÷ 2,000 = 0.017, or 1.7%. That is under 5%: significant, for one test.
Theory

A shortcut: the z-test for a win rate

For a win rate there is a shortcut. A coin's win rates pile into the bell curve (lesson A5), centred on 0.5. Its width is the standard error from the last lesson, √(0.25 ÷ n) for a coin. Measure how many standard errors your win rate sits above 0.5 (its z-score), then read the chance off the bell's tail, its thin end past that z-score: that is the z-test.

For the precise: wins and win rateThe bars on "Run it 10,000 times" count wins; the formula measures the win rate, wins ÷ n. For 250 trades the pile of bars has a spread (one standard deviation) of about 7.9 wins (√250 × 0.5 = 7.91; the 10,000 runs measured 7.96), and 7.91 ÷ 250 = 0.0316: the same number the formula gives, √(0.25 ÷ 250) = 0.0316.
z = (p̂ − 0.5) ÷ √(0.25 ÷ n)
p̂
"p-hat": your win rate as a decimal (54.4% is 0.544)
0.5
a coin's average win rate
0.25
0.5 × 0.5: a coin's chance to win times its chance to lose (the p × (1 − p) in the previous lesson's standard error, with p = 0.5)
n
the number of trades
z
how many standard errors the win rate sits above 0.5

On one side, 5 in 100 of the bell lies past z = 1.645, so that is the one-sided 5% line. A two-sided test splits its 5 in 100 into 2.5 on each side, and 2.5 in 100 lies past 1.96, so its line is at 1.96. Drag to read the tail for any z:

The bell's tail past z

Coloured: the share of the bell past z, on one side.

Past z, one side–
Both sides–
Worked example: strategy E

60 wins of 100: p̂ = 0.60. Standard error: √(0.25 ÷ 100) = √0.0025 = 0.05. z = (0.60 − 0.50) ÷ 0.05 = 2. Past 1.645: significant. The bell says about 2.3 in 100; the runs counted 274 of 10,000, or 2.74 in 100. Close: the bell is a smooth stand-in for the bars.

Strategy C, 136 wins of 250: p̂ = 0.544, standard error 0.0316, z = (0.544 − 0.500) ÷ 0.0316 = 1.39. Short of 1.645: not significant. The bell says about 8.2 in 100; the runs counted 9.45: the bell reads a little low here because the bars are whole steps and the smooth bell misses part of the step it starts on (more below).

Holds when
  • every trade wins or loses the same amount, so only the win rate matters;
  • there are enough trades: a few dozen or more, and more still when the result sits close to the line;
  • one strategy is tested once.
Breaks when

Trades are few. For strategy D, 14 of 20, z = 1.79 is past 1.645, yet the runs counted 542 of 10,000, or 5.42 in 100: the wrong side of the line, because with few trades the bars are chunky and the smooth bell misses them. Trades of different sizes need a test of the average trade instead (lesson C4, Bootstrap and permutation tests).

A rule won 1,325 of 2,500 trades (53%), every win and loss the same size. What is its z-score?

√(0.25 ÷ 2,500) = √0.0001 = 0.01. z = (0.53 − 0.50) ÷ 0.01 = 3: past 1.645, and luck alone gets that far about 1 time in 1,000.
Standard error: √(0.25 ÷ 2,500) = √0.0001 = 0.01. Then z = (0.53 − 0.50) ÷ 0.01 = 3: past 1.645, and luck alone gets that far about 1 time in 1,000.

What this means for your backtest

A backtest runs a trading rule over past prices to see what it would have done. Three habits follow. Turn them over one at a time.

  1. Start from "it's a coin".

    Before you believe a backtest's win rate, ask how often a no-edge strategy with the same number of trades would do at least as well. That share is the p-value. The coin fits rules whose wins and losses are the same size; a rule that wins 3 for every 1 it loses needs a different no-edge comparison.

Practice 1 of 3

A friend's luck machine

The situationA friend chose one rule and one test in advance and ran it once. Then he built his own luck machine: 1,000 no-edge runs with the same number of trades and the same win and loss sizes. 300 of the 1,000 runs did at least as well as his rule.

What is the p-value, and is the result significant?

Check the division: 300 ÷ 1,000 = 0.3, which is 30%, not 0.3%. Luck does this well about 30 times in 100.
300 ÷ 1,000 = 0.3, or 30%: a coin does this well about 30 times in 100. Far above 5%, so not significant.
The p-value is the share of no-edge runs at least as good: 300 ÷ 1,000 = 30%. The other 70% is the runs that did worse, not a chance of an edge.
Not significant isn't proof of no edge either: this record can't tell edge from luck.
Practice 2 of 3

Your own test

The situationYou chose one rule and one test in advance, then ran it once: 224 wins of 400 trades (56%). Every win and every loss was the same size.

What is its z-score? Type a number.

Hint: the standard error is √(0.25 ÷ 400). Then divide (0.56 − 0.50) by it.

√(0.25 ÷ 400) = √0.000625 = 0.025. z = 0.06 ÷ 0.025 = 2.4. Past 1.645, so it is significant at the 5% line: a coin gets that far about 1 time in 100.
Standard error: √(0.25 ÷ 400) = √0.000625 = 0.025. The win rate sits 0.56 − 0.50 = 0.06 above a coin's, so z = 0.06 ÷ 0.025 = 2.4. Past 1.645: significant at the 5% line.
Practice 3 of 3

Two sellers

The situationTwo sellers each show one rule, tested once. Seller 1's won 60% of 50 trades. Seller 2's won 52% of 10,000 trades. In both, every win and loss is the same size.

Whose record would be harder for a coin to match?

A higher win rate isn't the test. Seller 1: √(0.25 ÷ 50) ≈ 0.071, so z = 0.10 ÷ 0.071 ≈ 1.4, short of 1.645. Seller 2: √(0.25 ÷ 10,000) = 0.005, so z = 0.02 ÷ 0.005 = 4.
Each needs its own test. Seller 1: z = 0.10 ÷ √(0.25 ÷ 50) ≈ 1.4, which a coin passes about 1 time in 10. Seller 2: z = 0.02 ÷ √(0.25 ÷ 10,000) = 4, far rarer.
Seller 2: √(0.25 ÷ 10,000) = 0.005, so z = 0.02 ÷ 0.005 = 4, which a coin almost never reaches. Seller 1: √(0.25 ÷ 50) ≈ 0.071, so z ≈ 1.4, short of 1.645.
Hard for a coin isn't proof of an edge, and a small edge can vanish once the cost of trading is paid (lesson A16, Costs).
✓

Lesson done

To judge a result, start by assuming it is luck, and ask how often luck alone would do at least this well. That share is the p-value. Under 5 in 100 is called statistically significant: rare for luck, not proof of an edge, and fair only for one test set up before you looked.

Key ideas

Edge
a real reason to win more often than a coin; with no edge (and wins and losses of equal size), a strategy wins half its trades on average
Null hypothesis
the dull explanation a test starts from: no edge, just a coin
Hypothesis test
see what results the null hypothesis produces, then where yours falls
p-value
the share of no-edge results at least as good as yours. Not the chance the strategy works.
Statistically significant
a p-value under the significance level α, usually 5% (the 5% line). Fair for one test.
One-sided, two-sided
"does it beat a coin?" counts one side; "is it different from a coin?" counts both
Standard error
how far luck typically moves a measured win rate: √(0.25 ÷ n) for a coin
z-test
a win rate's distance from 0.5 in standard errors, read off the bell

Formulas

p-value = (no-edge runs at least as good as yours) ÷ (all no-edge runs)

z = (p̂ − 0.5) ÷ √(0.25 ÷ n)

The 5% line: p-value under 0.05, or z past 1.645 one-sided (1.96 two-sided).

Lesson notes

A hypothesis test asks how often luck alone would do at least as well as your result. Start by assuming the strategy (a rule that decides when to trade) has no edge, meaning no real reason to win more often than it loses, so it behaves like a fair coin. Run that coin many times and count how often it matches your result: that share is the p-value. A p-value under 5% is called statistically significant: rare for a coin, not proof of an edge, and fair only for one test set up before you looked.

Is this a coin?

The lesson shows six made-up strategies, each with a record: how many of its trades won, out of how many it made. The share won is its win rate. In all six a win and a loss are the same size, so only the number of wins matters. The records: A won 7 of 10 trades (70%), B 540 of 1,000 (54%), C 136 of 250 (54.4%), D 14 of 20 (70%), E 60 of 100 (60%) and F 145 of 250 (58%). A coin wins half its trades on average, but any one record lands a bit above or below half.

Start by assuming it's a coin

Take C: 136 wins of 250 trades, a win rate of 54.4%, which looks better than a coin's 50%. Test the dull explanation first, the null hypothesis: C has no edge and is just a coin. A coin is a case where we can work out exactly what luck does; "it has some edge" gives no single number. Then ask how often a coin would do this well. In 250 trades a coin averages 125 wins.

Run the coin 10,000 times

In the lesson's simulation, a run is one coin's 250 trades, each a 50–50 win or loss. Of 10,000 runs, 945 won 136 or more, as many as C did: 945 ÷ 10,000 = 9.45%, about 1 run in 11 (10,000 ÷ 945 ≈ 10.6). That share is the p-value. About 1 time in 11 is not rare, so C's record is weak evidence of an edge at best. It isn't proof of no edge either: this record can't tell the two apart.

Where rare begins

People call a result rare when fewer than 5 runs in 100 reach it. That is a convention (1 in 20). In the same 10,000 runs of 250 trades, 467 runs won 139 or more (a win rate of 139 ÷ 250 = 55.6%): 4.67%, under 5 in 100. At 138 wins, 605 runs still got there: 6.05%. So 139 is the first number of wins that fewer than 5 in 100 runs reach. A result with a p-value under 5% is statistically significant; this is the 5% line. A share from 10,000 runs wobbles by about 0.2 percentage points from one set of runs to the next. The line is fair for one strategy, tested once, with the test and the line chosen before you look, because a line picked after seeing the result can be moved to suit it.

What a p-value doesn't say

Picture one strategy, tested once, whose test gives a p-value of 3%. A coin would do this well about 3 times in 100. It does not mean a 97% chance that the strategy has an edge, because the test starts by assuming no edge and so can't give the chance of one. Nor does it mean a 3% chance that the result was luck: the 3% assumes luck and asks how often luck gets this far. So "significant" means rare for a coin, not proven.

The six records

For each record, a coin runs 10,000 times with that record's number of trades. The runs that did at least as well as the record: A 1,703 (17.03%), B 69 (0.69%), C 945 (9.45%), D 542 (5.42%), E 274 (2.74%) and F 72 (0.72%). Under 5%: B, E and F. A and D both won 70%, and a coin still matches them: A about 17 times in 100, D about 5.4, so D just misses the line. B won only 54%, yet over 1,000 trades a coin rarely strays that far from half: about 0.7 times in 100. The fewer the trades, the wider luck spreads, and the further a win rate has to be from 50% before it is rare for a coin.

Formula: the null hypothesis and the p-value

Every test above followed one recipe, a hypothesis test: start from the null hypothesis, see what results it produces, then see where yours falls. If the p-value is under a line set before you look, the significance level α (alpha, usually 5%), the result is statistically significant.

p-value = (no-edge runs at least as good as yours) ÷ (all no-edge runs)
significant when p-value < α
no-edge runs
results the null hypothesis produces: here, a coin with the same number of trades
α
the significance level, chosen before the test: usually 0.05, the 5% line

This counts one side only, a one-sided test, because the question is "does it beat a coin?". A two-sided test asks "is it different from a coin, better or worse?" and also counts runs as far from half on the losing side. Because a coin's runs land as often that far below half as that far above it, that about doubles the p-value. A p-value is not the chance the strategy works, nor the chance the result was luck: it is worked out by assuming luck.

Worked example: strategy C

945 of the 10,000 runs won 136 or more: p = 945 ÷ 10,000 = 0.0945, or 9.45%. That is above 5%: not significant.

Two-sided: 136 is 11 wins above the coin's 125, so also count runs 11 or more below it, at 114 wins or fewer. 1,874 runs land on one side or the other: 18.74%, about double.

Holds whenBreaks when

You try many versions and keep the best. Each try is another chance for luck to pass, so the 5% line stops meaning 5% (lesson B7, The best of many).

Formula: the z-test for a win rate

For a win rate there is a shortcut. A coin's win rates pile into the bell curve (lesson A5), centred on 0.5. Its width is the standard error, how far luck typically moves a measured win rate: √(0.25 ÷ n) for a coin. Measure how many standard errors your win rate sits above 0.5 (its z-score), then read the chance off the bell's tail, its thin end past that z-score: that is the z-test. For 250 trades luck typically moves a coin's wins by about 7.9 either way (√250 × 0.5 = 7.91, one standard error in wins), and as a win rate 7.91 ÷ 250 = 0.0316, the same number the formula gives: √(0.25 ÷ 250) = 0.0316.

z = (p̂ − 0.5) ÷ √(0.25 ÷ n)
p̂
"p-hat": your win rate as a decimal (54.4% is 0.544)
0.5
a coin's average win rate
0.25
0.5 × 0.5: a coin's chance to win times its chance to lose
n
the number of trades
z
how many standard errors the win rate sits above 0.5

On one side, 5 in 100 of the bell lies past z = 1.645, so that is the one-sided 5% line. A two-sided test splits its 5 in 100 into 2.5 on each side, and 2.5 in 100 lies past 1.96, so its line is at 1.96.

Worked example: strategy E

60 wins of 100: p̂ = 0.60. Standard error: √(0.25 ÷ 100) = √0.0025 = 0.05. z = (0.60 − 0.50) ÷ 0.05 = 2. Past 1.645: significant. Read from the bell curve at z = 2, the tail is 2.28, about 2.3 in 100; the runs counted 274 of 10,000, or 2.74 in 100. Close: the bell is a smooth stand-in for the runs' whole-number counts.

Strategy C, 136 wins of 250: p̂ = 0.544, standard error 0.0316, z = (0.544 − 0.500) ÷ 0.0316 = 1.39. Short of 1.645: not significant. Read from the bell curve at z = 1.39, the tail is 8.21, about 8.2 in 100; the runs counted 9.45: the bell reads a little low here because wins come in whole numbers and the smooth bell misses part of the step it starts on.

Holds whenBreaks when

Trades are few. For strategy D, 14 of 20, z = 1.79 is past 1.645, yet the runs counted 542 of 10,000, or 5.42 in 100: the wrong side of the line, because with few trades the possible win counts are far apart and the smooth bell misses them. Trades of different sizes need a test of the average trade instead (lesson C4, Bootstrap and permutation tests).

One more worked example

Made-up round numbers

Two strategies, both with wins and losses of the same size, each tested once with the test chosen in advance. Both won 55% of their trades: X won 55 of 100, Y won 220 of 400 (220 ÷ 400 = 0.55).

X: standard error = √(0.25 ÷ 100) = √0.0025 = 0.05. z = (0.55 − 0.50) ÷ 0.05 = 1. That is short of 1.645: not significant.

Y: standard error = √(0.25 ÷ 400) = √0.000625 = 0.025. z = 0.05 ÷ 0.025 = 2. That is past 1.645, so it is significant at the one-sided 5% line, and the bell's tail past 2 is 2.28 in 100.

The win rate is the same, but with four times the trades the standard error halves (√4 = 2) and z doubles. A 55% win rate is everyday luck over 100 trades and rare for a coin over 400.

Common mistakes

Check yourself

  1. A coin is run 400 times with the same number of trades as a strategy. 12 of the 400 runs do at least as well as the strategy. What is the p-value, and is it significant?
    Answer

    12 ÷ 400 = 0.03, or 3%. That is under 5%, so it is significant, for one test chosen before looking. It means a coin does this well about 3 times in 100, not that there is a 97% chance of an edge.

  2. A strategy won 58 of 100 trades, every win and loss the same size. What is its z-score, and is it past the one-sided 5% line?
    Answer

    p̂ = 0.58. Standard error: √(0.25 ÷ 100) = 0.05. z = (0.58 − 0.50) ÷ 0.05 = 1.6. That is just short of 1.645, so it is not significant at the one-sided 5% line.

  3. From the six records: A won 70% of 10 trades and B won 54% of 1,000. Which is harder for a coin to match, and why?
    Answer

    B. A coin matched A in 17.03% of runs and B in 0.69%. The fewer the trades, the wider luck spreads, so a win rate must sit further from 50% to be rare.

  4. A friend tries 20 versions of a rule and shows the best one, with a p-value of 4%. Is that a fair 5% test?
    Answer

    No. The 5% line is fair for one strategy, tested once, with the test chosen in advance. Each of the 20 tries is another chance for luck to pass (lesson B7 shows how much 20 tries raise the chance).

Try it yourself

Run the simulation. Every run and number in this lesson comes from one Python script with a fixed random seed (below). Change the number of trades or the record and see what moves.

Build a luck machine in a spreadsheet. =BINOM.INV(250, 0.5, RAND()) gives one coin's wins out of 250. Fill it down 10,000 rows, then =COUNTIF(A1:A10000, ">=136")/10000 is strategy C's p-value from your own runs. For the exact one-sided p-value, =1-BINOM.DIST(135, 250, 0.5, TRUE): the chance of 136 or more.

About QuantWright

QuantWright, which publishes this course, sells backtesting software. When nothing in a result shows it beats luck, its result card can say so in those words: "Insufficient evidence — nothing here shows it beats luck". Its Honesty Score (0–100) is built from statistics of the same family as this lesson's test, applied to the Sharpe ratio rather than the win rate (the Probabilistic and Deflated Sharpe, the second corrected for how many versions were tried), together with sample size and skew. It stays at grade C or below until a held-out test has run. quantwright.com

The code behind every number (Python, seed 2026110906)
Loading…

Going further: a real edge can fail the test

Not significant doesn't mean no edge. Take a strategy that really does win 55% of its trades. Over 250 trades its result still wobbles, and it reaches the 5% line of 139 wins only 45% of the time: more often than not, the test can't tell it from a coin. Over 100 trades the line is 59 wins and the real strategy reaches it 24% of the time; over 1,000 trades the line is 527 (52.7%) and it reaches it 93% of the time. The chance that a test spots an edge that is really there is called the test's power. Small edges need many trades.

For the precisePower = P(X ≥ k*), X ~ binomial(n, 0.55), with k* the smallest k such that P(Y ≥ k) < 0.05 for Y ~ binomial(n, ½). n = 100: k* = 59, power 24.1%; n = 250: k* = 139, 45.0%; n = 1,000: k* = 527, 93.2%. Exact one-sided p-values of the six records: A 17.19%, B 0.62%, C 9.2%, D 5.77%, E 2.84%, F 0.67% (the 10,000 runs: 17.03, 0.69, 9.45, 5.42, 2.74, 0.72). Their z-scores: 1.26, 2.53, 1.39, 1.79, 2.00, 2.53. Bell (z-test) one-sided p-values: A 10.3%, B 0.57%, C 8.2%, D 3.7%, E 2.3%, F 0.57%; with 10 or 20 trades the bell is too rough to settle a case close to the line.

Honest notes

Where this comes from