2022-02-11    Share on: Twitter | Facebook | HackerNews | Reddit

Most Popular Python Backtesting Libraries

Here is a list of the most popular (popularity measured by the number of GitHub stars) backtesting libraries related to Python ecosystem.

backtrader

github stars shield commit-activity backtrader is in the first position because it is a mature, battle-field-tested framework. It is very likely that you will find a solution to your problem related to backtrader on the internet or on a dedicated community page.

NOTE: The last release (1.9.74.123 ) was on 30 May 2019. There are PRs (mainly with fixes) accepted. The software reached a high level of maturity and new features seem to be not added.

Lean

github stars shield commit-activity Lean is actively developed, and related to QuantConnect platform.

Jesse

github stars shield commit-activity According to the authors: [Jesse](https://github.com/jesse-ai/jesse](https://github.com/jesse-ai/jesse) is more accurate than other solutions, and way more simple. In fact, it is so simple that in case you already know Python, you can get started today, in a matter of minutes, instead of weeks and months.

PyAlgoTrade

github stars shield commit-activity PyAlgoTrade

vectorbt

github stars shield commit-activity

With vectorbt you will find your trading edge, using the fastest engine for backtesting, algorithmic trading, and research. Optimized for speed - using matrix computations (NumPy) + acceleration of NumPy with Numba. Since it is fast when compared to other libraries, therefore it will be useful for:

  • optimization (fast evaluation of the given set of parameters)
  • large-scale sweeping of parameter space and visualizing as 2D heat map or 3D volume plot.

There is also a paid version, which is refactored with multiple enhancements over the free version. The free version is maintained but no new features are added by the author:

Yes, I still do smaller bug fixes and merge pull requests. But I won't develop any new features, everything is coming to vbt pro. (from: Issue #431)

vectorbt pro

A paid, proprietary, version of the vectorbt. See the features of vectorbt pro here.

backtesting.py

github stars shield commit-activity

backtesting.py - Backtest trading strategies with Python.

finmarketpy

github stars shield commit-activity

finmarketpy is a Python-based library that enables you to analyze market data and also backtest trading strategies using a simple-to-use API, which has prebuilt templates for you to define backtest. Included in the library

fastquant

github stars shield commit-activity

Bringing backtesting to the mainstream - fastquant allows you to easily backtest investment strategies with as few as 3 lines of python code. Its goal is to promote data-driven investments by making quantitative analysis in finance accessible to everyone.

zipline

github stars shield commit-activity

zipline - despite its large popularity, it was put at the end of the list because it is not maintained anymore. However, the community took-over the project and created a fork that is being maintained and developed.

zipline-reloaded

github stars shield commit-activity zipline-reloaded is a community fork of zipline.

See also: Lesser Known Backtesting Libraries

Lesser Known Backtesting Libraries Backtesting