quantlab.factor.predefined.daily_anomaly_alpha.DailyAnomalyAlpha#
- class quantlab.factor.predefined.daily_anomaly_alpha.DailyAnomalyAlpha(config)[source]#
Bases:
FactorKunQuantCompute 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_EVENTSand item 2.03), and ACTIONS (ACTION_COLUMNS), anddata_columnsmust beDAILY_ANOMALY_COLUMNS.kwargs={"ranked": True}makes every output its cross-sectional percentile rank, the inputNeutralizedFactorshould wrap.- Parameters:
- configFactorConfig
modemust be"batch";warmup_barsshould be at leastWARMUP_BARS.
- Raises:
- ValueError
If
data_columnsis notDAILY_ANOMALY_COLUMNS, an output is unknown orkwargsholds another key.
Examples
panelmerges 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"]