QuantRocket logo
Disclaimer


Brain Sentiment Data › Part 1: Data Collection


Data Collection¶

Collect US Stock Daily Bundle¶

This tutorial uses the US Stock daily bundle. First create the bundle:

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

Then ingest the data:

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

Use flightlog to monitor the progress:

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

Collect Brain BLMCF¶

Collect Brain Language Metrics on Company Filings:

In [3]:
from quantrocket.fundamental import collect_brain_blmcf
collect_brain_blmcf()
Out[3]:
{'status': 'the data will be collected asynchronously'}

Use flightlog to monitor for completion:

quantrocket.fundamental: INFO Collecting Brain Language Metrics on Company Filings (BLMCF)
quantrocket.fundamental: INFO Finished collecting Brain Language Metrics on Company Filings (BLMCF)

Collect Brain BLMECT¶

Collect Brain Language Metrics on Earnings Call Transcripts:

In [4]:
from quantrocket.fundamental import collect_brain_blmect
collect_brain_blmect()
Out[4]:
{'status': 'the data will be collected asynchronously'}

Use flightlog to monitor for completion:

quantrocket.fundamental: INFO Collecting Brain Language Metrics on Earnings Call Transcripts (BLMECT)
quantrocket.fundamental: INFO Finished collecting Brain Language Metrics on Earnings Call Transcripts (BLMECT)

Collect Brain BSI¶

Collect Brain Sentiment Indicator:

In [5]:
from quantrocket.fundamental import collect_brain_bsi
collect_brain_bsi()
Out[5]:
{'status': 'the data will be collected asynchronously'}

Use flightlog to monitor for completion:

quantrocket.fundamental: INFO Collecting Brain Sentiment Indicator (BSI)
quantrocket.fundamental: INFO Finished collecting Brain Sentiment Indicator (BSI)

Next Up¶

Part 2: Brain Sentiment Indicator