QuantRocket logo
Disclaimer


Quant Finance Lectures (adapted Quantopian Lectures) › Data Collection


Collect Sharadar fundamentals¶

Collect the full US fundamentals dataset from Sharadar by running the following function:

In [1]:
from quantrocket.fundamental import collect_sharadar_fundamentals
collect_sharadar_fundamentals(country="US")
Out[1]:
{'status': 'the fundamental data will be collected asynchronously'}

This runs in the background, monitor flightlog for a completion message:

quantrocket.fundamental: INFO Collecting Sharadar US fundamentals
quantrocket.fundamental: INFO Collecting updated Sharadar US securities listings
quantrocket.fundamental: INFO Finished collecting Sharadar US fundamentals

Collect Sharadar bundle¶

To collect daily prices from Sharadar, create the Sharadar bundle:

In [2]:
from quantrocket.zipline import create_sharadar_bundle
create_sharadar_bundle("sharadar-1d")
Out[2]:
{'status': 'success', 'msg': 'successfully created sharadar-1d bundle'}

Then ingest the data:

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

Monitor flightlog for a completion message:

quantrocket.zipline: INFO [sharadar-1d] Ingesting daily bars for sharadar-1d bundle
quantrocket.zipline: INFO [sharadar-1d] Ingesting adjustments for sharadar-1d bundle
quantrocket.zipline: INFO [sharadar-1d] Ingesting assets for sharadar-1d bundle
quantrocket.zipline: INFO [sharadar-1d] Completed ingesting data for sharadar-1d bundle

First Lecture: Introduction to Notebooks

Back to Introduction