Add blocker research and routing rename

This commit is contained in:
2026-03-17 16:16:27 -07:00
parent c165a9add7
commit 88c7c7790d
20 changed files with 3417 additions and 3 deletions

22
routing/router.py Normal file
View File

@@ -0,0 +1,22 @@
from __future__ import annotations
from strategy29.common.models import AllocationDecision, Regime
from strategy29.signal.allocation_router import AllocationRouter
from strategy32.config import Strategy32Budgets
class Strategy32Router(AllocationRouter):
def __init__(self, budgets: Strategy32Budgets):
self.budgets = budgets
super().__init__()
def decide(self, regime: Regime) -> AllocationDecision:
momentum_budget_pct, carry_budget_pct, sideways_budget_pct = self.budgets.for_regime(regime)
cash_budget_pct = max(0.0, 1.0 - momentum_budget_pct - carry_budget_pct - sideways_budget_pct)
return AllocationDecision(
regime=regime,
momentum_budget_pct=momentum_budget_pct,
carry_budget_pct=carry_budget_pct,
spread_budget_pct=sideways_budget_pct,
cash_budget_pct=cash_budget_pct,
)