QuantRocket logo
Disclaimer


Pipeline Tutorial › Lesson 1: Data Collection


Data Collection¶

This tutorial uses the US Stock learning bundle, which provides daily prices for all US stocks for the years 2007-2011.

Create an empty bundle called 'usstock-learn-1d':

In [1]:
from quantrocket.zipline import create_usstock_bundle
create_usstock_bundle("usstock-learn-1d", learn=True)
Out[1]:
{'status': 'success', 'msg': 'successfully created usstock-learn-1d bundle'}

Then ingest the data:

In [2]:
from quantrocket.zipline import ingest_bundle
ingest_bundle("usstock-learn-1d")
Out[2]:
{'status': 'the data will be ingested asynchronously'}

This dataset only takes a second or two to load. Use flightlog to confirm completion:

quantrocket.zipline: INFO [usstock-learn-1d] Completed ingesting daily history for all stocks from 2007-2011

Next Lesson: Why Pipeline?