quantlab.dataset.config.ConstituentDatasetConfig#

class quantlab.dataset.config.ConstituentDatasetConfig(*, zarr_file_path, start_date=None, end_date=None, symbols=None, kwargs=None, resample_freq=None, resample_how=None, name=None, as_of=None)[source]#

Bases: BaseDatasetConfig

Config of an index-membership panel (a boolean mask over time and symbol).

A cell is True when the symbol was a member of the index on that date. A membership read from local source files takes a FileConstituentDatasetConfig, which adds their directory; one derived from another store (the estimation universe, the common stocks of a price store) takes this config, its store named in kwargs.

Examples

>>> cfg = ConstituentDatasetConfig(
...     zarr_file_path="/data/universe/us3000/membership_estu/membership_estu.zarr",
...     start_date="2020-01-01",
...     end_date="2020-12-31",
...     as_of="2024-06-30",
... )
>>> cfg.as_of
'2024-06-30'
as_of = None#

Date the membership is observed from. None means today, so a panel that must be reproducible later should pin it.