numeraire.OutOfSampleR2Evaluator#
- class numeraire.OutOfSampleR2Evaluator(benchmark: str = 'historical')[source]#
Bases:
objectOut-of-sample R^2 of a forecast vs a benchmark,
1 - SSE_model / SSE_benchmark(percent).Pooled across all origins and assets; positive => the model beats the benchmark OOS.
benchmarkselects the yardstick:"historical"(default) — the prevailing-mean benchmark carried in the output (Goyal-Welch 2008): the right metric for predictive-regression methods (e.g. 1/A’s dp)."zero"— a zero forecast,SSE_benchmark = sum r^2. This is the Gu-Kelly-Xiu (2020) convention for the machine-learning cross-section (return predictability is measured against “no signal”, not against a fitted mean), and it materially changes the number.
Methods
__init__([benchmark])evaluate(oos_output)Attributes
requires