I am learning R, and want to start using a backtester. I have spent about a day reading all I can about R backtesters, and it seems there are 2 main contenders:

  1. quantstrat, which uses the packages blotter and FinancialInstrument, and
  2. Systematic Investor Toolbox by Michael Kapler.

For anyone who has experience with either of these, can you tell me if they have done everything you expected.

[Edit] To clarify: I am writing some R code that needs to use a backtester, and from my research quantstrat and SIT are the 2 main contenders.

I am not looking for a religious debate a la Python/R :) but rather whether there is a general consensus as to which is more widely used, which is richer feature-wise, or whether both are worthy contenders.

  • 2
    $\begingroup$ Welcome to quant.SE! Could you specify your question a bit regarding what exactly you want to do? Do you have some doubts there are mistakes in the source code after trying to conduct your own investigation? $\endgroup$ Jan 25, 2016 at 8:27
  • $\begingroup$ I've modified my original post in an attempt to clarify. $\endgroup$
    – Adam Crypt
    Jan 27, 2016 at 9:55
  • 1
    $\begingroup$ Its late but I will leave a comment. I have tried both quantstrat and SIT. As a novice R programmer for me both were hard to learn but after many tries I was able to work with SIT using its sample code but quantstrat is a failure. I think quantstrat is made for a professional quant trader whereas SIT for everyone. $\endgroup$
    – Eka
    Aug 11, 2016 at 10:22

2 Answers 2


While I've never used SIT, I have used quantstrat quite a bit and can attest to its strength. It has a solid developer community backing it (7 contributors on Github), is part of the TradeAnalytics project on R-Forge, and while it's still technically in beta, it should provide plenty of functionality. There is admittedly a pretty steep learning curve when you're first learning how to use it, but once you learn how to set things up it will manage portfolios and handle accounting rather gracefully. It has good documentation surrounding it with some solid examples to help get you going (see the QuantStrat TradeR blog). If speed is a priority, quantstrat can also make use of parallel processing functionality, though your mileage may vary depending on operating system.

Taking a look into SIT, it appears that it's mostly a tool built around a specific developer's needs/preferences, and might be slightly less mature at this stage. The documentation seems mostly limited to the SIT blog, and the author looks like the only project contributor on Github. Having not used it in practice, I can't speak directly to its strengths/weaknesses, but I get the subjective impression that quantstrat might currently be the more robust option of the two.

  • $\begingroup$ Where do you get a simple introductory example for quantstrat? $\endgroup$
    – vonjd
    Jan 27, 2016 at 6:33
  • 2
    $\begingroup$ The resource I've found most helpful has been the Quantstrat Trader blog. This is the first in a series of articles meant to provide a detailed tutorial to get you acquainted with how the package works. Making your way through that series should definitely get you on the right track. Additionally, there are some code demos that come bundled with the package when you install it if that's more your style. $\endgroup$
    – Jacob Amos
    Jan 27, 2016 at 15:34

I've never used QuantStrat, but have used SIT for about two years. Michael's blog provides a great way to learn R, understand SIT, and learn about backtesting strategies. I've never found a mistake in his code, and that's how I made a living for 20+ years. It takes some real persistence to understand how to use it in depth, but you can easily set up tests by just copying and modifying one of Michael's own backtest stubs. Michael seems to have tapered off blogging recently, as has David Varadi, whose strategies Michael often tested. Still, I highly recommend it as a full featured tool that supports universe selection, top n selection, numerous weighting schemes, commissions, various rebalancing periods, leverage use, etc., all customizable and extensible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.