We tested 11,385 settings. Three survived. That is the problem.
Try enough settings and one will look brilliant. Our first model scored 2.1 on old data and 0.4 on new data. Nothing was broken.
TradeXAI research · 5 min read
You tweak the RSI length from 14 to 11. Better. You move the stop from 2% to 1.7%. Better again. After an evening of this, the backtest is beautiful.
You have not found a strategy. You have found the settings that fit last year best.
That is overfitting: a strategy that has learned the past instead of something that repeats. It is not a rare accident. It is the default result of searching.
Our first lesson
Our first serious model scored a Sharpe of about 2.1 on the data it was designed on. On data it had never seen, it scored about 0.4.
(Sharpe is return per unit of risk. 2 is excellent, 0.4 is close to nothing.)
Nothing was broken. There was no bug to fix. The search had simply found patterns that were not real.
Many tries make luck look like skill
Flip a coin ten times and getting eight heads is rare. Let a thousand people each flip ten coins, and someone will get eight heads. That person is not skilled.
Testing many settings is the same thing.
We tested 11,385 settings of one scalping idea. 45 were positive under both of our fill assumptions. That is 0.4%. Only 3 were positive in every year, and those traded less than once every two days.
That is what chance looks like. More examples from our log:
- In another family, 31 of 540 settings were profitable. The best had a t-statistic of about 2 (a score for how unlikely a result is by chance). That sounds significant for one test. For the best of 540, it is ordinary.
- The best 1-hour setting made +18.4 basis points per trade in the design period. On the locked test data it made +1.2. (A basis point is 0.01%.)
- A crash-fading rule made +0.29% per trade in design and -0.12% on the test data.
- For one breakout idea we ranked 144 settings by their design result. The correlation with their ranking afterwards was -0.22 on daily candles and -0.07 on 4-hour candles. The "best" setting told us nothing about the future.
The best of 540 tries is not a discovery. It is the 540th lottery ticket.
Know your noise
Before you believe an improvement, measure how big a random change is.
We added 20 random signals to our best bot, one at a time. Pure noise, no information. They moved its Sharpe by anything from -1.04 to +0.23.
So an improvement below about 0.25 cannot be told apart from luck.
Even the data is noisy. Downloading the same history again, fresh, moved the Sharpe by about 0.2.
A holdout wears out
The standard defence is a holdout: a slice of data you lock away and test on once.
The trap is the word "once". Every time you look at the holdout and then change something, a little of it leaks into your choices.
We were strict and it still happened. After several rounds of work on one bot we had to write in our own log that 2025-26 "had already been looked at, so it is not a clean holdout". The headline number from that period is therefore not proof, and we do not present it as one.
A subtler case. We tested five training-window lengths, and the 4-month one passed our rule. But we had picked it after seeing all five on the test data.
Its neighbours, 3 and 6 months, scored lower: 0.79 and 1.06 against 1.13. On a fairer list of coins it was flat. We rejected it.
Five habits that helped
- Fix the pass rule first. Ours: beat the current bot by at least 0.10 Sharpe in the design period, and be no worse afterwards. Decided before running anything.
- Compare with a placebo. Random entries with the same exits. Several "edges" turned out to be just the exit rule.
- Look at the neighbours. A real effect is a plateau: nearby settings also work. A lonely peak is luck.
- Remove the best 10 trades or coins. If the profit disappears, you have a few lucky events, not a method.
- Prefer simple. In our tests, tuning inside a walk-forward did worse than the fixed rule, and no clever weighting beat a plain equal vote.
This article is for education. It is not financial advice.
- overfitting
- holdout
- statistics
For education only. Backtests and paper results do not predict future results. Not financial advice.