Comparing Quantstrat and SIT for R Strategy Backtesting
Summary
The document compares two R backtesting options: Quantstrat, which works with related portfolio and financial-instrument packages, and the Systematic Investor Toolbox (SIT). It does not provide a formal benchmark; instead, it collects user impressions about maturity, learning resources, feature coverage, and extensibility.
One Quantstrat user describes portfolio management, accounting, examples, community support, and possible parallel processing, while noting a steep learning curve and beta status at the time of the discussion. A long-time SIT user praises its strategy examples and lists support for universe and top-n selection, weighting schemes, commissions, rebalancing, and leverage. Both users report that learning either tool takes persistence. The evidence is anecdotal and may reflect the projects’ state when the answers were written. One respondent had not used SIT, and the other had not used Quantstrat, so the exchange cannot establish which is more widely adopted, faster, or better for a particular strategy.
Key ideas
- Quantstrat is described as supporting portfolio management, accounting, documentation, and parallel processing.
- SIT is described as offering universe selection, weighting, commissions, rebalancing, and leverage features.
- Both tools may require substantial effort to learn in depth.
- The comparison relies on individual users’ experience rather than controlled tests.
- Check current project activity and documentation before choosing a backtesting framework.
Tags
Full text
# R Backtesters: Quantstrat vs SIT # R Backtesters: Quantstrat vs SIT 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: - quantstrat, which uses the packages blotter and FinancialInstrument, and - 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. ## Answer by Jacob Amos (score 6, accepted) https://quant.stackexchange.com/a/22938 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. ## Answer by Sid Johnson (score 4) https://quant.stackexchange.com/a/27998 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.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.