quantlab.backtest.base.attribution_score_label#

quantlab.backtest.base.attribution_score_label(constructor, predictions)[source]#

Return the label a backtest’s attribution ranks its universe by.

The portfolio rule’s ranking_label of the predicted labels, or the first predicted label without a rule. Both backtests (run() and quantlab.backtest.approximate) rank by it.

Examples

>>> attribution_score_label(None, predictions)
'fwd_ret_1'