Research question

If 60 trading rules have no true predictive power, what is the probability that at least one looks "significant" at the 5% level? What threshold does a Bonferroni correction imply? In one simulated dataset of 240 months, how many rules are misclassified? The data are generated with seed 20261037 and are a teaching simulation, not real strategies.

Data

Item Value
Candidate rules 60
Sample 240 months
Frequency and unit monthly returns; p-values are probabilities
True predictive power none (simulated null)
Single-test level 5%
Expected false positives 3
Probability of at least one false positive 95.4% (under independence)
Rules with p<0.05 in the simulation 4
Smallest p-value 0.001185
Bonferroni threshold 0.000833
Rules significant after correction Bonferroni 0, Holm 0
Benjamini–Hochberg discoveries at q=5% 2
Reproduction script scripts/simulate-multiple-testing.mjs
License simulated data, no external license

Method and assumptions

Each rule gets a one-sample test of the mean on 240 monthly returns, with the null hypothesis that mean return is zero. A p-value is the probability of a result at least as extreme when the null is true; its definition and common misreadings are covered in the main article Hypothesis Testing and Practical Significance (RES-012). Alpha is the probability of rejecting the null when the null is true, that is, the probability of a Type I error (OpenStax, 9.2); this article uses α = 0.05 as the rejection threshold for every rule. With m independent tests, the probability of at least one false rejection is 1-(1-α)^m, which is the family-wise error rate (FWER, written as fwer in the reproduction block below). The Bonferroni inequality says that building each of g comparisons at a 1-α/g confidence level keeps the overall confidence coefficient at 1-α or higher (NIST/SEMATECH, 7.4.6.3); applied to hypothesis tests, the same inequality means setting each test's threshold to α/m so that the overall Type I error rate does not exceed α. Data snooping means trying many rules and reporting only the best result while hiding the number of attempts. How it differs from look-ahead bias and overfitting is set out in the main articles Backtesting and Look-Ahead Bias (RES-020) and Out-of-Sample Testing and Overfitting (RES-022). Sullivan, Timmermann and White (1999) apply White's Reality Check bootstrap to 26 technical trading rules over 100 years of daily Dow Jones data and quantify data-snooping bias across the full rule universe[2]. Every simulated figure in this article comes from scripts/simulate-multiple-testing.mjs: mulberry32 seeded random numbers, Box–Muller normal returns, a one-sample two-sided t-test of each rule's 240 monthly returns (df = 239, p-value from the incomplete beta function), with the Holm and Benjamini–Hochberg decisions implemented in the same script; re-running the same seed reproduces the same numbers.

Results

With 60 tests at α=0.05, the expected number of false positives is 3 and the probability of at least one is 1 - 0.95^60 = 95.4%. The run with seed 20261037 returns 4 rules with p-values below 0.05 and a smallest p of 0.001185; the Bonferroni threshold is 0.05/60 = 0.000833 and the first Holm step uses the same threshold, so neither procedure lets any rule through. Benjamini–Hochberg at q=5% yields 2 discoveries.

The rule with the smallest p can be checked line by line: over 240 months its mean return is -0.21187 (return units) with a standard deviation of 1.00007, so the standard error of the mean is 1.00007 / √240 = 0.064554, t = -0.21187 / 0.064554 = -3.282, and the two-sided p-value at df = 239 is 0.001185. It is "significant" although the true effect is zero - the direct consequence of making 60 comparisons.

Repeating the whole experiment 200 times (seeds 20261037 onward) gives a mean of 3.03 rules with p<0.05 per run, a standard deviation of 1.91, a range of 0 to 10, and at least one false positive in 94% of the runs, against the theoretical 95.4%.

The five smallest p-values against the Bonferroni threshold A horizontal scale from 0 to 0.08. Five observed points sit at 0.001185, 0.001215, 0.015293, 0.043303 and 0.076635. A dashed vertical line marks the Bonferroni threshold of 0.000833 and a solid line the single-test level of 0.05. The threshold lies to the left of every point. p-value (0 to 0.08; 40 px per 0.01) Bonferroni 0.000833 single-test level 0.05 0 0.05 0.08 0.0153 0.0433 0.0766 0.001185 and 0.001215 (nearly coincident)
Figure 1: the five smallest p-values from the seed-20261037 run (the script's smallestFivePValues output) plotted with the Bonferroni threshold on one scale at 40 pixels per 0.01. The threshold line sits left of every point, so zero rules survive correction; four points lie left of the 0.05 line and one to its right, which is why four of the sixty rules are “nominally significant”. The other 55 rules run up to a largest p of 0.981638, outside this window.; sample: the article’s own argument; units as stated in the text.

Robustness

  • If the 60 tests are correlated, the 95.4% independence figure is only approximate; Bonferroni still controls the family-wise error rate, but is conservative.
  • Raising the candidate set to 200 rules lowers the threshold to 0.05/200 = 0.00025 and raises the expected number of false positives to 200 × 0.05 = 10; the same figures can be produced with node scripts/simulate-multiple-testing.mjs 20261037 200 240.
  • Calibration check: node scripts/simulate-multiple-testing.mjs --check re-runs 5,000 zero-effect rules and returns 5.16% with p<0.05, a mean p of 0.5011 and shares below 0.25/0.5/0.75 of 0.252/0.497/0.748, matching the uniform p-values the null predicts; --selftest compares the p-value function against known t quantiles (t=1.96, df=239 gives 0.0512).
  • Holm controls the same family-wise error rate as Bonferroni and is generally more powerful; Benjamini–Hochberg targets the false discovery rate instead, which is a different quantity. Both decisions are computed by our own script and are stated as this article's methodological description; the three registered sources do not cover Holm or BH. Neither exempts the author from reporting all attempts and the selection process.
  • A different sample changes the p-values; one significant result is not the same as a reproducible one.

Limitations

The simulated rules are independent and near-normal, while real strategies are correlated and non-normal; the test covers one rule family. Trading costs, data revisions and publication bias are omitted, and effect sizes and confidence intervals are not reported. Bonferroni controls an error rate, not the probability that each conclusion is true; false positives remain possible after correction. The evidence does not establish the validity of any real rule.

Reproduction

  1. Run node scripts/simulate-multiple-testing.mjs to generate 60 rules of zero-mean returns over 240 months with seed 20261037 and compute a t statistic and two-sided p-value for each.
  2. Read from the output the count of p<0.05 rules, the smallest p, the expected false positives and the Bonferroni/Holm/BH decisions.
  3. Use --selftest to check the p-value function, --check for the uniformity check and --repeat 200 for the sampling distribution of the hit count.
  4. Change the rule count or the number of months (positional arguments seed rules months) and see whether the conclusion flips.
  5. Report the number of attempts, the correlation structure and all p-values, not only the smallest.
node scripts/simulate-multiple-testing.mjs          # seed rules months = 20261037 60 240
expected_false = 60 * 0.05 = 3
fwer = 1 - 0.95^60 = 0.9539
bonferroni = 0.05 / 60 = 0.000833
min_p = 0.001185 (mean -0.21187, sd 1.00007, se 0.064554, t -3.282)
naive_sig = 4; bonferroni_sig = 0; holm_sig = 0; bh_discoveries(q=0.05) = 2
--repeat 200 -> mean_hits 3.03, sd 1.91, range 0..10, share_with_hit 0.94
--check      -> 5000 rules: share p<0.05 = 0.0516, mean p = 0.5011

Strength of conclusions

The 4 "significant" results are consistent with zero predictive power and are a product of multiple comparisons; the Bonferroni threshold removes all of them. The evidence supports pre-registering hypotheses, reporting the number of attempts and applying a multiple-testing correction; it does not support treating one significant result as proof that a strategy works.

Distinguish two error controls. FWER (family-wise error rate) controls the probability of at least one false rejection; Bonferroni and Holm belong here and are conservative. FDR (false discovery rate) controls the share of false results among those declared significant; Benjamini-Hochberg belongs here and has more power with many tests. The BH procedure finds 2 results at q=5%, but that does not make them true; FDR tolerates a share of false discoveries and suits exploratory work, not single-strategy decisions.

The garden of forking paths is subtler than 60 explicit rules: the researcher never records all attempts and reports only the final "significant" rule. The fix is not a post-hoc threshold but a prior statement of hypotheses, sample, rule family and stopping rule; if that is impossible, label the result exploratory and replicate on an independent sample. Multiple-testing correction handles known attempts, not unreported ones[1][2].

Related

  • Required prerequisite: Hypothesis Testing and Practical Significance (RES-012), Out-of-Sample Testing and Overfitting (RES-022).
  • Related reading: Hypothesis Testing and Practical Significance (RES-012), Backtesting and Look-Ahead Bias (RES-020), Out-of-Sample Testing and Overfitting (RES-022).

Figures in plain language

The three figures below check the mechanism, boundary and comparison in this article; labels come from its own sections, not new data.

Multiple Testing and Data Snooping: mechanism chain Multiple Testing and Data Snooping — three-step structure: problem, mechanism, judgment. Labels come from the article's sections, not new data. Multiple Testing and Data Snooping: mechanism chain Labels come from the article's sections; all three steps matter. Problem Among 60 simulate d rules with no… Among 60 simulat ed rules with no predictive power, 4 look significant at… Reproduction Reproduction: 1. Reproduction: 1. Data | Item | Value | | --- | ---: | |… | Item | Value | | --- | ---: | | Candidate rules | 60 | | Sample | 240… Reading order: test the problem, then the mechanism, then whether the judgment overreaches. If a middle step lacks evidence, later conclusions are hypotheses, not facts. Structural illustration, not a new data chart; sample is the article's own argument.
Figure 2: Multiple Testing and Data Snooping — mechanism chain: problem, mechanism, judgment. Sample: the article's own argument; units as stated in the text.
Multiple Testing and Data Snooping: boundary Separates conditions where the claim holds from those where it fails; a local example is not universal. Multiple Testing and Data Snooping: when does it hold? Check the conditions before the conclusion If conditions, definitions or samples change, recompute the conclusion Holds The simulated rules are independent and near-normal, while real strategies are correlated and non-normal… Fails / rewrite If 60 trading rules have no true predictive power, what is the probability that at least one looks "significant… Boundary illustration; sample is the article's own argument; units as stated in the text.
Figure 3: Multiple Testing and Data Snooping — boundary: when the claim holds, and when it fails. Sample: the article's own argument; units as stated in the text.
Multiple Testing and Data Snooping: object, conditions and common mistakes Three rows compare the concept, its conditions and common mistakes; comparison is not equivalence and does not replace a definition. Multiple Testing and Data Snooping: object, conditions and common mistakes at a glance This article Commonly confused Object Among 60 simulated rules with no… Adjacent concepts / common claims Conditions The simulated rules are independent and… If 60 trading rules have no true predictive power, what is… Check Define first, then compare; never judge labels only Correlation is not causation; a local case is not universal Comparison illustration; sample is the article's own argument; units as stated in the text.
Figure 4: Multiple Testing and Data Snooping — comparison of object, conditions and common mistakes. Sample: the article's own argument; units as stated in the text.

Exercises

  1. With 60 independent tests at α=0.05, what is the expected number of false positives?
  2. What is the probability of at least one false positive?
  3. The smallest p is 0.001185 and the Bonferroni threshold is 0.000833. Is it significant?
  4. Why does data snooping inflate backtest results?
  5. What do FWER and FDR each control, and which suits exploratory research?
  6. What is the garden of forking paths, and why is it harder than 60 explicit rules?
Suggested answers
  1. 60 × 0.05 = 3.
  2. 1 - 0.95^60 = 95.4%.
  3. No; 0.001185 > 0.000833, and the first Holm step uses the same threshold, so it is rejected there too.
  4. Because only the best attempt is reported while the number of attempts stays hidden, so the reported maximum is easily a chance high.
  5. FWER controls the probability of at least one false rejection (Bonferroni, Holm; conservative); FDR controls the share of false results among discoveries (BH; more power with many tests, better for exploratory work).
  6. The garden of forking paths means the researcher never records all attempts and reports only the final significant rule; correction handles known attempts, not unreported ones.

Sources

  1. NIST/SEMATECH. e-Handbook of Statistical Methods, “7.4.6.3 Bonferroni's method.” U.S. Government work (public domain). https://www.itl.nist.gov/div898/handbook/prc/section4/prc463.htm (accessed 2026-10-30)
  2. Sullivan, Ryan, Allan Timmermann, and Halbert White. “Data-Snooping, Technical Trading Rule Performance, and the Bootstrap.” Journal of Finance 54, no. 5 (1999): 1647–1691. License unknown. https://ideas.repec.org/a/bla/jfinan/v54y1999i5p1647-1691.html (accessed 2026-10-30)
  3. OpenStax. Introductory Statistics 2e, “9.2 Outcomes and the Type I and Type II Errors.” CC BY-NC-SA 4.0. https://openstax.org/books/introductory-statistics-2e/pages/9-2-outcomes-and-the-type-i-and-type-ii-errors (accessed 2026-10-30)

Worked demo

Read-through check: can you say three things?

No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.

Ticked 0 / 3

The numbers are teaching assumptions that show relationships, not forecasts or investment advice.

This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.

Back to station