quantlab.factor.predefined.fundamental_alpha.FundamentalAlpha#

class quantlab.factor.predefined.fundamental_alpha.FundamentalAlpha(config)[source]#

Bases: FactorKunQuant

Compute the twenty-three fundamental, 13F and insider characteristics in KunQuant.

Only the selected factor_names are built, and data_columns must name exactly FundamentalAlphaParameters.required_panel_columns of them. The outputs are raw characteristics, or their cross-sectional ranks with ranked=True, which is what NeutralizedFactor should wrap. warmup_bars should cover the longest lag: about 63 * (sue_quarters + 1) bars for a SUE (600 by default), issuance_window for the issuance, 260 for the year-ago reports.

Parameters:
configFactorConfig

mode must be "batch".

Raises:
ValueError

If an output is unknown, data_columns does not match the outputs, or kwargs is invalid.

Examples

panel merges SEP, DAILY, SF1 ART, SF3A holdings and SF2 insiders (BadPrintMaskedDataset([sep, daily, art, holdings, insiders])):

names = ("accruals", "f_score")
factor = FundamentalAlpha(FactorConfig(
    warmup_bars=600, dataset=panel, mode="batch", factor_names=names,
    data_columns=FundamentalAlphaParameters().required_panel_columns(names),
))
factor.compute("2010-01-04", "2010-12-31")["f_score"].max().item()  # 9.0
init_stream()[source]#

Refuse: FundamentalAlpha has no streaming graph.

Raises:
ValueError

Always.