[R-SIG-Finance] Does Quantstrat use C/Fortran to do the computation?

Brian G. Peterson brian at braverock.com
Wed Mar 14 11:12:52 CET 2012


On Wed, 2012-03-14 at 02:23 -0700, hifin wrote:
> I was wondering if any quantstrat's backtesting functionality is fulfilled by
> underlying C/Fortran programs. I asked this because speed is crucial when
> doing intra-day/high-frequency simulation and optimization.
> 
> Thanks for your inputs.

The answer to your question is both yes and no.

The 'yes' part is that quantstrat relies extensively on xts and other R
internals that are (largely) coded in C, and uses vectorization wherever
possible.

quantstrat is also usable on intraday and tick data, with some care.  I
can typically achieve speeds of around 1 minute per cpu-core per
instrument per day on tick data with a path-dependent rule set.  

You can write non-path-dependent backtests in quantstrat, but I don't
think non-path-dependent rule evaluation is particularly realistic.

The 'no' part, which I have written about extensively on this list and
elsewhere (including in the quantstrat documentation), is that the main
rule processing loop, the path dependent part, is written in pure R.
This could change in the future, but won't change soon, for reasons
detailed elsewhere.

Also, both the code and the documentation are available to you, as are
the archives of this list.  Please peruse them so that you can ask a
more specific question in the future.

Regards,

   - Brian


-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list