---
title: "Zipline"
description: "Zipline in Python for backtesting: a quant stack with zipline-reloaded, alphalens and pyfolio, a 60/40 portfolio and data bundle analysis."
url: "https://pythonparatrading.com/en/tag/zipline/"
lang: "en"
image: "https://pythonparatrading.com/og/en/tag/zipline.png"
---

# Zipline

> Zipline for backtesting quantitative strategies in Python.

Zipline is a Python library for event-driven backtesting, developed by Quantopian for research, backtesting and live trading. Since the platform closed, the community has maintained it as zipline-reloaded. It works with data bundles: prices are ingested once, with splits and dividends, and the strategy queries them during the simulation.

The research in this topic builds a quant stack around Zipline. The first tells what Quantopian was, explains the role of zipline-reloaded, alphalens, pyfolio, empyrical and ArcticDB, and runs a minimal backtest: a 60/40 SPY/IEF portfolio with monthly rebalancing. The second reads a data bundle outside the pipeline with DataPortal, analyzes the Kendall correlation and cumulative returns of sector ETFs in pandas and gives a criterion for choosing between Zipline and Backtrader.

## Research (2)

- [Zipline, Backtesting in Python 2: My First Data Analysis](https://pythonparatrading.com/en/backtesting-python-zipline-bundle-2/) · 2023-10-02 — In this second part of the Zipline tutorial, we will perform our first data analysis using bundles and build a basic strategy.
- [Zipline in Python - Part 1: Quant Stack and Pipeline](https://pythonparatrading.com/en/zipline-backtesting-with-python-quant-stack/) · 2023-10-01 — In algorithmic trading there are countless options for carrying out your analyses or backtests, but we are going to use the best quant stack to build a professional research and backtesting pipeline.

[Topics](https://pythonparatrading.com/en/paths/#topics)
