quantlab.dataset.constituent.CompustatNasdaq100ConstituentDataset#

class quantlab.dataset.constituent.CompustatNasdaq100ConstituentDataset(dataset_config)[source]#

Bases: IndexConstituentDataset

Daily point-in-time Nasdaq-100 membership panel from Compustat.

Compustat is S&P’s company-fundamentals database, also sold through WRDS. It identifies a security by (gvkey, iid) (company key and issue id). Intervals come from CrspMembership, which reads Compustat’s index-constituent history from the reference directory at config.cache_dir and maps each (gvkey, iid) membership interval to a PERMNO through the CRSP/Compustat Merged (CCM) link table. The symbol axis is the int64 PERMNO. Coverage starts on 1995-01-01, where Compustat’s history begins (the memberships themselves may be older); the panel never starts earlier.

A membership interval with no PERMNO link is an error by default, because dropping it would silently shrink the universe. Pass kwargs={"allow_unlinked": True} to keep the linked days and see the rest in the membership report. The option lives in the config so a run that accepted the gap records it in its own config.json. Only gaps inside the configured window count.

Parameters:
dataset_configFileConstituentDatasetConfig

Output Zarr path, CRSP reference directory (cache_dir), date range and optional kwargs["allow_unlinked"].

Examples

Needs a CRSP reference directory on disk; no WRDS connection is made:

>>> config = FileConstituentDatasetConfig(
...     zarr_file_path="data/reference/compustat_nasdaq100.zarr",
...     cache_dir="downloads/us_equity/1d/wrds_crsp/_reference",
...     start_date="2015-01-01",
...     end_date="2024-12-31",
...     kwargs={"allow_unlinked": True},
... )
>>> CompustatNasdaq100ConstituentDataset(config).from_raw_data().save()
INDEX = 'comp_nasdaq100'#

The CrspMembership index this class reads.

config_cls#

The config class a saved config.json is rebuilt with.

alias of FileConstituentDatasetConfig