Lesson 96 of 120 · Advanced · 14 min read
Sample size: how much data before a number means anything
Try it: Test a rule yourselfFree, no account needed.
What you will be able to do
- Compute a standard error from a dispersion and a count, and quote it beside every mean
- Derive the number of trades required for a given edge to sit clear of zero
- Correct a raw trade count into an effective count of independent observations
- Compute a minimum detectable effect so a null result can be interpreted
- Say plainly when a question needs more calendar time than is available, and name the number of years
Read these first
- Modelling costs in Backtesting, statistics, costs and validation
- Out of sample and walk forward in Backtesting, statistics, costs and validation
Trading edges are small numbers sitting inside very large ones. That single fact determines how much data you need before a result means anything, and the answer is almost always far more than people have. This lesson replaces the intuition that a hundred trades is a lot with an arithmetic you can run in a minute, and with the uncomfortable conclusion that some questions cannot be answered in a human timeframe at all.
The ratio that governs everything
A typical edge, expressed per trade, might be on the order of a few tens of basis points. The variation around it - the standard deviation of individual trade outcomes - is routinely ten to fifty times larger. You are trying to detect a small mean inside a wide distribution, and every question about sample size is a consequence of that ratio.
This is not like measuring something in a laboratory where the measurement error is small relative to the quantity. It is closer to determining whether a coin is very slightly biased. Nobody would claim to detect a fifty-one percent coin from twenty flips, and yet the equivalent claim is made about trading rules constantly, usually with the same twenty observations.
It also explains why so much of trading research feels like it should be easy and is not. In most fields, if an effect is real you can see it in a scatter plot. Here you cannot. A genuine edge and no edge at all produce plots that look identical to the eye, because the difference between them is a slight shift in the centre of a very wide cloud. Visual inspection, which is a reliable tool almost everywhere else, is close to useless for this specific task, and any workflow that relies on it will keep confirming whatever the person already believed.
The useful reframe is to stop asking whether a result is good and start asking what range of true values is consistent with it. A mean of thirty basis points from forty trades is consistent with a true edge of a hundred and equally consistent with a true edge of minus forty. That range is the finding. Reporting only the point estimate discards the part of the answer that determines whether it is worth acting on.
Standard error, in one line
The tool is one formula and it is worth memorising: the standard error of the mean equals the standard deviation divided by the square root of the number of observations.
That is the whole apparatus. If your per-trade outcomes have a standard deviation of 200 basis points and you have 100 trades, the standard error of your average is 200 divided by 10, which is 20 basis points. Your measured average is uncertain by roughly that much in either direction, and a rough two-standard-error band spans about 80 basis points from end to end.
Two consequences follow immediately and both are unwelcome. First, the square root means precision improves painfully slowly. Four times the data halves the error bar. A hundred times the data gives you one tenth. There is no way around this and no clever technique that removes it. Second, the standard deviation is a property of the instrument and the holding period, not something you can reduce by being careful. You can reduce it by trading smaller or by hedging, but only by reducing the edge in the same proportion, which leaves the ratio unchanged.
Quote the error bar or do not quote the mean
How many trades before a number means anything
Rearrange the formula and you get a planning tool. If you want your standard error to be some fraction of your expected edge, the required number of observations is the squared ratio of standard deviation to edge, multiplied by the square of the number of standard errors you want.
Work an example. Suppose you expect an edge of 20 basis points per trade and the per-trade standard deviation is 200 basis points, a ratio of 10. To have the edge sit two standard errors above zero you need the standard error to be 10 basis points, which requires 400 trades. To have it sit three standard errors above zero, you need 900.
Now vary the edge and watch what happens. Halve the expected edge to 10 basis points and the requirement quadruples to 1,600 trades for the two-standard-error case. The relationship is quadratic in the ratio, which is why small edges are not slightly harder to validate than large ones but dramatically harder. An edge of three basis points against the same dispersion would need tens of thousands of trades.
Run this before you build, not after
The arithmetic above takes under a minute and it is far more useful before the work than after it. Estimate the dispersion from the instrument and holding period. Estimate the edge you would need to clear costs. Compute the trade count. Then ask how long your rule takes to generate that many trades. If the answer is decades, you have learned something decisive at zero cost: this particular question is not answerable with this particular design, and you should change the design rather than proceed and hope.
Counting what actually counts
The formula assumes independent observations. Most trade counts are not counts of independent observations, and the discrepancy is usually large.
- Simultaneous positions in correlated names. Holding thirty technology stocks on the same day is much closer to one observation of technology than to thirty observations.
- Overlapping holding periods. If positions last ten days and you open one daily, each day's outcome shares nine days of market movement with its neighbours.
- Repeated trades in one instrument. Two hundred trades in a single name across two years is a study of that name, with all of its idiosyncratic behaviour baked in.
- Common exposure to a market factor. If every trade is long, then every trade shares the market's direction, and the effective sample is closer to the number of distinct market episodes.
The practical rule of thumb, and lesson nine develops it properly, is to count the number of distinct time periods in which your positions were genuinely independent, rather than the number of rows in the trade log. That number is frequently five to twenty times smaller. Since the requirement scales with the square of the signal-to-noise ratio and the error scales with the square root of the count, an overcount of ten in the sample size means your true error bar is more than three times wider than the one you computed.
A concrete version of the check: group trades by day, average within each day, and compute the standard error across days instead of across trades. That single change is crude and it moves most results in the right direction immediately.
Why the overcount is the default
Nobody sets out to inflate a sample. The overcount happens because the trade log is the object that exists, and its row count is the number a person naturally reaches for. Nothing in the log records which rows share a market episode, which share a sector move, or which overlap in time, so the information needed to correct the count is simply absent from the artefact being counted. The correction has to be added deliberately, from knowledge of how the rule generates positions, and if nobody adds it the default is always the flattering number. Build the grouping into the reporting code once, so that every result arrives with the corrected count already attached rather than depending on somebody remembering.
Power, and the smallest effect you could have detected
There is a second question hiding behind the first. Not just how precise is my estimate, but: if a real effect of a given size existed, would this test have found it?
That is statistical power, and the version of it that is most useful in practice is the minimum detectable effect: the smallest true edge that your sample size would reliably have revealed. Compute it before running the test and you learn what the test is capable of. Compute it after a null result and you learn what the null result means.
This second use is important and widely neglected. A test that finds nothing has two possible interpretations: there is nothing there, or there was something there and the test was too small to see it. The minimum detectable effect distinguishes them. If the smallest effect you could have detected is a hundred basis points and the effect you were hunting is plausibly twenty, then finding nothing tells you nothing at all, and reporting the rule as rejected is wrong.
Underpowered tests are worse than no test
An underpowered test does not merely fail to find real effects. When it does produce a significant result, that result is systematically exaggerated, because only an unusually large sample fluctuation could have cleared the bar. So a small study that finds something reports an effect far bigger than the truth, and a small study that finds nothing gets treated as evidence of absence. Both errors push in expensive directions, which is why computing power in advance is not bureaucracy.
Path statistics need far more data than means
Everything above concerns the mean. Statistics describing the path - maximum drawdown, longest losing streak, worst month - are far less stable than the mean, and they are routinely quoted from samples that could not support a mean, let alone an extreme.
The reason is that an extreme is determined by a single event in the sample. The maximum drawdown of a ten-year backtest is one number produced by one episode. Change the sample slightly and it changes a lot. It is not an estimate of anything with a stable value; it is a realisation of a highly variable quantity from a sample of one.
The practical consequence is a specific and dangerous error: sizing a position so that the historical maximum drawdown would have been survivable. The future maximum drawdown of a strategy with a real edge is, more often than not, worse than its historical one, simply because you have now sampled more time. Treat the observed worst case as a lower bound on the plausible worst case, never as a limit.
The worst you have seen is not the worst there is
The constraint you cannot engineer around
Some sample sizes cannot be obtained. This deserves stating plainly rather than being worked around, because working around it is where most self-deception enters.
A rule that trades ten times a year and needs four hundred independent observations needs forty years. That is not a research problem, it is a calendar problem, and no amount of effort shortens it. There are only a handful of honest responses. Redesign the rule to trade more often, if the mechanism permits. Apply it across many instruments so that observations accumulate in parallel, if they are genuinely independent. Accept a much weaker standard of evidence and size the position accordingly. Or leave it alone.
What is not honest is to reduce the required sample by lowering the bar after seeing the result, to count correlated observations as independent in order to reach the number, or to report a result from forty trades in the same language you would use for four thousand. The constraint is real and saying so out loud is more useful than any technique, because it redirects effort towards the questions that can actually be settled.
Working it through
All three rows assume a per-trade standard deviation of 250 basis points, and ask how many independent trades are needed for the measured mean to sit two standard errors above zero.
- Edge of 50 basis points. Ratio of dispersion to edge is 5. Required trades about 100. At 200 trades a year this is settled in six months.
- Edge of 20 basis points. Ratio is 12.5. Required trades about 625. At the same rate this takes just over three years.
- Edge of 8 basis points. Ratio is 31. Required trades about 3,900. At the same rate this takes nineteen years.
Now apply the independence correction. Suppose the rule holds for five days and opens positions daily, so consecutive trades overlap by four fifths. Grouping by non-overlapping windows cuts the effective count by roughly five, which multiplies every duration above by five. The twenty basis point case moves from three years to fifteen.
The reading is not that small edges are worthless. It is that the evidence standard has to match what the design can deliver. A rule with a fifty basis point edge can be validated properly and should be. A rule with an eight basis point edge, at that dispersion, cannot be validated within a career, so if you trade it you are trading on the mechanism and the cost arithmetic rather than on statistical evidence, and you should size it as such and say so.
Where this goes wrong in practice
- Quoting a mean with no standard error. The point estimate alone cannot distinguish a strong result from noise.
- Counting rows in the trade log as independent observations. Overlap and shared exposure routinely shrink the effective count several-fold.
- Believing a hundred trades is a large sample. For a typical edge-to-dispersion ratio it is well short of settling anything.
- Interpreting a null result as evidence of absence without computing what the test could have detected.
- Sizing to the historical maximum drawdown. That number came from one episode and is a lower bound, not a limit.
- Adding data by lengthening history rather than adding independent events. More calendar time in one regime adds little.
- Trusting an unusually large result from a small sample. Small samples that clear a bar do so by overstating the effect.
- Computing the required sample size after the test. Done afterwards it becomes a justification rather than a design constraint.
What to do with this
- Compute the required sample size before building from your expected edge and the instrument's dispersion, and check it against how fast the rule generates trades.
- Report every mean with its standard error and refuse to state a conclusion when the mean is inside one.
- Estimate the effective sample size by grouping overlapping and correlated trades, and use that count in the formula.
- Compute the minimum detectable effect and state it alongside any null result so the result can be interpreted.
- Treat path statistics as descriptions of the sample rather than as forecasts, and size for something worse.
- Say plainly when a question needs more time than you have, name the number of years, and choose a different question rather than a weaker standard.
Examples and common mistakes
Worked example
| Expected edge | Dispersion to edge ratio | Trades required | At 200 trades a year |
|---|---|---|---|
| 50 bp | 5 | about 100 | 6 months |
| 20 bp | 12.5 | about 625 | just over 3 years |
| 8 bp | 31 | about 3,900 | 19 years |
The requirement grows with the square of the dispersion-to-edge ratio, so small edges are not slightly harder to validate but dramatically harder. Now apply the independence correction: if the rule holds five days and opens daily, consecutive trades overlap by four fifths, cutting the effective count by roughly five and multiplying every duration above by five. The 20 basis point case moves from three years to fifteen. The reading is not that small edges are worthless, but that the evidence standard has to match what the design can deliver.
How this goes wrong in practice
- Quoting a mean with no standard error beside it, which is a number that happened rather than a measurement
- Counting rows in the trade log as independent observations
- Believing a hundred trades is a large sample for a typical edge-to-dispersion ratio
- Interpreting a null result as evidence of absence without computing what the test could have detected
- Sizing to the historical maximum drawdown, which came from a single episode
- Adding calendar time in one regime rather than adding independent events
- Trusting an unusually large result from a small sample, when small samples clear a bar only by overstating the effect
- Computing the required sample size after the test, where it becomes a justification rather than a constraint
Checklist
- A required sample size computed before building, from the expected edge and the instrument's dispersion
- A standard error reported with every mean, and no conclusion stated when the mean sits inside one
- An effective sample size derived by grouping overlapping and correlated trades
- A minimum detectable effect stated beside any null result
- Path statistics labelled as descriptions of the sample rather than as forecasts
- An explicit statement, in years or trades, whenever the question needs more data than exists
Knowledge check
Exercise
For one rule you are considering, estimate the per-trade dispersion from historical outcomes and the edge you would need to clear your round-trip cost. Compute the number of independent trades required for that edge to sit two standard errors above zero, then divide your raw trade rate by the overlap factor implied by your holding period to get the effective rate. Convert the result into calendar years and write that number down. If it exceeds the time you are willing to spend, redesign the rule rather than lowering the standard.
Glossary, tools and sources
Glossary
- Standard error
- The standard deviation divided by the square root of the number of observations. How much your measured average could vary by chance.
- Effective sample size
- The number of genuinely independent observations behind an estimate, after correcting for overlapping holds and shared exposure.
- Statistical power
- The probability that a test would detect a real effect of a given size, determined mainly by sample size and dispersion.
- Minimum detectable effect
- The smallest true edge a given sample size would reliably reveal. Required to interpret any null result.
- Dispersion
- The spread of individual trade outcomes around their average. A property of the instrument and holding period rather than something care can reduce.
- Path statistic
- A figure determined by an extreme of the equity path, such as maximum drawdown or longest losing streak, and therefore estimated from effectively one observation.
Sources
- Risk and Volatility: Econometric Models and Financial Practice - Prize Lecture(opens in a new tab)
The Nobel Foundation. Retrieved 2026-08-31.
- Random Walks in Stock Market Prices(opens in a new tab)
Financial Analysts Journal, CFA Institute. Retrieved 2026-08-31.
Risk notice
This lesson is general educational information about statistical method. It is not investment advice, not a recommendation to buy or sell any security, and not tailored to your circumstances. Every figure shown is a constructed illustration and not a record of any account or system. A larger sample narrows an error bar; it does not turn a historical estimate into a forecast, and no sample size makes a future outcome certain. Trading involves risk of loss, including loss of the full amount invested.
Press when you have finished reading. Nothing is recorded until you do.