How to Curve Fit

One way to think about how NOT to curve fit when creating a trading strategy is to imagine your goal is the opposite.

Let’s say your goal was to create the most curve-fitted strategy possible.

An insane goal, I realize, but how would you do it?

Here’s what I would do:

Start with a backtest that has a small number of trades.

I would create that by making assumptions about what I thought the thresholds should be.

Apply the backtest to a tiny number of symbols. Preferably just one!

This allows you to restrict the number of trades in your backtest to a really small starting point. Ideal for curve fitting!

Next, sort the trades list by profit and look at the least profitable trades.

Tell yourself there’s no way you’d make THAT trade in real-time, so just remove it from your backtest.

Next, look at the data and blindly follow what it suggests. Don’t think about it too much – this is data, and data doesn’t lie!

If it’s an intraday strategy with short hold times and the data suggests a fundamental data point like earnings per share would improve it, just go with it!

If it’s a swing trading strategy that holds for several days, find data points for the smallest possible timeframe that “improve” the system, and add a rule for them.

Any improvement by adding a rule, no matter how tiny, is great for curve fitting. The more rules, the better!

Stay away from data points that are normalized. For example, if you have a choice between, say, relative volume and just plain volume today, choose volume today.

Lastly, look at the equity curve for your backtest. Find the days when it performed the worst. Tell yourself you’re smarter than that, and you wouldn’t have traded that day, so just remove it from your backtest.

Your equity curve should look absolutely pristine at this point.

Oh, one more thing: get your hopes up – there’s no way you can lose with this one. Tell your friends how well you’re going to do – better yet, post it on Twitter/X.

OK, this is tongue in cheek obviously, but it should give you some good ideas about what to do to avoid curve fitting.

Did you notice anything you might be doing now when you backtest a strategy?

-Dave