Zipline — Algorithmic Trading Backtester
The Pythonic, event-driven algorithmic trading library that powered Quantopian, for backtesting and researching quantitative strategies.
Zipline
Zipline is a widely used, event-driven Python library for backtesting quantitative trading strategies. Originally built to power the Quantopian research platform, it simulates realistic order execution with slippage and commission models, corporate-action adjustments, and a survivorship-aware data model, so strategies are tested close to how they would trade live.
Key features
- Event-driven engine designed to avoid look-ahead bias in backtests
- Pipeline API for expressing cross-sectional factor computations
- Realistic slippage, commission, and transaction-cost modeling
- Deep pandas integration and benchmark support out of the box
- The most recognized open-source Python backtesting framework (20k+ stars)
A strategy defines initialize and handle_data functions; Zipline feeds it historical bars, executes simulated orders, and returns a performance record for analysis (for example with pyfolio).
Curated mirror of the open-source Zipline (Apache-2.0). Get it from the source.