Zipline Pipeline Workflow

Maximilian Wimmer
16 min readMar 4, 2023

Learn how to work with the Zipline-Reloaded Pipeline to filter stock data according to factors.

Introduction

On any given trading day the entire universe of stocks consists of thousands of securities. Usually you will not be interested in investing in all the stocks in the entire universe but rather you will likely select only a subset of these to invest. For example you may only want to invest invest in the top 500 securities ranked by some factor. In order to avoid spending a lot of time doing data wrangling to select only the securities you are interested in people often use financial pipelines. In general a pipeline is a placeholder for a series of data operations used to filter and rank data according to some factor or factors.

Zipline Pipeline

Zipline is an open-source algorithmic trading simulator developed by Quantopian. The Quantopian website shut down its service in 2020 the backtesting engine Zipline is still being developed mainly by Stefan Jansen who is trying to keep the library up to date and available to his readers and the wider Python algotrading community. The updated version is named Zipline-Reloaded. It automates the algorithm’s reaction to trade events and provides it with current and historical point-in-time data that avoids look-ahead bias. Zipline works well with its sister libraries alphalens, pyfolio, and empyrical.

Installation Instructions

--

--