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.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/zipline-algorithmic-trading-backtester/check). Click a policy:
Consume Zipline — Algorithmic Trading Backtester programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/zipline-algorithmic-trading-backtester
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/zipline-algorithmic-trading-backtester/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add zipline-algorithmic-trading-backtester
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/zipline-algorithmic-trading-backtester/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "zipline-algorithmic-trading-backtester" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.