Is the smartest way to parallelize this ARIMA function within R? Only for Windows? Use quantstart and backtest R packages?

(Last Updated On: August 28, 2012)

Is the smartest way to parallelize this ARIMA function within R? Only for Windows? Use quantstart and backtest R packages?

This came from

I don’t think this is the most intelligent way to parallelize this. Comment on what you think!


The easiest probably would be to use the multicore package (linux) on
one machine, but if you’re feeling ambitious, there’s also the
possibility of using doSNOW, but there’s some small idosyncracies that
will leave you (or at least it did for me) pulling your hair out trying
to figure out why certain things aren’t working.

If you’re on Windows only, another single box solution would be the
“doSMP” and “foreach” packages that were released by Revolution into CRAN.

here’s a short example of how I use it on Windows (I have a more
complicated multiple computer script buried somewhere using doSNOW on


clust <- startWorkers(4)

symbols = c(“SPX”,”DIA”,”QQQQ”)

# the function that you want to parallelize, gets exported to each
“node” — could insert your backtest code here
parallel.arima <- function(data) {
tmp = get(data)
fit = auto.arima(ts(Cl(tmp)), approximation=TRUE, allowdrift=TRUE,

res <- foreach(dat=symbols, .export=symbols) %dopar% parallel.arima(dat))

There’s more info on the r-sig-hpc list regarding some of the finer
details of the packages mentioned above. Standard disclaimer, this
probably isn’t the “best” way to do it but it should give you some idea
of where to start.


On 06/24/2011 07:00 AM, benjamin sigel wrote:
> Hi, > > I would like to run multiple backtests with R on intraday data, using > “quantstrat” and “backtest package” and I was wondering what would be the > most time efficient hardware solution between these two: > > – 1 PC: *1 Quad-Core* (Intel® Core™ i5-2300, 2.8 GHz (up to 3.1 GHz with > Turbo Boost) /6GB installed DDR3 RAM (1066 MHz) + *16GB maximum RAM capacity > * > > OR > > – *2 PC’s Hooked-up:* 2 Dual-core (Intel® Core™ i3-550 Processor, 3.20 GHz, > 4 MB Smart Cache, 4GB DDR3 + *maximum expandable memory 16GB* *each* > > Many Thanks for your help, > > Ben

This entry was posted in R and tagged , , , , , , , , on by .

About Bryan D

I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties:C++, Java, C#, quant, models, strategies, technical analysis, linux, windows