quantlab.dataset.massive.news.MassiveNewsDataset#
- class quantlab.dataset.massive.news.MassiveNewsDataset(config)[source]#
Bases:
MassiveRestEventPanelDaily panel of Massive’s news counts and sentiment labels, by permaticker.
See the module docstring for the variables and the placement.
- Parameters:
- dataset_configMassiveNewsConfig
Sharadar’s raw tier (calendar, universe), Massive’s raw tier and the Ticker map.
Examples
With
configas in the module example:ds = MassiveNewsDataset(config).update() list(ds.panel("2024-01-02", "2024-01-05").data_vars) # ['news_count', 'news_positive', 'news_negative', 'news_neutral']
- EARLIEST = datetime.date(2016, 6, 1)#
The latest first day of the endpoints read (
MassiveRestPanel.EARLIEST).
- FILL_VALUE = 0.0#
A day without an article counts 0.
- REST_ENDPOINTS = ('news',)#
The REST endpoints read (
MassiveRestPanel).
- STORE_NAME = 'massive_news_1d'#
The store folder under
market/massive(MassiveRestPanel.from_data_root).
- STORE_README = '# massive_news_1d\n\nMassive\'s news articles (its REST `/v2/reference/news`) counted per security and trading day, on\nSharadar\'s permaticker axis and SEP\'s trading calendar, the whole market\'s domestic common stock\n(SEP\'s default category filter). Variables, 0 on a day without an article: `news_count`\n(articles naming the security), and `news_positive`, `news_negative`, `news_neutral` (those\nwhose per-ticker `insights` sentiment for the security is that label). An article counts on the\ntrading day it was published before that session\'s close in New York (16:00, 13:00 on an early\nclose), otherwise on the next trading day (after the close, on a weekend or holiday).\n\nEach of an article\'s tickers is placed on the permaticker the Ticker map gives it on the\narticle\'s trading day, and the article counts once for each security placed; a ticker the map\ncannot place is left out and counted in `massive_news_1d.zarr.unplaced.json`. The article text\n(title, description, keywords, insights) stays raw under `downloads/massive/rest/news`. Built by\n`quantlab.dataset.massive.news.MassiveNewsDataset` from `downloads/massive/rest/news`,\n`market/massive/massive_ticker_map` and Sharadar\'s SEP and TICKERS, from the Ticker map\'s first\nday; first built by `scripts/massive/news.py`, then appended day by day by the daily data\nupdate. docs/user-guide/massive.md, "News". Licensed data: personal use.\n'#
The store folder’s
README.md.
- VARIABLES = {'news_count': {'description': 'News articles naming the security that count on the day.', 'unit': 'articles'}, 'news_negative': {'description': 'Of them, those whose insights sentiment for the security is negative.', 'unit': 'articles'}, 'news_neutral': {'description': 'Of them, those whose insights sentiment for the security is neutral.', 'unit': 'articles'}, 'news_positive': {'description': 'Of them, those whose insights sentiment for the security is positive.', 'unit': 'articles'}}#
The module’s
VARIABLES.
- config_cls#
The config class used to rebuild this dataset from a saved config.
alias of
MassiveNewsConfig