Profile Picture

Backtests are very Slow

Posted By gregoryj 7 Years Ago
Message
Posted Wednesday February 10 2010
I am backtesting 1 year of Bar Data for approx 2000 symbols. Using EMA and MACD indicators only and very few calculations.
The backtest is taking about 20 minutes to run. My comparison for speed is Tradery.com where the same system/symbols takes < 3 mins.

Are there any measures I can take to improve this performance?
Posted Wednesday February 10 2010
If you don't need separate ticks for the OHLC values, you can put the following line in your startup:
SystemData.CreateTicksFromBars = false;

This will speed things up a bit.

Also, just to make sure that your system logic isn't slowing down the simulation, you can try running an empty system over the same symbol set.

Thanks,
Daniel
Posted Wednesday February 10 2010
I have attempted both of your suggestions. The CreateTicksFromBars = false did not seem to help much, and even running on an empty system it took quite a while. This is probably the main thing holding me back from purchase. Love everything else.
Posted Wednesday February 10 2010
Seems to be faster now for whatever reason....not sure what i did. Does the symbol data cache?
Posted Thursday February 11 2010
No, it does not. If you're using the binary store, it is file based and it's possible Windows may be caching the reads. Did you limit the number of bars, by chance?

gregoryj (2/10/2010)
Seems to be faster now for whatever reason....not sure what i did. Does the symbol data cache?
Posted Thursday February 11 2010
No, but what i did notice was that my memory creeped up to 5.8gb and I have 6gb. I had 2 VMs running, so i shut them down. Once the memory was free, the backtest started cranking again.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems