quantlab.dataset.common_stock#

The common-stock membership: every security of a whole-market price store.

The whole-market Sharadar store (market/sharadar/sharadar_sep_1d) holds, under its default category_filter, the domestic common stocks: primary and secondary share classes, no ADRs, Canadian companies or preferred shares. CommonStockConstituentDataset reads it as a point-in-time index: a security is a member from its first to its last bar with a finite close, halted days (no price) included, one interval per security. Its panel feeds MembershipCapWeight unchanged, giving the market portfolio’s cap weights.

The panel ends at the store’s last bar and moves on with it: extend the store, then update() this dataset.

Examples#

>>> from quantlab.dataset.config import ConstituentDatasetConfig
>>> members = CommonStockConstituentDataset(ConstituentDatasetConfig(
...     zarr_file_path="/data/quantlab/universe/sharadar/sharadar_common_stock_membership/sharadar_common_stock_membership.zarr",
...     cache_dir="/data/quantlab/downloads/sharadar",
...     kwargs={"price_store": "/data/quantlab/market/sharadar/sharadar_sep_1d/sharadar_sep_1d.zarr"},
... ))
>>> members.update().panel("2026-10-14", "2026-10-15")["is_member"].sum("symbol").values
array([4661, 4600])

Classes

CommonStockConstituentDataset

Membership = every security of a price store, from its first to its last priced bar.