Profile Picture

Trouble implementing k-fold cross validation

Posted By alexkopy 6 Years Ago
Posted Thursday October 13 2011
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?
Posted Thursday October 13 2011
There are three fields in SystemRunSettings that control the simulation dates:


So EndDate is what you are looking for. You may also want to set DataStartDate to some date before TradeStartDate so your system can have enough historical information to actually start trading on TradeStartDate.

Posted Thursday October 13 2011
I'm sorry, I can't believe I overlooked the EndDate field... I was just so focused on finding the corresponding field name to TradeStartDate, that I've missed a slightly differently named one.

As a sign of contrition I will now run a full optimization run with multithreading optimizations disabled and watch it the whole time.

Similar Topics

Reading This Topic

2005-2017 © RightEdge Systems