I am attempting to implement the k-fold cross validation
in my optimization plugin. The technique calls for separation of the historical data into k parts, running optimization on k-1 parts (with possibly different parameters), combining results and validating against the 1 part that was left out of the optimization runs.
Naturally that requires the ability for the optimization plugin to break the historical data into k intervals (the historical data can't be pre-cut, because the intervals are picked randomly every time). In the optimization plugin we get SystemRunSettings parameter to RunOptimization, that has a TradeStartDate field, which lets me do one half of the splitting, but the class doesn't have a corresponding TradeStopDate field. So I can only run optimizations to the end of historical data set and not on a closed interval within it.
Is there an alternative solution that I can use here?