2022-06-05    Share on: Twitter | Facebook | HackerNews | Reddit

Lesser Known Backtesting Libraries

This article presents a set of lesser-known but interesting libraries that can be used for backtesting trading strategies and trading algorithms in general.

This article describes lesser-known python libraries/scripts that can be used for backtesting. Here is a list of the most popular backtesting libraries that are excluded from the scope of this article. Actively developed libraries are in the top of the list.


github stars shield commit-activity

Bt framework allows you to easily create strategies that mix and match different Algos. It aims to foster the creation of easily testable, re-usable and flexible blocks of strategy logic to facilitate the rapid development of complex trading strategies.

The goal: to save quants from re-inventing the wheel and let them focus on the important part of the job - strategy development.

To recognise potential of this tool look at the quick example provided by authors The one of the interesting things that this library offers is tree structure of strategies - support for creative combining strategies. The other reading focuses of composing optimal portfolio: Flexible Backtesting with BT. Introducing bt — the open-sourced… | by Richard L | Medium NOTE: at the time of writing, Bt is in alpha stage


github stars shield commit-activity

AutoTrader - A Python-based development platform for automated trading systems - from backtesting to optimization to live-trading. AutoTrader is a Python-based platform intended to help in the development, optimization, and deployment of automated trading systems.


Blueshift is to some extend free but not open source. You can research your ideas, backtest them, and take your strategies live with a broker of your choice on Blueshift. Blueshift helps you turn your ideas in to trading strategies. Research and backtesting on the platform are free. Live strategy deployment is also free for a limited period.


github stars shield commit-activity

Certis A Backtesting Engine. If you want to learn about the architecture of backtesting software you can definitely peek into Certis repository


github stars shield commit-activity

Epymetheus is a multi-asset backtesting framework. It features an intuitive user API that lets analysts try out their trade strategies right away.


github stars shield commit-activity

DeepCrypto Rapid Backtesting via Numba Simple & Vectorized trading strategy maker built-in live trading features.


github stars shield commit-activity

TradingGym is a toolkit for training and backtesting reinforcement learning algorithms. This was inspired by OpenAI Gym and imitated the framework form. Not only trading env but also has backtesting and in the future will implement real-time trading env with Interactive Broker API and so on. This training environment originally designs for tick-data, but also supports for OHLC data format.


github stars shield

vartests is a Python library to perform some statistical tests to evaluate Value at Risk (VaR) Models.


github stars shield commit-activity

backtesting-for-cryptocurrency-trading - you can use this simple crypto backtesting script to ensure your trading strategy is successful. Minimal setup required and works well with static TP and SL strategies. Trailing Stop Loss could improve profitability if added.

You can use this to determine how profitable your Binance Volatility bot is.

Trade Engine

github stars shield

Trade Engine - a library for demo trading or backtest and forward test simulation.


github stars shield

TradzQAI - Trading environment for RL agents, backtesting and training.

Stock Analysis Engine

github stars shield commit-activity

Stock Analysis Engine. Build and tune investment algorithms for use with artificial intelligence (deep neural networks) with a distributed stack for running backtests using live pricing data on publicly traded companies with automated data feeds from: IEX Cloud, Tradier and FinViz (includes: pricing, options, news, dividends, daily, intraday, screeners, statistics, financials, earnings, and more).


github stars shield commit-activity

BTGym. Scalable event-driven RL-friendly backtesting library. Build on top of Backtrader with OpenAI Gym environment API.


github stars shield commit-activity

BakTst_Org is a prototype of the backtesting system used for BTC quantitative trading.


github stars shield commit-activity

Stock-Portfolio-Backtester Efficient way to backtest optimized portfolio allocations for proper hedging techniques.


github stars shield commit-activity QSTrader is a free Python-based open-source modular schedule-driven backtesting framework for long-short equities and ETF-based systematic trading strategies.


github stars shield commit-activity gemini - Backtesting for sleepless cryptocurrency markets

Closing Thoughts

I would like to look closer at Epymetheus


Heading photo from unsplash authored by regularguy.eth

Any comments or suggestions? Let me know.

To cite this article:

    author  = {Krystian Safjan},
    title   = {Lesser Known Backtesting Libraries},
    journal = {Krystian's Safjan Blog},
    year    = {2022},