quantlab.dataset.sharadar.membership.SharadarSP500ConstituentDataset#

class quantlab.dataset.sharadar.membership.SharadarSP500ConstituentDataset(config)[source]#

Bases: IndexConstituentDataset

Daily point-in-time S&P 500 membership panel on the permaticker axis.

The symbol axis is the int64 permaticker, the same id the Sharadar price panel uses, so the mask lines up with it without ticker matching. The panel ends on the SP500 table’s last date, never today.

Parameters:
dataset_configConstituentDatasetConfig

cache_dir is <download-dir>/sharadar, holding the sp500 and tickers raw tables.

Examples

>>> ds = SharadarSP500ConstituentDataset(config)
>>> ds.from_raw_data().save()
>>> ds.panel("2024-01-02", "2024-01-05")["is_member"].dtype
dtype('bool')