Good Morning p0box4,
So I think best to curve fit the entire data series so you have chance to make money every year.
View attachment 338989
No... you're wrong.
And you're right - not in a million years should you be allowed near an algo.
Curve fitting makes performance better in the past, but usually makes it worse in the future when you're actually trading.
Let me try and explain it like that. Imagine that you had a strategy that went long and short on different days ot the year. And then you curve fitted it to the performance of 2023; so that for example if on the 20th april 2023 the market went up, you would go long. And if on the 21st april it went down, you would go short.
The performance of that strategy would be the best - it would never lose money on any single day of the 2023 backtest.
Would you really expect that strategy to make money in the future? For that to happen the market would have to go up on the 20th april in 2024, down on the 21st and so on. The most likely outcome is that your up/down/up/down... fitted strategy will do about the same as random coin flipping. But because you have to pay trading costs, you would actually lose money.
That sounds crazy, but when you optimise, that is effectively what you are doing. Assuming the past will be exactly the same in the future. The more you optimise, the better the historic back test looks, the worse it will actually do in the future.
(Your other problem is that one year of data probably isn't enough to fit this strategy, but that's another post)
But you want to have the best possible performance in the future, and you wouldn't be satistifed with a backtest that wasn't overfitted. The issue here is you have massively unrealistic ideas of what sort of performance you can achieve. Making a profit every single month just isn't achievable by the vast majority of traders, even professionals, except for those in the high frequency trading space. Pretty much the best hedge fund on the planet, Rentech, loses money about two months in every year.
GAT