Class AlphaCombiner

java.lang.Object
com.quantfinlib.alpha.AlphaCombiner

public final class AlphaCombiner extends Object
Combines several alpha factors into one by information-coefficient weights that match the holding horizon, account for signal decay, remove redundancy by orthogonalisation and shrink toward equal weights.

Orthogonalisation. At every date the factors' cross-sectional z-scores are put through classical Gram-Schmidt in the order given: z'_k = z_k − Σ_{j<k} (⟨z_k, z'_j⟩/⟨z'_j, z'_j⟩) z'_j, then re-scaled to unit standard deviation (a residual with no dispersion, a factor fully explained by earlier ones, becomes zero). The order is a modelling choice: earlier factors keep their full content and later ones are credited only with what is new.

Horizon-matched, decay-aware IC. A book rebuilt every H bars holds a date-t signal over the bars t+1 … t+H, so the relevant skill is the average of the one-bar ICs at lags 0 … H−1: IC_k(t) = (1/H) Σ_{l=0}^{H−1} corr(z'_k(t), r_{t+l→t+l+1}) (Pearson over the names scored at t). A fast-decaying signal loses weight as H grows; this is the horizon matching of Grinold and Kahn (2000, Active Portfolio Management, 2nd ed., ch. 13, signal decay) applied per factor. The per-date values are averaged with exponential weights of half-life icHalfLife dates, most recent date weight 1.

Weights. For orthogonal unit-variance signals the mean-variance optimal combination is proportional to the ICs (Grinold and Kahn 2000, ch. 10). The raw weights IC_k / Σ|IC_j| are shrunk toward equal weights: w_k = (1 − δ) IC_k/Σ|IC_j| + δ/K. Equal weighting assumes every factor is oriented so that higher is better, the AlphaFactor convention. With δ = 0 a factor with negative estimated IC gets a negative weight.

Only data up to toIndex is read when fitting: the last IC date is toIndex − H.