Posted Monday February 09 2015

Hi,
I'm trying to figure out how to capture optimization results for review, analysis, and reporting outside of RE.
Doing some rough testing with a plugin, I can capture all the data but the plugin only gets called when you manually click on a row in the Optimization Results tab that shows after the optimization is done. So clicking each possible run's entry is not really a practical way to capture the data.
Another route would be to load the results from the output files that RE generates automatically, but I haven't found any documentation on the structure of those.
Any other ideas/suggestions on the best route to capture results data?
thanks, steve

Posted Monday February 09 2015

Hi Steve,
You can use the SystemResults.Load() method to load the system results from a file (like the ones generated during optimization).
You could also write your own optimization plugin or modify the existing ones. The source code is under Samples\RightEdgePlugins\Optimization in the RightEdge app data folder.
Thanks, Daniel

Posted Saturday March 07 2015

I've dug into loading the system results files, and that all seems fine.
Is there any way when running optimizations to force the statistics to be calculated on a daily basis instead of over the entire date range that an optimization is being run for? For example, I'd like to see the max drawdown (and other stats) on a daily basis instead of just the worst drawdown for the entire optimization period.
Obviously I could run 1 day at a time, but that's not going to be practical.
thanks, Steve

Posted Monday March 09 2015

A lot of the statistics are available on a per bar basis. Have a look at SystemData.SystemStatistics.BarStats. That's a list of BarStatistic objects for each bar in the simulation. Does that help? Thanks, Daniel

Posted Tuesday March 10 2015

Yes, I'm looking at the BarStatistic. However, at least the stats I'm interested in like max drawdown are working on a cumulative basis over the entire period an optimization is run for. That makes sense, but of course I'm trying to get the value on a per day basis. The value on the bar statistic is the worst since the starting date and not the worst for each date individually.
Is there any way to force a reset of statistics say when I detect the first new bar for a new day?
thanks, Steve

Posted Wednesday March 11 2015

The DrawDown property of BarStatistic will be the drawdown at the end of each bar. You can look at the max value of that property over a range of bars to find the max drawdown during that time.
Thanks, Daniel

Posted Wednesday March 11 2015

But the max drawdown for any day is reflecting the max value since the start of the optimization. So on day 1 if you have a $1000 max drawdown, the max drawdown stat for all subsequent days is 1000 until a larger one occurs.
Is there any way to force the statistics to reset once I've detected a new day starting?
thanks, Steve

Posted Thursday March 12 2015

There's a MaxDrawDown property which is the max drawdown since the start of the simulation, but there's also a DrawDown property which is just the drawdown for that individual bar. So it sounds like you're just looking for the DrawDown property instead of the MaxDrawDown.
Does that help?
There's not a supported way to make the statistics reset. You might be able to write to the values in the BarStatistic objects during the simulation, but they might get out of sync with each other or the rest of the simulation so there's no guarantee that things would work correctly.
Thanks, Daniel

Posted Thursday March 12 2015

I think I'm going to just wire in my own logic to capture the stats I'm after.
thanks for the help & insights!
Steve
