Overfitting in Trading: Why a Better Backtest Isn’t Enough

Need More Help? Book Your FREE Strategy Session With Our Team Today!

We’ll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.

Adding a filter or adjusting a parameter can improve a trading strategy’s backtest. But that doesn’t necessarily make the strategy more robust. The extra rules may simply fit it more closely to past data, increasing the risk of overfitting in trading systems.

In this clip from Unger Summit Live, Pier and Davide explain why a trading system’s complexity deserves careful consideration. Starting with a Formula 1 analogy, they share a Bitcoin breakout strategy with just one line of code for the entry logic and discuss the value of its subsequent out-of-sample performance.

Simplicity doesn’t guarantee results, but it can reduce the opportunities to overfit a strategy to the data used to develop it.

Enjoy the video and happy trading!

P.S. Interested in learning more about overfitting and robust strategy development and evaluation? Then don’t miss out on these other videos:

Transcription

Complexity and Overfitting in Trading Systems: The Formula 1 Analogy

Simplicity wins. Take Formula 1, for example. A Formula 1 car might seem like the most complex car out there, because it represents the cutting edge of automotive technology. But in reality, it has only the essentials.

There are regulations to follow, and the engineers make sure the car has everything it needs to go as fast as possible, and nothing more.

And that ties in with something one of my college professors always used to say: in a machine, anything that isn’t there can’t break.

And apparently Ferrari said that too, so my professor probably got it from him. I got it from my college professor. So that was a Ferrari quote! See, I just learned something new.

Do More Filters and Parameters Make a Strategy More Robust?

Because simplicity often wins. And trading isn’t all that different. A very complex trading system, with lots of parameters, lots of filters, maybe heavily optimized, might look great, but that doesn’t necessarily mean it’s robust.

A Bitcoin Breakout Strategy With One Line of Entry Logic

Here’s a fairly well-known example that I think many of you may recognize: just a few lines of code. If you look closely, there’s only one line for the entry logic. The rest is inputs, stop losses, and profit targets.

In this particular case, we’re trading Bitcoin, but I have to say it works on other instruments too.

It’s simply a one-line trading system that buys on a breakout of the daily range, using just the standard daily factor filter. In other words, the candle’s body has to be smaller than its range multiplied by a certain factor. In this case, that factor is 0.75, so 75% of the range.

And a simple piece of code like this produces an equity curve like this one.

Why Out-of-Sample Performance Matters After Development

Now, this equity curve might look like something we put together today, with the benefit of hindsight. But I remember us presenting this system years ago, to show just how easy it was to come up with something that could work in the market.

We’ve probably been showing it for at least three years, so there’s a real out-of-sample period just since we started presenting it, let alone since we started using it.

Simplicity and Overfitting in Trading: Fewer Parameters to Fit to Past Data

And going back to what you said earlier, Pier, about how something that isn’t there can’t break, I’d put it this way: you can’t overfit a parameter that doesn’t exist.

So if you think about a simple system, it’s hard to overfit. The rule is right there. There’s only so much room for me to make mistakes when building the model.

Need More Help? Book Your FREE Strategy Session With Our Team Today!

We’ll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.

Related Posts