Every time you change a threshold or a weight and rerun a backtest, you’ve run another test. With two years of data and no real edge, the best of only seven independent versions is expected to show a Sharpe ratio of 1 in the backtest, an annual return above cash as large as its annual volatility. On new data, its expected Sharpe ratio is zero. I tuned my own screens and rankings this way from 1997 to 2013, and near the end of this guide I count those tests with AI.
Searching for a winner this way is called data snooping, or p-hacking. When you keep running tweaked screens over the same data, it’s close to unavoidable. Nassim Nicholas Taleb’s Fooled by Randomness (2001) is the best general account I know of why people mistake luck for skill.
A few tries are enough for luck to produce a winner
A backtest reports the version you ran last, with no record of the forty you tried before it. Test forty random screens and the best of them will look good too.
David Bailey, Jonathan Borwein, Marcos López de Prado, and Qiji Jim Zhu showed how few tries that takes. The seven versions at the top of this guide are their figure for two years of data. With five years, 45 versions are enough (Notices of the AMS, 2014, p. 461). They conclude that the more versions you try, the higher the result you should demand from the one you keep (p. 468). Versions of one screen resemble one another, so they count as fewer independent tries than their raw number (p. 463). How to count them, and how high to set the bar, is the subject of a guide still to come, Your best backtest needs to account for all the ones you discarded.
Try it below. Every version in the simulator is random noise with no edge, yet the best of enough tries looks like a strategy worth trading. Choose 7 versions with 2 years of data, or 45 with 5, and the best you’d expect from luck alone is a Sharpe ratio near 1, as the paper says.
Seed 161803
The best of 45 versions had a Sharpe ratio of 1.14 in its 5-year backtest and −0.42 on new data. Counting every version tried, the confidence that its edge is real is 43%.
| Versions tried | 45 |
|---|---|
| Best Sharpe ratio in the backtest | 1.14 |
| Best to expect from luck alone | 1.22 |
| Same version on 5 years of new data | −0.42 |
| Confidence the edge is real, counting only the version kept | 99% |
| Confidence the edge is real, counting every version (deflated Sharpe ratio) | 43% |
Researchers usually want 95% or more before they trust a result.
Growth of 100 invested in each version
So the backtester I had a coding agent build keeps every variant I test in one study and shows each one’s deflated Sharpe ratio next to its plain Sharpe ratio. The deflated figure counts every try, so a version that only beat its siblings by luck doesn’t look like an edge.
In a second paper, the same authors proposed a way to estimate the probability that a chosen backtest is overfit, tuned so closely to its history that it won’t hold up on new data. Take the version that did best in the data used to choose it, and ask how likely it is to rank below the median of all the versions in data it hasn’t seen (Journal of Computational Finance, 2017; free version, pp. 5, 10).
How I used to tune screens and rankings
For years I tuned my systems the same way. In my own account from 1997 to 2003, the system was four screens, one each for quality, value, growth, and momentum, most of them measured against the stock’s industry. Many stocks passed more than one, so each screen had a weight, and a stock’s combined screen number set the order I looked at them in. I tuned those weights, never the screens’ cutoffs. In 2003, before I worked at a bank, I started tuning rankings the same way. A ranking weighted a few main measures, such as book value, earnings, and return on equity, most of them measured against the stock’s industry and sector.
At each level of the search, I moved every weight up 5 percentage points and down 5 percentage points, one at a time. The other weights gave up or took back those 5 points in equal shares, so the total stayed at 100%: with four weights at 25% each, raising one to 30% left the other three at about 23.3%. That’s eight backtests a level for four weights, each run over all the data I had. The version that most improved risk-adjusted return became the starting point for the next level. I kept going in that direction while it helped, and when neither step on that weight improved anything, the next gains had to come from the others. Moving one weight at a time kept each level small enough to run by hand. By about the third level, I often stopped seeing improvement I thought was meaningful.
I didn’t have a name for it then, but I was running a coarse hill-climbing search by hand: a search that takes small steps in whichever direction improves the fit. It was a recipe built to fit the history, so overfitting was guaranteed, and it didn’t even fit well. A step-by-step search is sure to find the best setting only when the results form a single hill, with no smaller peaks to stop on. Mine didn’t, and I skipped the broad sweep across very different settings that usually comes before a search like this. Whichever weight I moved first set the path, and every later step started from where that one left me, so what I could learn about the other weights depended on my first choice. The search stopped on a local peak, the best setting near where I started.
I never counted the trials. At eight backtests a level and about three levels, a pass over four weights took a couple of dozen. I kept the result as my baseline and ran a new pass about once a year, against history that was mostly the same as the year before. Versions 5 points apart are close cousins, so they count as fewer independent tries than their number. Still, every pass tuned the weights against all of that history, and nothing in my process estimated how much of the improvement was luck.
Then the tuned rankings competed. I took the three that performed best in backtests and combined them into one ranking, a weighted average of their ranks, with each ranking weighted by its backtested risk-adjusted return, and I shopped from the top of that list down. I did this in my own account, in portfolios I maintained as research for a mutual fund, and on the client portfolios I worked on at a bank from 2005 to 2013, where I first filtered the list to the names on the approved buy list. That final step was a second search on the same history. Keeping the best three backtests is the selection the simulator above shows, and weighting them by how well they backtested fit the history once more. At the bank, combining them added too little return to be worth the labor it took for each account.
Nothing was held out. I didn’t split the stocks into groups to see whether a result held in each of them. Nor did I charge the backtests for commissions or for slippage, the gap between the price a backtest assumes and the price an order actually gets. I reviewed the portfolio every week and never tested reviewing it less often. Each review sold what had dropped out of the rankings, so a holding didn’t have to stay near the top of the list to stay in the portfolio. I sold it only when its rank fell a long way, when it fell out of the rankings entirely, or when its thesis changed. I rarely went back to the research to see whether the factors were still holding up. And on top of the screens and rankings I added a discretionary layer of themes and theses, without a way to separate what that layer contributed from what the screens and rankings did.
I didn’t start holding data out, or testing separate slices of time, until 2013. That year I joined a proprietary trading firm, where I spent two years developing automated strategies. A holdout is a stretch of data the tuning never sees, kept back to test the finished system once.
Log every try, and check the settings around the winner
Keep a log of every variation you run, including the ones you throw away, so the version you keep comes with a count of the tries behind it. Write down why a factor should work before you test it, since once you’ve seen a result it’s easy to find a reason for it.
When a setting works, check its neighbors. If a threshold of 20 works and 18 and 22 don’t, you’ve probably found noise, because a real effect should hold up almost as well nearby. Use as few factors and tuned weights as you can, since each one gives the backtest another way to fit the past. And when you can, keep a period or a universe, the list of stocks a screen chooses from, out of the building entirely, and test the finished screen on it once.
With one market history, check whether an effect holds across markets
Clean out-of-sample tests, on data the tuning never saw, are worth running when you can, but there’s only one market history, and most of us have already looked at most of it. So what we usually do is check whether an effect holds across different market environments, such as bull and bear markets. An effect found in many of them is less likely to be an accident of one.
Trading also taught me how much of what you’d want to know about a market isn’t in the backtest data. To ask how a system does when the VIX is high, or when the market is in a downtrend, you have to bring in that series and define the condition yourself, before you look at the results. The VIX is an index of the volatility that S&P 500 option prices imply. I’ll show how to run that test in a later guide, An effect that shows up in only one kind of market may be an accident of it.
Count your trials with AI
I never counted my trials, so I gave Claude the account above, from 1997 to 2013, and asked it to. My first prompt is a template you can copy. After it, the model asks how you built your own screen or ranking and how you’ve changed it since.
October 12, 2026
Me
I want an honest count of the backtests behind a screen or ranking system I use. In my next message I’ll describe how I built it and how I’ve changed it since. When you have it: 1. Rebuild my trial log as a table: each round of changes, what I varied, how many versions I backtested, and how I chose the one I kept. 2. Count the backtests in total. Then estimate how many independent tries they amount to, since close variations of one system behave alike. Give a range, explain how you got it, and don’t claim more precision than my description supports. 3. Point out the steps that chose among versions without looking like a backtest, such as keeping the best few systems, combining them, or weighting them by how they backtested, and add them to the count. 4. Where my description leaves something out, say what you assumed and how that changes the count. 5. Tell me which checks to run first and why: nudging the main thresholds or weights each way to see whether the result holds, testing on a period or group of stocks I haven’t tuned on, using fewer parts, or writing down the reason for each change before I test it. Say how to run each one. 6. When you cite research, link to the paper or a page that quotes it, with page numbers where you can. Don’t tell me whether the strategy works or whether to trade it. I want to know how much searching stands behind its backtest. Ask me for the description when you’re ready.
I want an honest count of the backtests behind a screen or ranking system I use. In my next message I’ll describe how I built it and how I’ve changed it since. When you have it: 1. Rebuild my trial log as a table: each round of changes, what I varied, how many versions I backtested, and how I chose the one I kept. 2. Count the backtests in total. Then estimate how many independent tries they amount to, since close variations of one system behave alike. Give a range, explain how you got it, and don’t claim more precision than my description supports. 3. Point out the steps that chose among versions without looking like a backtest, such as keeping the best few systems, combining them, or weighting them by how they backtested, and add them to the count. 4. Where my description leaves something out, say what you assumed and how that changes the count. 5. Tell me which checks to run first and why: nudging the main thresholds or weights each way to see whether the result holds, testing on a period or group of stocks I haven’t tuned on, using fewer parts, or writing down the reason for each change before I test it. Say how to run each one. 6. When you cite research, link to the paper or a page that quotes it, with page numbers where you can. Don’t tell me whether the strategy works or whether to trade it. I want to know how much searching stands behind its backtest. Ask me for the description when you’re ready.
Claude
Ready when you are. Send the description in whatever form is easiest: notes, a timeline, or a brain dump. Rough counts are fine. “Somewhere between 10 and 30 versions” is more useful to me than a precise number you’re unsure of, and I’ll carry that range through the estimate.
These details will make the count tighter. Skip any you don’t remember, and I’ll state what I assumed:
- Where the starting system came from. For example, published research, a Portfolio123 prebuilt system, another of your strategies, or your own idea. Also tell me whether you saw its backtest before you adopted it.
- Each round of changes. What you changed (factors, weights, thresholds, universe, liquidity rules, position count, sell rules, rebalance frequency), roughly how many versions you ran, and what you looked at to pick one. That could be return, Sharpe, drawdown, bucket slope, or just the equity curve.
- Which tools you used to decide. Rank performance (bucket) tests, screen backtests, simulations, rolling tests, or the optimizer. Every combination the optimizer runs counts as a backtest, so tell me how many it ran.
- The periods and universes you tested on. Say whether you held any back, and if you did, when you first looked at them.
- Dead ends. Factors or whole systems you tried and dropped, including ones you tested inside other strategies and then reused here.
- Choices at the portfolio level. How you picked the sleeve to pair with the growth strategy, and whether the value sleeve’s weak 2006 to early 2020 stretch is feeding a keep-or-drop decision. Both are selection steps, and both go in the count.
- Re-tuning after the slippage change. Whether you adjusted anything after switching to volume- and spread-based slippage, or only re-ran the same versions.
Go ahead and send it.
Me
From 1997 to 2003, in my own account, I used four screens, one each for quality, value, growth, and momentum, most of them measured against the stock’s industry. Each screen had a weight, and a stock’s combined screen number set the order I looked at stocks in. I tuned the weights, never the screens’ cutoffs. From 2003 I tuned ranking systems the same way. Each weighted a few main measures, such as book value, earnings, and return on equity, most of them measured against the stock’s industry and sector.
The search: at each level I moved every weight up 5 percentage points and down 5, one at a time, with the other weights giving up or taking back the 5 points in equal shares. With four weights that’s eight backtests a level, each run over all the data I had. The version that most improved risk-adjusted return became the starting point for the next level. I kept going in that direction while it helped, and when neither step on a weight helped, I moved on to the others. By about the third level I usually stopped seeing improvement I thought was meaningful. I didn’t sweep very different settings first, and I never counted the trials. I kept the result as my baseline and ran a new pass about once a year, over history that was mostly the same as the year before.
Then I took the three rankings that backtested best and combined them into one, a weighted average of their ranks, each weighted by its backtested risk-adjusted return, and bought from the top of the list down. I did this in my own account, in portfolios I maintained as research for a mutual fund, and from 2005 to 2013 on client portfolios at a bank, where I first filtered the list to the approved buy list.
I didn’t hold out any data, test separate groups of stocks, or charge the backtests for trading costs. I rebalanced weekly and never tested another frequency. On top of the screens and rankings I added themes and theses by judgment, with no way to separate what they contributed.
How many rankings I tuned before keeping the best three: 4
Claude
Short version: through 2013 you ran about 850 backtests, plausibly anywhere from 350 to 1,550. Nearly all of them were close variations or repeats, so they amount to roughly 3 or 4 independent tries per ranking. Picking 3 of the 4 rankings and weighting them by their backtests adds a lot on top of that. The combined list you bought from carries about as much luck as the best of roughly 10 unrelated systems, with a plausible range of 3 to 45.
Show the rest of Claude’s answer
1. Your trial log
| Round | Years | What you varied | Backtests | How you picked the keeper |
|---|---|---|---|---|
| Screen design | 1997 | Four screens (quality, value, growth, momentum), mostly industry-relative; cutoffs set once | Not stated (assumed 0) | Judgment (assumed) |
| First screen pass | 1997 | The 4 screen weights, ±5 points, one at a time | ~24 (16–32) | Best risk-adjusted return at each level; stopped when gains weren’t meaningful |
| Yearly screen passes | 1998–2002 | Same, starting from last year’s keeper, on mostly the same history | ~16 each, ~80 total (40–120) | Same |
| Switch to rankings | 2003 | Construction, and the measures in each of 4 rankings | Not stated (assumed 0) | Not stated |
| First ranking passes | 2003 | Each ranking’s 3–5 weights | ~24 per ranking, ~96 total (48–160) | Same rule |
| Combination | 2003 on | Which 3 of 4 rankings, and their weights | 4 finalists (already counted) plus ~1 combined run a year | Top 3 by backtest; weights in proportion to backtested risk-adjusted return |
| Yearly ranking passes | 2004–2013 | Each ranking’s weights, from last year’s keeper | ~16 per ranking per year, ~640 total (240–1,200) | Same rule; combination refreshed (assumed) |
| Bank portfolios | 2005–2013 | Universe cut to the approved buy list | Assumed 0 | Not by backtest |
| Themes and theses | Throughout | Judgment overlay | 0 | Judgment |
| Never varied | — | Screen cutoffs, weekly rebalance, zero costs, 5-point step, equal-share offsets | 0 | — |
I gave later passes 1 to 3 levels rather than 3. Each one started at last year’s keeper on mostly the same history, so the first level would often find nothing meaningful.
2. Backtests, and what they amount to
| Block | Central | Range |
|---|---|---|
| Screens, 6 yearly passes | ~105 | 55–150 |
| Rankings, 4 × 11 yearly passes | ~735 | 290–1,360 |
| Combined-ranking runs | ~11 | 11–25 |
| Total through 2013 | ~850 | 350–1,550 |
A level is 2 runs per weight. The screens had 4 weights, so 8 runs a level. I read “a few main measures” as 3 to 5 weights per ranking, so 6 to 10 runs a level. I didn’t count re-runs of each pass’s unchanged starting point, which would add about 50. If you’ve kept running yearly passes since 2013, add about 64 a year (24–120), which puts the total near 1,700 by now.
Independent tries. By an independent try I mean a system whose backtest luck is unrelated to the others’. The question is how many such systems you’d have to backtest, keeping the best, to end up on average as lucky as the version you kept. Three things bring the raw count down to that number.
First, repeats aren’t new tries. Each yearly pass re-ran mostly the same weight sets on mostly the same history, so what matters is the number of distinct weight sets per ranking. The first pass produced about 25. Each later accepted step added about 7 more, because one of the 8 neighbours is always the set you just left. Depending on how far the weights drifted over the decade, that’s roughly 25 to 100 distinct sets per ranking.
Second, neighbours are near-copies. Weight sets within 15 to 20 points of each other hold mostly the same stocks at the top of the list. I assumed their benchmark-relative returns correlate at 0.75 to 0.95 on average. The correlation has to be measured on benchmark-relative returns: raw returns of any long-only stock portfolios correlate highly just because they all hold stocks, and that would make the count look smaller than it is.
Third, when tries all correlate at ρ, the best one’s expected luck is √(1−ρ) times the luck of the best of the same number of unrelated systems. That’s exact for equally correlated normal results and a fair approximation for a hill climb. Converting back to unrelated systems:
- 25 sets at ρ = 0.95 come to about 2.
- 50 sets at 0.85 come to about 3.
- 100 sets at 0.75 come to about 6.
- If you held few enough stocks that ρ is nearer 0.65, about 9.
So each ranking amounts to about 2 to 8 independent tries, most likely 3 or 4. The screens era comes to about 2 to 5. The screens fed the rankings only through design choices, so I haven’t added them to the rankings’ number.
Two notes on using these numbers:
- Don’t mix them with the DSR shortcut. In the deflated Sharpe ratio, the hurdle rises both with the number of independent trials and with the variance of results across them (Bailey & López de Prado, preprint pp. 7–8). Their shortcut estimates that number by interpolating with the average correlation, N̂ = ρ̂ + (1−ρ̂)M (Appendix A.3, p. 14), which gives larger values than mine. They pair it with the measured spread across your trials, which is small for near-copies. My figures already account for the correlation, so combining them with that spread would count it twice.
- The search could only inflate part of the backtest. Each pass moved weights locally, so the search could only have inflated the gap between your kept weights and where the search started. Whatever selection went into the starting design isn’t in this count.
3. Selections that didn’t look like backtests
| Step | Why it selects | In the count? |
|---|---|---|
| Stopping when gains “weren’t meaningful” | A cutoff judged after seeing results | Already inside the per-ranking number |
| Starting each year from last year’s keeper | Each pass re-selects on mostly the same history, so no kept version was ever judged on data it wasn’t picked on | Already inside, through the distinct weight sets |
| Keeping the best 3 of 4 | A pick among four subsets by backtest | Added below |
| Weighting the three by backtested risk-adjusted return | Fits the mix to in-sample results and leans on the luckiest | Added below (small nudge up) |
| Averaging three separately tuned rankings | Averaging cancels some of their ordinary noise but none of the luck each was picked for | Added below (largest of the three) |
| Moving from screens to rankings in 2003 | A selection if you chose rankings because they backtested better | Not added; add 1–2 if so |
| Choosing each ranking’s measures | A selection if you compared backtests to choose them | Not added |
| Starting from measures the field already favoured | Those measures survived the profession’s own search | Outside your count entirely |
On that last row, Harvey, Liu and Zhu argue that after so much data mining across hundreds of factors, a new factor needs a t-ratio above 3.0 rather than 2.0 (RFS 29(1), abstract p. 5). Not charging costs and never testing another rebalance frequency add nothing to the count, because you didn’t search over them. It did leave the search free to favour weights that traded more.
How I added the combination. Novy-Marx covers this case:
- Combining the best k of n candidate signals is biased almost as badly as using the single best of nᵏ candidates (NBER w21329, printed p. 2).
- A combination of similar, individually insignificant signals backtests with a t-statistic close to their average t times the square root of how many are combined (p. 6).
- Weighting each signal in proportion to its in-sample performance (p. 8), which is what you did, produces much higher critical values than equal weighting (p. 12).
His experiments use long-short portfolios built on random signals, and his tables start at 10 candidates, so I worked your case directly using the same mechanism:
- Each kept ranking carries the luck of its own best-of-n.
- Dropping the worst of four adds about a third of a standard error per kept ranking on average, less when they’re correlated.
- Averaging three rankings whose benchmark-relative returns correlate at c multiplies the combination’s luck by √(3/(1+2c)). That is his √k when c = 0.
| Tries per ranking | c = 0.8 | c = 0.6 | c = 0.4 |
|---|---|---|---|
| 2 | ~3 | ~3 | ~4 |
| 4 | ~6 | ~8 | ~13 |
| 8 | ~14 | ~22 | ~42 |
With 3 or 4 tries per ranking and c around 0.6, the combined list comes to roughly 6 to 9. Weighting by backtest nudges that up, so I’d call it about 10, with 3 to 45 as the plausible range. These numbers match expected luck, which is how the DSR sets its hurdle. Novy-Marx’s equivalents match 5% critical thresholds instead (Table 1, p. 27), so his figures aren’t directly comparable to mine.
4. Where I filled gaps
| Gap | What I assumed | If it’s otherwise |
|---|---|---|
| Weights per ranking (“a few”) | 3 to 5 | Each extra weight adds 2 runs a level, about a quarter more raw backtests; independent tries rise a little |
| “Kept going in that direction” | Every step was a full 8-run level | Extra single steps along the winning direction add 1–3 runs a pass; little change to independent tries |
| Levels in later passes | 1 to 3, about 2 on average | If always 3, the raw count rises about half; independent tries barely move unless the weights moved |
| When yearly passes stopped | 2013 | If they continued, see section 2; independent tries rise only if weights kept moving, and later years stop being untouched |
| How far the weights drifted | Within about 20 points of the 2003 start | The biggest unknown. Each accepted step adds about 7 distinct sets and spreads them out; heavy drift pushes each ranking toward 6–9 |
| How alike the four rankings are | Benchmark-relative correlation 0.4–0.8 | Near-copies (~0.9): the combination adds little beyond one ranking. Distinct styles (~0.2): top of my range or past it |
| How many stocks you held | Enough that neighbouring sets share most holdings | Fewer holdings mean lower correlation and more independent tries |
| 3-of-4 pick and weights redone yearly | Yes | If done once, slightly lower |
| Other ways of combining tried | None | Each combination rule you compared adds a try at the combined level |
| Risk-adjusted measure | One fixed measure | Choosing among several after seeing them adds another layer |
| Own account, fund research, bank | One system serving all three | If tuned separately for each, multiply by the number tuned |
| Screen cutoffs, measures, industry vs sector, the 2003 switch, starting weights | Set by judgment, not by comparing backtests | Each choice made by comparing k backtested alternatives adds up to k tries, fewer if they were alike |
| Bank buy-list filter | Not in the backtests | No count change, but none of the counted backtests used that universe |
5. Checks, in order
1. Write down the reason and the pass/fail rule before each test. Do this first because it costs nothing, and it decides whether the checks below count once or become another round of search. Bailey and López de Prado point out that applying a holdout test enough times makes false positives expected rather than unlikely (preprint p. 6). They recommend planning tests in advance, with investment theory rather than computing power deciding which experiments to run (p. 10).
How to run it:
- Keep one row per run: date, ID, what changed, why you expect it to matter, the direction you predict, the settings (universe, dates, rebalance, costs), the result, whether you kept it, and a running count.
- Export each run’s weekly returns.
- Before each check below, write down what result would count as holding up.
- In future yearly passes, log any change whose only reason is “see if it helps” as pure search.
2. Nudge the weights, and include untuned anchors. This comes second because it’s cheap, spends no fresh data, and measures how much of the backtest the search produced at all. Your ±5 neighbours are already known to be slightly worse, since that’s how each pass stopped, so use bigger moves.
How to run it:
- For each ranking, move each weight ±10 and ±20 points using your equal-share offset. That’s 16 runs for a four-weight ranking.
- Add two anchors: equal weights, and your original pre-tuning weights if you still have them.
- Keep the universe, dates, weekly rebalance and gross returns the same as the original runs.
- For the combination, run equal weights across the three, each combination weight ±10, and a version that swaps in the fourth ranking.
- Decide beforehand not to adopt any of these variants, or they become trials.
The gap between your kept version and the untuned anchors is the most the search could have inflated. How quickly results fall off with distance, and whether the gap comes from a few years, shows how that gain is spread. Portfolio123’s ranking-system optimizer can run a batch of weight sets like this in one go.
Then use the exported returns to measure the two numbers behind my ranges: the average benchmark-relative correlation among each ranking’s variants, and the same among the four rankings. Clustering similar trials and counting the clusters is another way to estimate the number of independent trials (summary).
3. Use fewer parts. This comes third because it’s also cheap and in-sample, and it shows what each layer adds. Novy-Marx’s advice is to evaluate each signal’s marginal power separately, and not to believe in signals because they backtest well together (p. 29).
How to run it:
- Drop one measure at a time from each ranking, spreading its weight equally over the rest.
- Run each measure alone.
- Run the combination ladder: best single ranking, then the equal-weight average of all four, then the equal-weight best three, then your backtest-weighted best three. Each rung shows what that selection step added in-sample.
4. Test on untouched data, last and once. It comes last because it’s the most direct read on what the search inflated, but you can only use it once. Options, strongest first:
- Walk-forward replay of the whole procedure. Your search followed fixed rules, so it can be rerun mechanically.
- Before starting, fix a numeric threshold for “meaningful.”
- At each year-end, run the hill climb on data through that date, and redo the 3-of-4 pick and weights on the same data.
- Hold the result for the following year, then stitch those following-year results together.
- Compare the stitched record with your kept version’s backtest over the same years. The difference measures what the search added in-sample.
- Keep it gross and weekly so the gap reflects the search rather than costs.
- It’s several hundred to over a thousand runs, so script it against Portfolio123’s API.
- These runs are out of sample by construction, so they add no selection unless you change the procedure after seeing them.
- Years after your last pass. If you stopped re-tuning in 2013 and haven’t looked at this system’s results since, 2014 onward is your cleanest untouched stretch. Any year you’ve already looked at doesn’t qualify.
- A held-back group of stocks. You tuned on every stock you had, so there’s no untouched group inside your universe. The workable version is to replay the search on half the stocks, split by a fixed identifier, and test on the other half. It’s weaker than a time split: both halves share the same years, so it catches stock-specific luck but not luck in the period.
- A market or size segment you never used. This is the weakest, because a difference between markets can explain a miss as easily as the search can.
Your live 1997–2013 results were partly forward tests, since each year’s version traded the following year. But themes, the buy list and real costs are mixed into them, so they can’t isolate the search. Nudging the screen cutoffs or the number of holdings tests robustness rather than the search, because you never tuned them, so it can wait until after these four.
Rechecking the count
A separate AI session redid the arithmetic in Claude’s answer, which is quoted unchanged, and opened every source it cited.
| Part of the answer | What the recheck found |
|---|---|
| The counts | They add up: about 104 backtests for the screens, 736 for the rankings, and 11 combined runs make the answer’s 850, and its ranges and its figure of about 1,700 by now hold too. Its conversions to independent tries, about 2, 3, 6, and 9, are exact for the equally correlated case it describes. |
| The combination | The steps are right: keeping the best 3 of 4 adds about a third of a standard error, and averaging three rankings that correlate at c scales the luck by √(3/(1+2c)). The table built from them reproduces only roughly. On two readings of its method, the left two columns land within a try or two, but the right column comes out lower: about 30 to 34 for 8 tries at c = 0.4, where the answer says 42. Its estimate of about 10 holds; the top of its range of 3 to 45 is generous. |
| Bailey and López de Prado | The four points are in the paper, and the formula is exactly as quoted, on p. 14. The sentence tying the hurdle to both the number of trials and their variance is on p. 9, so the range should read pp. 7–9. The paper offers the formula as only “one path” and warns that average correlation is a limited measure that may itself be overfit (p. 15). |
| Novy-Marx | The pages are right for the July 2015 NBER working paper, which hasn’t been published in a journal. “Almost as bad as” the best of nᵏ is his wording, but his own Table 1 is far below nᵏ: the best 3 of 20 signals matches the single best of about 1,250, not 8,000. Only Table 1 starts at 10 candidates, and it comes from his model rather than the random-signal experiments. The answer’s own table doesn’t use the nᵏ figure. |
| Harvey, Liu, and Zhu | The point is right, but the citation mixes two versions. The working paper’s abstract has “a t-ratio greater than 2.0”; the published abstract, on p. 5 of the journal, says a new factor needs a t-statistic greater than 3.0 and doesn’t mention 2.0. |
| The Wikipedia link | It’s dead. The article was deleted on July 19, 2026, after a deletion discussion, months before this chat. Clustering similar trials to estimate how many were independent comes from López de Prado and Lewis (Quantitative Finance, 2019). |
| Portfolio123 | Both steps came from the model’s memory of my earlier chats, not from my description. Portfolio123 does have a ranking-system optimizer for adjusting weights, though its documentation doesn’t give a batch size, and an API with a Python wrapper that runs rank performance tests, screen backtests, and simulations. API calls draw on monthly credits that depend on the membership, which matters for a replay of several hundred runs or more. |
The arithmetic held up, and the answer marked each place it had to assume. Its errors were in the sources. With web search on, it linked a Wikipedia article deleted in July, months before the chat, which it can’t have opened, and it cited the published paper’s abstract for wording that comes from the working paper. Its independent-try figures rest on correlations it assumed rather than measured, and the second check it suggests is the way to measure them.
Your check
Open the screen or ranking system you rely on most. Count, or estimate, how many versions of it you have backtested, including every time you re-tuned it. Then change its main threshold or weight by a small amount in each direction and rerun. If the result falls apart, treat the original backtest as weaker evidence than it looked.