quantlab.model.evaluation.scores_volatility_level#
- quantlab.model.evaluation.scores_volatility_level(label, scale)[source]#
Return whether a label’s predictions get
volatility_level_metrics.They do when the label’s
kindis"volatility"and the prediction is on the label’s own scale (scaleis"raw", as a predictor’slabel_scalesreports it): a level metric on a standardized prediction compares units that differ from the label’s. An object withoutkindcounts as a return label.- Parameters:
- labelobject
The label object, such as a
Forward.- scalestr or None
The prediction’s scale for that label,
"raw"or"standardized".
- Returns:
- bool
Examples
>>> from quantlab.label.predefined.fret import Return, Volatility >>> scores_volatility_level(Volatility, "raw"), scores_volatility_level(Volatility, "standardized") (True, False) >>> scores_volatility_level(Return, "raw") False