Zipline - A Pythonic Algorithmic Trading Library

  •        947

Zipline is a Pythonic algorithmic trading library. It is an event-driven system that supports both backtesting and live-trading. Zipline is currently used in production as the backtesting and live-trading engine powering Quantopian -- a free, community-centered, hosted platform for building and executing trading strategies.Note: Installing Zipline via pip is slightly more involved than the average Python package. Simply running pip install zipline will likely fail if you've never installed any scientific Python packages before.

  • Ease of use: Zipline tries to get out of your way so that you can focus on algorithm development. See below for a code example.
  • Zipline comes "batteries included" as many common statistics like moving average and linear regression can be readily accessed from within a user-written algorithm.
  • Input of historical data and output of performance statistics are based on Pandas DataFrames to integrate nicely into the existing PyData eco-system.
  • Statistic and machine learning libraries like matplotlib, scipy, statsmodels, and sklearn support development, analysis, and visualization of state-of-the-art trading systems.



Related Projects

NowTrade - Algorithmic trading library with a focus on creating powerful strategies

  •    Python

NowTrade is an algorithmic trading library with a focus on creating powerful strategies using easily-readable and simple Python code. With the help of NowTrade, full blown stock/currency trading strategies, harnessing the power of machine learning, can be implemented with few lines of code. NowTrade strategies are not event driven like most other algorithmic trading libraries available. The strategies are implemented in a sequential manner (one line at a time) without worrying about events, callbacks, or object overloading.

financial-analysis-python-tutorial - Financial Analysis in Python tutorial


You can view the video of the talk here. Thomas Wiecki is a Quantitative Researcher at Quantopian Inc -- a Boston based startup providing you with the first browser based algorithmic trading platform -- and a PhD student at Brown University where he studies Computational Cognitive Neuroscience. He specializes in Bayesian Inference, Machine Learning, Scientific Computing in Python, algorithmic trading and Computational Psychiatry.

catalyst - An Algorithmic Trading Library for Crypto-Assets in Python

  •    Python

Catalyst is an algorithmic trading library for crypto-assets written in Python. It allows trading strategies to be easily expressed and backtested against historical data (with daily and minute resolution), providing analytics and insights regarding a particular strategy's performance. Catalyst also supports live-trading of crypto-assets starting with four exchanges (Binance, Bitfinex, Bittrex, and Poloniex) with more being added over time. Catalyst empowers users to share and curate data and build profitable, data-driven investment strategies. Please visit to learn more about Catalyst. Catalyst builds on top of the well-established Zipline project. We did our best to minimize structural changes to the general API to maximize compatibility with existing trading algorithms, developer knowledge, and tutorials. Join us on the Catalyst Forum for questions around Catalyst, algorithmic trading and technical support. We also have a Discord group with the #catalyst_dev and #catalyst_setup dedicated channels.

PyAlgoTrade - Python Algorithmic Trading Library

  •    Python

PyAlgoTrade is a Python Algorithmic Trading Library with focus on backtesting and support for paper-trading and live-trading. Let’s say you have an idea for a trading strategy and you’d like to evaluate it with historical data and see how it behaves. PyAlgoTrade allows you to do so with minimal effort.

alphalens - Performance analysis of predictive (alpha) stock factors

  •    Jupyter

Alphalens is a Python Library for performance analysis of predictive (alpha) stock factors. Alphalens works great with the Zipline open source backtesting library, and Pyfolio which provides performance and risk analysis of financial portfolios.Check out the example notebooks for more on how to read and use the factor tear sheet.

Lean - Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#)

  •    CSharp

Lean Engine is an open-source fully managed C# algorithmic trading engine built for desktop and cloud usage. It was designed in Mono and operates in Windows, Linux and Mac platforms. Lean drives the web based algorithmic trading platform QuantConnect.Handle all messages from the algorithmic trading engine. Decide what should be sent, and where the messages should go. The result processing system can send messages to a local GUI, or the web interface.

StockSharp - Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, bitcoins and options)

  •    CSharp

StockSharp (shortly S#) – are free set of programs for trading at any markets of the world (American, European, Asian, Russian, stocks, futures, options, Bitcoins, forex, etc.). You will be able to trade manually or automated trading (algorithmic trading robots, conventional or HFT).Available connections: FIX/FAST, LMAX, Rithmic, Fusion/Blackwood, Interactive Brokers, OpenECry, Sterling, IQFeed, ITCH, FXCM, QuantHouse, E*Trade, BTCE, BitStamp and many other. Any broker or partner broker (benefits).

Pyfolio - Portfolio and risk analytics in Python

  •    Python

pyfolio is a Python library for performance and risk analysis of financial portfolios developed by Quantopian Inc. It works well with the Zipline open source backtesting library.Also see slides of a talk about pyfolio.

Deep-Trading - Algorithmic trading with deep learning experiments

  •    OpenEdge

Algorithmic trading with deep learning experiments. Now released part one - simple time series forecasting. I plan to implement more sophisticated algorithms and their ensembles with different features, check their performance, train a trading strategy and go live.

Gekko-Strategies - Strategies to Gekko trading bot with backtests results and some useful tools.

  •    Javascript

Gekko Trading Bot. Repository of strategies which I found at Git and Google, orginal source is in README or .js file. Strategies was backtested, results are in backtest_database.csv file. I used ForksScraper and Gekko BacktestTool to create content of this repository.

Clairvoyant - Software designed to identify and monitor social/historical cues for short term stock movement

  •    Python

Using stock historical data, train a supervised learning algorithm with any combination of financial indicators. Rapidly backtest your model for accuracy and simulate investment portfolio performance.During the testing period, the model signals to buy or sell based on its prediction for price movement the following day. By putting your trading algorithm aside and testing for signal accuracy alone, you can rapidly build and test more reliable models.

TechAn - Technical Analysis Library for Golang

  •    Go

TechAn is a technical analysis library for Go! It provides a suite of tools and frameworks to analyze financial data and make trading decisions. Techan is heavily influenced by the great ta4j. It provides Basic and advanced technical analysis indicators, Profit and trade analysis and Strategy building.

CCXT - A JavaScript / Python / PHP cryptocurrency trading library with support for more than 100 bitcoin/altcoin exchanges

  •    Javascript

CCXT – CryptoCurrency eXchange Trading Library. A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. The CCXT library is used to connect and trade with cryptocurrency / altcoin exchanges and payment processing services worldwide. It provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, webshop integration and related software engineering.

Personae - 📈 Personae is a repo of implements and environment of Deep Reinforcement Learning & Supervised Learning for Quantitative Trading

  •    Python

Personae is a repo that implements papers proposed methods in Deep Reinforcement Learning & Supervised Learning and applies them to Financial Market. It will start from 2018-08-24 to 2018-09-01 a timestamp that I successfully found a job.


  •    CSharp

????????? ??? ???????? ??????? -

algo-coin - Algorithmic trading cryptocurrencies across multiple exchanges

  •    Javascript

Algorithmic Trading Bitcoin. Lightweight, extensible program for algorithmically trading cryptocurrencies and derivatives across multiple exchanges.


  •    DotNet

IBCSharp consists of an improved version of Karl Schulze's Interactive Brokers C# API, a WinForms C# algorithmic daytrading program, and a WinForms C# long term trading program.

samaritan - An Algorithmic Trading Framework for Digital Currency.

  •    Go

You can install samaritan from installation package or Docker. Then, samaritan is running at http://localhost:9876.

star - A STock Analysis and Research tool for terminal(cli) users. 技术控和命令行爱好者的 A 股辅助分析工具。

  •    Javascript

A STock Analysis and Research tool for terminal(cli) users. 技术控和命令行爱好者的 A 股辅助分析工具。

Ta4j - Technical Analysis for Java

  •    Java

Ta4j is an open source Java library for technical analysis. It provides the basic components for creation, evaluation and execution of trading strategies. It is a powerful engine for building custom trading strategies. It supports more than 130 technical indicators (Aroon, ATR, moving averages, parabolic SAR, RSI, etc.).