Very Interesting topic! We need a process for qualifying what data is expected to be useful going forward, and fit from that, and identify what data may be unproductive and refrain from using that. -- not an easy task
I'd guess it's desirable to have out-of-sample times cover a variety of market conditions, not just very recent conditions. Then, you would have a better idea of how the system holds up over time. For example, it would be better for a trend following system to detect when the market isn't trending and avoid trades then.Maybe you have a good system that could make money now, but what if your out-of-sample is exactly a period of poor performance? Wouldn't it make more sense to train your parameters only on the most recent time frames?
If the out-of-sample time period overlaps the in-sample time period, testing on a larger basket of stocks might not show what will happen in the future well because stocks in the same time period are often highly correlated.I also use an in-sample and out-of-sample method, but in my case, I use a population of 50 stocks (picked so that there is a variety of small caps, mid caps, big caps, growth, value, etc.) to run a standard backtest, when I find something promising I backtest on a bigger basket of 500 stocks.
Excessive curve fitting is anathema to any system developer
...
What would be philosophically the best way to proceed?

The acceptable way for someone knowing the basics of statistics is to explore via simulation the entire sample space (a universe of plausible sample paths).
The backtesting story, imho, is some nonsense put forward by someone with little understanding of stats, and unfortunately, the herd just copies and pastes and follows what they heard. Since Stats exists, Statistical procedures are evaluated on the entire sample space, not on a single point.
Backtesting one or a few past sample paths would lead nowhere, except to delusional reliance (clearly reinforced by the hope that everyone has). But, of course, everyone must make their own journey, and all I can do is take the insults and plant the seed of doubt...![]()
when you say "explore via simulation" do you mean something like a montecarlo simulation?
If you keep using your "out of sample" data over and over then it's not out of sample data. That's why this doesn't work.
@ph1l Using in-sample and out-of-sample data is the classic textbook approach, however, I always wondered if it was really the most appropriate one.
Let's start from the assumption that every system works best only during a certain time window. The market evolves with time, opportunities come and go, and market participants and structure change. Outside of those boundaries, performance inevitably degrades.
Maybe you have a good system that could make money now, but what if your out-of-sample is exactly a period of poor performance? Wouldn't it make more sense to train your parameters only on the most recent time frames?
I also use an in-sample and out-of-sample method, but in my case, I use a population of 50 stocks (picked so that there is a variety of small caps, mid caps, big caps, growth, value, etc.) to run a standard backtest, when I find something promising I backtest on a bigger basket of 500 stocks.
The time frame to choose, however, up to this day is something I'm really unsure about.
Curious to hear everyone's thoughts about it.