From 44588d50268f587e6c29e61d6fb72aa209a30d43 Mon Sep 17 00:00:00 2001 From: aszerW Date: Sat, 6 Jun 2026 18:45:11 +0800 Subject: [PATCH] refactor(rotation): clean up experimental factor code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove slope_snr, slope_snr_r2, james_stein score functions and r2_alpha parameter. slope_r2_score reverts to simple slope*R² with no alpha parameter. Minor docstring fix: R^2 → R². --- rotation/simple_rotation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rotation/simple_rotation.py b/rotation/simple_rotation.py index 3f007f5..0caf119 100644 --- a/rotation/simple_rotation.py +++ b/rotation/simple_rotation.py @@ -109,7 +109,7 @@ def vol_adjusted_momentum_score(prices: np.ndarray) -> float: def slope_r2_score(prices: np.ndarray) -> float: - """Slope * R^2 score (unweighted, normalized prices)""" + """Slope * R² score (unweighted, normalized prices)""" if len(prices) < 5: return 0.0 prices = np.clip(prices, 0.01, None)