Please share the entire thread, as my last post is an example of a test being executed when there were no historical segments of market data at all for optimization.
That is obviously an issue but it all stems from the same underlying problem. The module should only optimize or test as the documentation states: "on a historical segment of market data" not a historical segment of time.
That means a trading session.
Regarding partial data, like when there is only one trading session in a 4-day optimization over a 3-day weekend:
A strategy that measures volatility or pretty much any metric over 4 days can not run properly on one or two, or three days' worth of data.
If the three sessions prior to the only one that was used for optimization were very volatile and the fourth wasn't the strategy has no idea that the market was extremely volatile only two trading sessions ago. The optimization pretty much clones the one low volatility day and applies it over the 3 day weekend.
On a three-day weekend with the Monday off using a four-day look back, at no point in the following week will the optimization be performed on the needed four sessions of trading.
Tuesday uses 1, Wednesday uses 1, Thursday 2, and Friday 3.
On a regular week, the only day the strategy has the correct amount of data to analyze to make proper forecasts is Friday.
So given that there are holidays, the strategy will be trading using the required amount of market data to analyze less than 20% of the time.

Comment