quantlab.utils.cross_section#

Cross-sectional transforms of [..., T, S] arrays: one bar at a time, over its symbols.

cross_sectional_zscore standardises each bar over its finite symbols with the sample standard deviation (ddof=1, as the KunQuant CrossSectionalZScore operator does). The ensemble average and the mean-variance optimiser’s score standardisation both use it.

Functions

cross_sectional_zscore

Z-score [..., T, S] values over the last axis, NaN on a degenerate bar.