Maintained AlgoGP bridge

Zipline Reloaded guide

If you learned on Quantopian, Zipline Reloaded keeps that workflow alive with modern Python and pandas.

Last reviewed · Also known as Zipline, Quantopian Zipline, zipline pipeline

Quick answer

Zipline Reloaded is the community-maintained continuation of Quantopian’s Zipline, kept current by Stefan Jansen (author of Machine Learning for Algorithmic Trading). Algorithms define initialize and handle_data, read data from ingested bundles, and can use the Pipeline API for cross-sectional factor screens. It focuses on US equities backtesting rather than live trading.

Zipline Reloaded at a glance

Category
Backtest + live trading engines
Language
Python
License
Apache-2.0
Does
Backtesting, Performance analytics
Markets
Stocks, ETFs, Futures
Best for
Cross-sectional US equity research with factor pipelines, especially alongside Alphalens and pyfolio.
In AlgoGP
Built-in bridge: add it to any project

Pick it if

Cross-sectional US equity research with factor pipelines, especially alongside Alphalens and pyfolio.

Watch out for

Data must be ingested into bundles first (csvdir or vendor bundles).

Zipline Reloaded strengths and limitations

Strengths

  • Pipeline API for universe screens and factor computation.
  • Realistic slippage, commission and trading-calendar handling.
  • Pairs naturally with Alphalens Reloaded and pyfolio-reloaded.

Limitations

  • Data must be ingested into bundles first (csvdir or vendor bundles).
  • No built-in live trading.
  • Equity-centric; futures support is limited.

Zipline Reloaded example

pip install zipline-reloaded
Install
from zipline.api import order_target_percent, symbol

def initialize(context):
    context.asset = symbol("SPY")

def handle_data(context, data):
    prices = data.history(context.asset, "price", 200, "1d")
    target = 1.0 if prices.iloc[-1] > prices.mean() else 0.0
    order_target_percent(context.asset, target)
Buy-and-hold with a 200-day trend filter.

Use Zipline Reloaded with AlgoGP

AlgoGP has a built-in Zipline Reloaded bridge. Describe the strategy to the copilot and backtest it in AlgoGP, then open the project’s APIs & keys tab and add Zipline Reloaded under Frameworks. The project gains these files, saved as a new version and included in every export:

  • frameworks/algogp_bridge.py
  • frameworks/tests/test_bridge.py
  • frameworks/zipline_algorithm.py
  • requirements.txt gains: zipline-reloaded
zipline run -f frameworks/zipline_algorithm.py -b <bundle> --start 2020-1-1 --end 2024-1-1
Run the AlgoGP strategy with Zipline Reloaded.

Zipline Reloaded connects to Nasdaq Data Link, Massive (Polygon.io), Norgate Data. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.

Zipline Reloaded: frequently asked questions

Is Zipline still maintained?

The original is not; zipline-reloaded is actively maintained and installable with pip or conda.

Can Zipline trade live?

Not out of the box; community projects add brokers, but most use it for research.

Zipline Reloaded alternatives

Independent guide. AlgoGP is not affiliated with Zipline Reloaded. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.

Build a strategy