Algorithmic trading frameworks for Python#
See also AI and machine learning topics if you are especially looking for AI-based trading solutions.
Trading Strategy#
Trading Strategy is the next generation algorithmic trading protocol for decentralised markets.
It includes
Market data fetch
Backtesting and strategy development framework
Live trade execution
Capital and investor management with smart contract-based vaults
Demeter#
Demeter is a liquidity provision backtest framework for Uniswap, Aave and other decentralised finance protocols.
Demeter allows you to simulate high-frequency trading market making using Python code.
Demeter is good for backtesting
CLMM strategies
Delta hedged strategies (e.g. with Aave)
Gamma hedged strategies (e.g. with decentralised options market places like Aevo or Derive)
Examples of Demeter strategies are available in Trading Strategy’s Getting started repository.
See -Demeter website by Zelos Alpha.
Backtrader#
Backtrader is no longer maintained.
Backtrader is one of the oldest and most popular Python based backtesting frameworks. It supports live trading. Direct support for Jupyter notebooks. Read more on BackTrader.
QsTrader#
QsTrader is no longer maintained.
QsTrader is a portfolio optimisation backtesting framework for Python. It originally focused on ETFs and stock. Read more on QsTrader.
Fastquant#
FastQuant is no longer maintained.
A simplified one-liner backtesting solution built on the top of Backtrader. Read more.
Zipline Reloaded#
Continued work of the famous ZipLine library that was created by now defunctional Quantopian. Read more.
AlphaPy#
AlphaPy is a machine learning framework for both speculators and data scientists. It is written in Python mainly with the scikit-learn and pandas libraries, as well as many other helpful packages for feature engineering and visualization. Read more.
bt#
bt is a flexible backtesting framework for Python used to test quantitative trading strategies. The 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. Read more.
AlphaLens#
Alpha factor library for ZipLine. Read more.
PyFolio#
Performance and risk analysis for portfolios. Read more.
PyAlgoTrade#
Was originally written for Bitstamp. Offers backtesting, paper trading, live trading. Looks abandoned now. Read more.
LEAN#
Lean Engine is an open-source algorithmic trading engine built for easy strategy research, backtesting and live trading. We integrate with common data providers and brokerages so you can quickly deploy algorithmic trading strategies.
The core of the LEAN Engine is written in C#; but it operates seamlessly on Linux, Mac and Windows operating systems. It supports algorithms written in Python 3.8 or C#. Lean drives the web-based algorithmic trading platform QuantConnect.
FreqTrade#
Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram or webUI. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.
Gekko#
Gekko is no longer maintainer.
Gekko is an open source platform for automating trading strategies over bitcoin markets.