refactor(rotation): clean up experimental factor code
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².
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user