Fig. — Zipline flow: bundle, pipeline, algorithm and results (illustrative)

A hands-on series on backtesting with zipline-reloaded, the maintained branch of Zipline, the engine that came from Quantopian. It is written for readers who know Python and pandas and want a research and backtesting setup in Python.

Part 1 starts with a five-minute smoke test: install zipline-reloaded and call run_algorithm on a bundle. It then covers what Quantopian was and the quant stack: ArcticDB for data, zipline-reloaded for backtests, alphalens for factor analysis, and pyfolio and empyrical for reports and ratios. It ends with a pytest test that checks a strategy runs end to end on a known bundle. Part 2 explains what a data bundle contains, loads one, lists its assets, queries prices into pandas, runs a basic strategy with run_algorithm and gives a rule for choosing between Zipline and Backtrader.

The series is still open; two parts are published so far. Together they give a working install, a first backtest and a test that guards it.