quantlab.factor.predefined.daily_anomaly_alpha.DailyAnomalyAlpha#

class quantlab.factor.predefined.daily_anomaly_alpha.DailyAnomalyAlpha(config)[source]#

Bases: FactorKunQuant

Compute the twenty daily calendar, risk-shape, behavioural, corporate-action and liquidity anomalies.

The panel merges SEP (adjusted open, close and volume, the cash dividend and the split factor), DAILY (market cap) and Sharadar EVENTS (EVENT_COLUMNS: NEWS_EVENTS and item 2.03), and ACTIONS (ACTION_COLUMNS), and data_columns must be DAILY_ANOMALY_COLUMNS. kwargs={"ranked": True} makes every output its cross-sectional percentile rank, the input NeutralizedFactor should wrap.

Parameters:
configFactorConfig

mode must be "batch"; warmup_bars should be at least WARMUP_BARS.

Raises:
ValueError

If data_columns is not DAILY_ANOMALY_COLUMNS, an output is unknown or kwargs holds another key.

Examples

panel merges SEP, DAILY and EVENTS:

factor = DailyAnomalyAlpha(FactorConfig(
    warmup_bars=WARMUP_BARS, dataset=panel, mode="batch", data_columns=DAILY_ANOMALY_COLUMNS,
))
factor.compute("2020-01-02", "2020-12-31")["coskewness"]
init_stream()[source]#

Refuse: DailyAnomalyAlpha has no streaming graph.

Raises:
ValueError

Always.