Control of Data Range from optimizer code (NOT from UI)
Author: MIR
Creation Date: 5/14/2012 7:44 AM
profile picture

MIR

#1
Hello.

Currently I make my custom Optimizer to make walk forward optimization with one click.
So I have a few questions:
1) Is exists any way to set "Data range" from inside Optimizer (ignore Data range UI-settings)?
2) Is exists some way to start several different optimizer instances with different "Data range" settings?
For example 1-st optimizer runs on 2009, 2-nd on 2010, etc.

Thanks.
profile picture

Eugene

#2
Hello,

Looks like you're trying to create a walk-forward optimizer and/or a multi-threaded optimizer? Frankly, you're going to have a hard time implementing either one of these tasks with the current Optimizer API (IMHO).

1) No, it is not possible to affect the optimizer's date range this way - at least directly. As a totally unsupported idea, in the NextRun method you could try modifying the SystemPerformance.Bars object that Wealth-Lab passes to your optimizer, for the next optimization run. You can do it manually by calling Bars.Add/Delete (which is going to be slow), or save your modified Bars to disk and load them with Bars.LoadFromFile on demand.

2) No. The interface is not suitable for parallel optimizations.
profile picture

MIR

#3
I already thought about modifying the SystemPerformance.Bars but it looks like walkaround but not stratightforward way.
I wanted to be sure that there is no other way.

So you answer is quite comprehensive. Thank you very much, Eugene!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).