E14 — Pattern Essays

The Garden of Forking Paths#

Essay4 min read
1 min read
◆ The PatternTry enough paths and one of them will lead somewhere by luck alone

In a 1941 story by Jorge Luis Borges, the labyrinth turns out to be a novel in which every choice is taken. At each fork the story splits, and all the branches go on. Seventy years later the statisticians Andrew Gelman and Eric Loken borrowed the title for a quieter problem. A researcher rarely runs twenty tests and reports the best. More often they run one, and the data decide which one: which outliers to drop, which window to use, which subgroup looked interesting. Each choice is a fork, and the path actually taken was chosen by the noise.

The arithmetic is unforgiving. A rule with no edge at all passes a test at the 5% level one time in twenty. Try twenty such rules and the chance that at least one passes is about 64%. Try two hundred and it is a near certainty. The best result of a search is the luckiest one, and luck does not repeat.

The chart reader

A head and shoulders, an inverse one, a double top or bottom, a cup and handle, a rounding bottom: each comes with choices — how equal is equal, how deep is deep, when the neckline counts as broken. Candlesticks multiply them. The doji, the hammer, the engulfing pair, the morning and evening star are a few of dozens of named shapes, and a chart of any length contains some of them. When the patterns were written as code and tested on Dow Jones stocks, they added no value (Marshall, Young & Rose 2006). Writing the rule down before looking is what closes the forks.

The oscillator tinkerer

The stochastic oscillator, Williams %R, the CCI and the money flow index all ask much the same question — where is the price within its recent range? — each with a lookback and two thresholds to choose. Change 14 days to 9 and 80/20 to 70/30 until the backtest shines, and you have walked a dozen paths. Sullivan, Timmermann and White tested thousands of simple trading rules together and showed how much of the best rule’s performance disappears once the size of the search is taken into account.

The model tuner

Machine learning automates the garden. Optuna can try hundreds of hyperparameter settings in an afternoon, and the best validation score among them is flattered for the same reason the best trading rule is. The scikit-learn evaluation suite answers with nested cross-validation and a test set that is touched once; statsmodels answers with corrections for multiple testing, such as Benjamini and Hochberg’s. Public leaderboards are the same garden walked by a whole field: every team tunes against the same test set, which is why LLM evaluation keeps needing fresh benchmarks.

None of this means patterns are illusions. It means a result has to be judged together with the search that found it. A model is a map drawn from one territory, and a map redrawn until it fits every bump of the old ground is the one most likely to mislead on the new. That is the warning of The Map and the Territory and of Signal in the Noise.

Rules tried 20
Every rule is a coin flip with no edge. Drag to try more of them and watch the best one look brilliant
What to rememberCount the paths you walked, not just the one you report. The best of many tries is always flattered; judge it on data it has never seen.
References
[1] Borges, J. L. (1941). El jardín de senderos que se bifurcan (The Garden of Forking Paths). Buenos Aires: Sur.
[2] Gelman, A. & Loken, E. (2014). The Statistical Crisis in Science. American Scientist, 102(6), 460–465. doi:10.1511/2014.111.460
[3] Sullivan, R., Timmermann, A. & White, H. (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. Journal of Finance, 54(5), 1647–1691. doi:10.1111/0022-1082.00163
[4] Marshall, B. R., Young, M. R. & Rose, L. C. (2006). Candlestick Technical Trading Strategies: Can They Create Value for Investors? Journal of Banking & Finance, 30(8), 2303–2323. doi:10.1016/j.jbankfin.2005.08.001
[5] Benjamini, Y. & Hochberg, Y. (1995). Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society: Series B, 57(1), 289–300. doi:10.1111/j.2517-6161.1995.tb02031.x
[6] Bailey, D. H., Borwein, J. M., López de Prado, M. & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the AMS, 61(5), 458–471. doi:10.1090/noti1105

Last reviewed October 2026 · How this site checks its content · Report a mistake

Pattern bridge: The defences are in The Toolkit: hypothesis testing says what a p-value means for a single test, and walk-forward validation keeps the future out of the search.
Linked from 3
← Previous
The Coiled Spring
Open in the full reader, with the topic sidebar