quantlab.dataset.config.SharadarIndustryConfig#

class quantlab.dataset.config.SharadarIndustryConfig(*, zarr_file_path, start_date=None, end_date=None, symbols=None, kwargs=None, resample_freq=None, resample_how=None, name=None, raw_data_dir_path, market='us_equity', frequency='1d', vendor='sharadar', table='sep', permatickers=None, roster_universe=None, category_filter='default', industry_merge=((1, 41), (3, 2), (4, 2), (5, 2), (16, 17), (20, 21), (25, 24), (26, 24), (27, 28)))[source]#

Bases: SharadarDatasetConfig

Config of the point-in-time Fama-French 48 industry panel on the permaticker axis.

Each security’s SIC history is rebuilt from its current TICKERS siccode and the ACTIONS sicchangefrom rows, then classified into the Fama-French 48 industries. The universe fields work as for a price panel, on SEP’s TICKERS rows; the default category filter is domestic common stock.

Examples

>>> cfg = SharadarIndustryConfig(
...     zarr_file_path="/data/zarrs/sharadar_industry_1d.zarr",
...     raw_data_dir_path="/data/downloads/sharadar",
...     industry_merge=((27, 28),),
... )
>>> cfg.table, cfg.industry_merge
('sep', ((27, 28),))
industry_merge = ((1, 41), (3, 2), (4, 2), (5, 2), (16, 17), (20, 21), (25, 24), (26, 24), (27, 28))#

Thin industries merged into others, as (from_code, to_code) pairs of Fama-French 48 codes (1..48): a security classified from_code holds to_code. The dataset refuses an unknown code, an industry merged into itself or into two targets, and a target that is itself merged away, and stores the pairs sorted. () merges nothing. The default (DEFAULT_INDUSTRY_MERGE) merges the industries with on average fewer than 10 members of a top-3000-by-market-cap universe; the run behind it is recorded on issue #178.

table = 'sep'#

Always SEP: its TICKERS rows give the current SIC, its dates the calendar.