Skip to content
All library documents

Building a Zipline Bundle for Yahoo Daily Data

Article QuantInsti blog

Summary

The article explains how to adapt Zipline’s CSV directory bundle to ingest daily Yahoo Finance files for a chosen market. It presents the bundle as an ETL pipeline: read files, normalize fields and dates, align records with a trading calendar, then write the data into Zipline’s repository. The main customization point is the pricing iterator, where duplicate dates and other source-specific formatting issues can be handled.

The workflow covers registering the bundle, ingesting the data, and selecting it for a backtest. NYSE is used as the example calendar, and the article notes that similar changes can support minute data or other providers. It does not assess data quality, survivorship bias, or adjustment correctness, and it gives no backtest results; it is an implementation guide rather than evidence for a trading strategy.

Key ideas

  • A Zipline bundle translates source files into the format expected by the backtesting data store.
  • The CSV directory bundle can serve as a template for a provider-specific ingestion script.
  • Daily records should be cleaned and aligned to the appropriate market sessions.
  • After registration and ingestion, the new bundle can be selected for a Zipline backtest.
  • The article describes data plumbing and does not evaluate a trading strategy.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.