quantlab.dataset.massive.dividends.MassiveDividendDataset#
- class quantlab.dataset.massive.dividends.MassiveDividendDataset(config)[source]#
Bases:
MassiveRestEventPanelDaily panel of Massive’s declared and paid dividends and splits, by permaticker.
See the module docstring for the variables and the placement.
- Parameters:
- dataset_configMassiveDividendsConfig
Sharadar’s raw tier (calendar, universe), Massive’s raw tier and the Ticker map.
Examples
With
configas in the module example:ds = MassiveDividendDataset(config).update() list(ds.panel("2024-01-02", "2024-01-05").data_vars) # ['dividend_declared', 'dividend_days_to_ex', 'dividend_cash', 'split_ratio']
- EARLIEST = datetime.date(2000, 1, 1)#
The latest first day of the endpoints read (
MassiveRestPanel.EARLIEST).
- REST_ENDPOINTS = ('dividends', 'splits')#
The REST endpoints read (
MassiveRestPanel).
- STORE_NAME = 'massive_dividends_1d'#
The store folder under
market/massive(MassiveRestPanel.from_data_root).
- STORE_README = '# massive_dividends_1d\n\nMassive\'s dividends and splits (its REST `/stocks/v1/dividends` and `/stocks/v1/splits`) as a\ndaily panel on Sharadar\'s permaticker axis and SEP\'s trading calendar, the whole market\'s\ndomestic common stock (SEP\'s default category filter). Variables, NaN on a day without one:\n`dividend_declared` (declared cash per share, from the declaration date through the ex-date),\n`dividend_days_to_ex` (trading days left to that ex-date, 0 on it), `dividend_cash` (cash per\nshare going ex that day, summed) and `split_ratio` (`split_to / split_from` executed that day,\nmultiplied). Amounts are as declared; Massive\'s `historical_adjustment_factor` is never read.\n\nEach record is placed on the permaticker the Ticker map gives its ticker on the record\'s own\nday; a record it cannot place, or a dividend not in USD, is left out and counted in\n`massive_dividends_1d.zarr.unplaced.json`. Built by\n`quantlab.dataset.massive.dividends.MassiveDividendDataset` from\n`downloads/massive/rest/dividends`, `downloads/massive/rest/splits`,\n`market/massive/massive_ticker_map` and Sharadar\'s SEP and TICKERS, from the Ticker map\'s first\nday; first built by `scripts/massive/dividends.py`, then appended day by day by the daily data\nupdate. docs/user-guide/massive.md, "Dividends and splits". Licensed data: personal use.\n'#
The store folder’s
README.md.
- VARIABLES = {'dividend_cash': {'description': 'Cash dividends going ex on the day, summed.', 'unit': 'USD per share'}, 'dividend_days_to_ex': {'description': "Trading days from the day to the declared dividend's ex-date; 0 on the ex-date.", 'unit': 'trading days'}, 'dividend_declared': {'description': 'Declared cash dividend, from its declaration date through its ex-date.', 'unit': 'USD per share'}, 'split_ratio': {'description': 'split_to / split_from of the splits executed on the day, multiplied.', 'unit': 'new shares per old share'}}#
The module’s
VARIABLES.
- config_cls#
The config class used to rebuild this dataset from a saved config.
alias of
MassiveDividendsConfig