Is my backtest overfitted?
Overfitting means the strategy learned the noise of the past instead of a repeatable pattern. It is the most common reason a beautiful backtest disappoints live. You can check for it without any maths.
Test 1: the neighbours
Change each setting a little (a 20-period average becomes 18 and 22). A rule that really held up sits on a plateau: nearby settings also work. An overfitted one sits on a spike: small changes turn profit into loss.
Test 2: the two halves
Split the history in two. Both halves should be profitable with similar profit factors. If the first half carries everything, the pattern may already be gone.
Test 3: the cost stress
Add 0.2% per trade. Overfitted strategies often have many small wins that vanish with realistic costs.
Test 4: without the best days
Remove the 5 most profitable days. If the result flips to a loss, the strategy fitted a few unusual events.
Test 5: how many versions did you try?
This is the one most people skip. If you tried 50 combinations, the best one would look good even if none had an edge. Professional tools adjust the luck test for the number of tries (and can estimate a 'probability of backtest overfitting' from all the versions you tested).
A number to remember: when we picked the best setting from a grid for 20 classic TradingView strategies, the backtest profit factor jumped from about 1.15 to 1.54. Over the next two unseen years it was about 0.97 vs 1.02 - the improvement was entirely overfitting.
What to do if it fails
- Go back to the idea, not the numbers: why should this work, and who is on the other side?
- Pick round, sensible settings and stop tuning.
- Test on markets and dates you never looked at.
- Paper-trade 30 signals before risking money.
Frequently asked questions
- What is overfitting in trading?
- Fitting a strategy so closely to past data that it captures random noise. It looks excellent in the backtest and fails on new data.
- How many parameters are too many?
- There is no fixed number, but every extra parameter and every extra version tested raises the risk. Fewer, round, sensible settings carry less risk of overfitting.
- Does walk-forward testing remove overfitting?
- It helps a lot, as long as the test periods were never used in design. It can still miss a regime change, so paper trading is the final test.
- Can you check overfitting across all my versions?
- Yes - if you send every version's trade list, a review can estimate the probability that the chosen version was overfitted.
Want your own strategy checked?
Send your trade list. You get a plain-English PDF: verdict, 10 checks, a position size for your chosen risk, a daily stop and a 30-trade paper-test plan. Free in the beta: run it yourself in the Workspace.