Skip to content
Prev 14180 / 15274 Next

Parallelizing applyStrategy to multiple symbols

Hi Frank,

I just thought of an idea based on your suggestion. Instead of trying to implement a foreach loop, I will try to subset my symbol set into different R sessions with the create a new r session option in Rstudio and then run each subset on a different session with the default call to applyStrategy. I think this is what you were suggesting or I might have understood it incorrectly. 

Hi Brian,
 My understanding of parallelization wasnt enough to grasp all of your reply, but I am not planning on doing rebalancing or testing any strategy that need to "talk" to other threads. Each symbol is backtested on its own withiut any input or output to and from other symbols' backtest. Would my idea suggested above work in this case? I think I explained my problem inadequately; the time of completion of a single symbol's backtest is not the issue but the sequential computing of each symbol's backtest and consequently, linearly increasing completion time of all symbols' backtest is the main issue. I just want to divide each symbol's applyStrategy call to each CPU my laptop has to speed up the process. Like apply.paramset but not for each parameter combination, for each symbol. I hope I have explained better. 

Thanks for the help.

Best,

Atakan Okan