Repolode
stefan-jansen

stefan-jansen/zipline-reloaded

Pythonic event-driven backtesting library for trading strategies, a community-maintained fork of Quantopian's Zipline.

Open-source alternative to:Quantopian

Stars
2,003
Forks
346
Open issues
0
Last commit
4 days ago

Repolode describes open-source projects and does not give investment advice. Trading and investing can lose money: assess the risk yourself and follow the laws where you live before using this project.

What is it?

Zipline Reloaded is an event-driven Python library for backtesting algorithmic trading strategies. You write an algorithm with initialize and handle_data callbacks, feed it historical price data, and the engine replays the market day by day to produce a performance record. It originated as the backtesting and live-trading engine of the Quantopian platform and is now maintained by Stefan Jansen as a continuation of that codebase.

The library works with Pandas DataFrames for both input data and performance output, so results can be analyzed with the usual PyData tools such as matplotlib, scipy and statsmodels. It includes built-in helpers for common statistics like moving averages and linear regression, and ships a command-line interface for ingesting market data and running backtests. Example strategies, including a dual moving average crossover, are included in the repository.

The maintainers now focus on bug, security and compatibility fixes, and point new projects toward their separate ML4T Backtest library. Installation is available through pip and conda-forge, with a stated Python 3.11 to 3.14 support range and pandas below 3.0.

Key features

  • 01Event-driven backtesting where strategies react to each market bar through callbacks.
  • 02Pandas DataFrame based data input and performance output.
  • 03Built-in helpers for common statistics such as moving averages and linear regression.
  • 04Command-line tools for ingesting market data and running backtests.
  • 05Installable via pip or conda-forge.

Use cases

  • Testing a moving-average crossover or other rule-based equity strategy on historical prices.
  • Evaluating quantitative trading ideas before risking capital.
  • Learning algorithmic trading workflows alongside Python data analysis.

Quick start

  1. 1

    Install zipline-reloaded with pip

    pip install zipline-reloaded
  2. 2

    Set your NASDAQ Data Link API key

    export QUANDL_API_KEY="your_key_here"
  3. 3

    Download market data for the default bundle

    zipline ingest -b quandl
  4. 4

    Run the dual moving average example algorithm

    zipline run -f dual_moving_average.py --start 2014-1-1 --end 2018-1-1 -o dma.pickle --no-benchmark

Things to know

  • Market data ingestion requires a NASDAQ Data Link API key.
  • Python 3.15 is not yet supported and Python 3.14 needs the development source.
  • Pandas must be below version 3.0, and the project is a community fork of the discontinued Quantopian Zipline.
  • New feature development has shifted to ML4T Backtest, and this project is maintained mainly for bug and compatibility fixes.

Topics

FAQ

What is zipline-reloaded?
Pythonic event-driven backtesting library for trading strategies, a community-maintained fork of Quantopian's Zipline. Zipline Reloaded is an event-driven Python library for backtesting algorithmic trading strategies. You write an algorithm with initialize and handle_data callbacks, feed it historical price data, and the engine replays the market day by day to produce a performance record. It originated as the backtesting and live-trading engine of the Quantopian platform and is now maintained by Stefan Jansen as a continuation of that codebase.
Is zipline-reloaded free to use? What license does it have?
zipline-reloaded is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is zipline-reloaded still maintained?
Actively maintained. The last commit to zipline-reloaded was on Nov 2, 2026.
What can I use zipline-reloaded for?
Testing a moving-average crossover or other rule-based equity strategy on historical prices. Evaluating quantitative trading ideas before risking capital. Learning algorithmic trading workflows alongside Python data analysis.
How do I install zipline-reloaded?
Install zipline-reloaded with pip: pip install zipline-reloaded Set your NASDAQ Data Link API key: export QUANDL_API_KEY="your_key_here" Download market data for the default bundle: zipline ingest -b quandl Run the dual moving average example algorithm: zipline run -f dual_moving_average.py --start 2014-1-1 --end 2018-1-1 -o dma.pickle --no-benchmark
Where can I get zipline-reloaded?
The source code and installation instructions are on GitHub: https://github.com/stefan-jansen/zipline-reloaded

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects