BackTrader as a Time-Based Alternative to Quantstrat
Summary
The document discusses choosing a Python backtesting framework for a team familiar with Quantstrat, especially one interested in granular data, parameter sweeps, and futures. The response recommends BackTrader as a complementary research tool, emphasizing that its time-based design differs from Quantstrat’s signal-based approach. That difference may broaden how researchers structure experiments rather than reproduce the same workflow.
The answer points to BackTrader’s indicator library, open-source code, extensibility with Python, and ability to work with user-defined data structures. It characterizes the framework as feature-rich and relatively approachable to inspect and debug. Caveats include community maintenance after the original author’s departure and limited supporting resources. The response is a personal recommendation, not a comparative benchmark; it does not substantiate its suitability for vectorized parameter sweeps or detail how futures are supported.
Key ideas
- BackTrader is presented as a time-based framework, unlike Quantstrat’s signal-based design.
- Using a different framework may diversify research methods rather than duplicate an existing workflow.
- The response highlights built-in indicators, open-source code, and extensibility through Python.
- Community maintenance and limited documentation are noted as drawbacks.
- The recommendation does not provide benchmarks or establish vectorization and futures capabilities in detail.
Tags
Full text
# Python Backtesting Framework Similar to Quantstrat # Python Backtesting Framework Similar to Quantstrat I use Quantstrat heavily for strategy research and optimisation. I have two Python developers about to join my team and would like to use it as an opportunity to diversify our research tools so we are not as reliant upon one framework. Which of the plethora of python backtesting Frameworks is most similar to Quantstrat in terms of strategy design (Indicators, Signals, Rules), preferably vectorised as were mainly dealing with granular data and running multiple parameter sweeps, and also fully supports futures? ## Answer by stevel (score 1) https://quant.stackexchange.com/a/71336 I wonder if I can make an attempt to answer your question based on a small tweak of your requirement. The short answer is that I'd recommend BackTrader. Instead of being "most similar" to Quantstrat, I think BackTrader is different enough to serve your purpose of diversifying your research tools. I assume you meant to use the extra resources and try out whatever else is out there. So it may be beneficial that different tools bring different approaches. The biggest and obvious difference is that instead of being a signal based framework, BackTrader is a time based framework. I think as an experimentation project, such exposure may expand your thinking in various different ways. The platform comes with a large number of indicators (including TA-LIB), and it is also fully open source (similar to Quantstrat in this regard). The code is very well written and easy to understand and debug. It is also very extensible with Python code and whatever Python library you can get your hands on, and whatever Python data structure you care to define. A big down-side to this platform is that the original author has gone onto greener pastures and the code is now being maintained by the community. There does not seems to be a lot of resources on it. But the platform itself is simple and feature rich enough, I personally have been able to just look at the code get whatever problems/issues resolved. Hope this helps. P.S. OMG cannot believe I didn't notice the question was asked so many years ago. It popped up today in the "unanswered questions queue". Oh well, hope this might help someone.
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.