quantlab.dataset.sharadar.membership.SharadarSP500ConstituentDataset#
- class quantlab.dataset.sharadar.membership.SharadarSP500ConstituentDataset(config)[source]#
Bases:
IndexConstituentDatasetDaily point-in-time S&P 500 membership panel on the permaticker axis.
The
symbolaxis 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_diris<download-dir>/sharadar, holding thesp500andtickersraw tables.
Examples
>>> ds = SharadarSP500ConstituentDataset(config) >>> ds.from_raw_data().save() >>> ds.panel("2024-01-02", "2024-01-05")["is_member"].dtype dtype('bool')