diff --git a/src/fxhnt/domain/strategies/equity_factor.py b/src/fxhnt/domain/strategies/equity_factor.py index 799b8ea..48339b5 100644 --- a/src/fxhnt/domain/strategies/equity_factor.py +++ b/src/fxhnt/domain/strategies/equity_factor.py @@ -70,7 +70,7 @@ def construction_weights(scores: list[float], construction: str, quantile: float if n == 0: return [] if construction == "tilt": - med = sorted(scores)[n // 2] + med = median(scores) pos = [max(0.0, s - med) for s in scores] tot = sum(pos) return [p / tot for p in pos] if tot > 0 else [1.0 / n] * n