The square-root-of-n rule
The error of an average falls with the square root of the amount of data. To halve the error you need four times the data; to cut it tenfold you need a hundred times.
01The formula
- the standard error of a mean from n observations
- the standard deviation of one observation
- the number of observations
02See it move
03Where it is used
- Quant researcherWorks out how many years of backtest are needed to measure an edge of a given size.
- Execution traderPlans how many trades an A/B test of two algorithms must run.
- Risk managerUnderstands why rare-event estimates stay noisy even with years of data.
04Why traders use it
It sets the price of certainty. Small edges in noisy markets need enormous samples, which is why most daily-frequency strategies cannot be proved from a short history.
05Worked example
With daily volatility 1.0% and 50 days, the error of the average return is 0.141%. Four times the data brings it to 0.071%; a tenfold improvement would need 5,000 days.
06How it is built
- From the standard error formula, .
- Replace by : .
- So halves the error and divides it by 10.
07The common mistake
Expecting precision to grow in step with data. Doubling the sample only cuts the error by about 29%, not 50%.
08In Python and LaTeX
import numpy as np sigma, n = 0.01, 50 print(round(sigma/np.sqrt(n), 5), round(sigma/np.sqrt(4*n), 5), 100*n)
\operatorname{SE}(n) = \frac{\sigma}{\sqrt{n}} \quad\Rightarrow\quad \operatorname{SE}(4n) = \tfrac12\operatorname{SE}(n)09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.