[R-SIG-Finance] Processing time of backtests on a single computer
jerseyfanatic1 at gmail.com
Thu Apr 7 18:30:08 CEST 2016
Thanks for the insight. I did not know variations in processing time of 20
minutes or so could happen between different parameter combinations.
I ran the strategy with the same dataset with random parameters without
Trailing SL, on single core and it took 5.15 minutes. The number of
transactions were 7800. The amount of processing time seems too much
compared to yours though. 5sec data of 3 years vs M5 data of just 1 year;
20 min vs 5 mins.
2016-04-07 16:32 GMT+03:00 Joshua Ulrich <josh.m.ulrich at gmail.com>:
> On Thu, Apr 7, 2016 at 8:10 AM, Jersey Fanatic <jerseyfanatic1 at gmail.com>
> > 10 years of daily data makes about 2500 data points. So extrapolating
> > that to 58000 data points (assuming the relation is linear), it should
> Number of data points is not necessarily a good estimator for run time
> even if the strategies are the same. What matters more is the number
> of timestamps/observations that must be evaluated. That includes
> signals, moving orders, processing fills, etc.
> > about 12.2 secs for a single run with my dataset. For 144 runs (total
> > number of parameter combinations), it should take about 30 mins.
> However, I
> Again, the relationship is not linear. Different parameter
> combinations will produce differing amounts of signals, order
> movement, fills, etc.
> For example, I ran parameter optimization on ~3 years of 5-second
> data. Some parameter combinations took 1-2 minutes, some took >20
> > ran apply.paramset() this morning (without trailing stops), it took 4.5
> > hours. And the code is the one that I sent earlier with Trailing stop
> > enabled=FALSE'd.
> > Did you run the macd demo code with single core? If you did some parallel
> > processing, did you use doSNOW package or something else? Maybe that is
> > reason, I am not sure.
> > Would deleting trailing stop rules speed things up, instead of defining
> > them but setting enabled=FALSE?
> > 2016-04-07 0:34 GMT+03:00 Brian G. Peterson <brian at braverock.com>:
> >> On Wed, 2016-04-06 at 23:58 +0300, Jersey Fanatic wrote:
> >> > I will try running the same code without trailing stops and see what
> >> > effect
> >> > it has on the processing time. I will report back as soon as it is
> >> > finished.
> >> Running the macd demo code over 10 years of daily data on my machine (no
> >> trailing stops) takes 0.5262365 secs for a single run.
> > [[alternative HTML version deleted]]
> > _______________________________________________
> > R-SIG-Finance at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> should go.
> Joshua Ulrich | about.me/joshuaulrich
> FOSS Trading | www.fosstrading.com
> R/Finance 2016 | www.rinfinance.com
[[alternative HTML version deleted]]
More information about the R-SIG-Finance