quantlab.factor.config.MembershipCapWeightConfig#
- class quantlab.factor.config.MembershipCapWeightConfig(*, warmup_bars=0, dataset, file_path=None, factor_names=None, kwargs=None, resample_freq=None, resample_how=None, name=None, membership, cap_column='marketcap')[source]#
Bases:
BaseFactorConfigConfig of
quantlab.factor.predefined.membership_cap_weight.MembershipCapWeight.datasetholds each symbol’s market cap incap_column(Sharadar DAILY’smarketcap) andmembershipthe index whose members the weights are spread over; both are component fields. No bar before the requested start is read.Examples
With
dailya dataset of market caps andus3000a membership:>>> cfg = MembershipCapWeightConfig(dataset=daily, membership=us3000) >>> cfg.warmup_bars, cfg.cap_column (0, 'marketcap')
- cap_column = 'marketcap'#
The market-cap variable of
dataset.
- membership#
The point-in-time membership the weights are spread over.
- warmup_bars = 0#
Bars read before the requested start: none, the weights are of the bar.