๐ Core Pillar III: Signal Governance & Smart Rebalancing: From Defensive Capping to Dynamic Allocation#
Release Version: v7.1.2 - v7.1.5
Core Components:core/ranking_engine.py,core/exposure_engine.py,data/position_registry.json
Tags:Signal GovernanceยทDynamic CappingยทSmart RebalancingยทDynamic TRADE Budget
๐ Introduction: Guarding Against Bull Traps & Blind Mean Reversion#
In quantitative trading, two common pitfalls undermine performance:
- Low-Quality Momentum Impulses: Weak stocks in consolidation or downtrends jump on short-term news, causing naive models to generate false “Buy / Breakout” signals.
- Mechanical Rebalancing Traps: When a core asset suffers fundamental deterioration or breaks down into Phase 4/5, traditional rebalancing algorithms blindly buy more simply because the position weight fell below target.
During v7.1.2 to v7.1.5, Trade OS introduced the Signal Governance Architecture (Market OS v3.0) and Smart Rebalance Advisory Filter, establishing a context-aware risk firewall.
๐ I. Capital Authorization & Context-Aware Dynamic Capping#
In core/ranking_engine.py, the system deploys the get_contextual_ceiling arbitration function. Capital authorization is no longer granted purely based on raw indicator scores; instead, the system calculates a contextual score ceiling using Higher-Timeframe (HTF) market structure, real-time relative volume, and fundamental news alerts.
# Context-Aware Dynamic Capping Logic (core/ranking_engine.py)
def get_contextual_ceiling(ticker, htf_state, rvol, news_alerts):
ceiling = 1.00
# 1. Structural constraint: pullback/consolidation caps max score at 0.70
if htf_state == "CONSOLIDATION_PULLBACK":
ceiling = min(ceiling, 0.70)
# 2. Risk alert penalty: e.g. litigation risk or earnings warning
if "litigation_risk" in news_alerts:
ceiling -= 0.10 # Score capped at 0.69, locking asset in Watch/Wait zone
return ceiling1.1 Strict BREAKOUT Reservation#
The system reserves the action label โก STRUCTURAL BREAKOUT strictly for assets breaking through HTF structural resistance without active capping penalties. Volume spikes during weak or consolidation phases are reclassified as Tactical Momentum Expansion or Tactical Oversold Bounce, preventing FOMO buying.
๐ก๏ธ II. Smart Rebalance Advisory Filter#
The Smart Rebalance Filter replaces traditional “drift-only” rebalancing with trend-aware contextual logic, combining daily scanner snapshots with structural market phases.
graph TD
A[Calculate Position Weight Drift] --> B{Drift < -0.5% Underweight?}
B -- Yes --> C{Scanner emits TRIM/EXIT <br/> or asset in Phase 4/5/0?}
C -- Yes --> D[๐ด REBALANCE BLOCKED <br/> Intercept buy order to prevent catch-falling-knife]
C -- No --> E[๐ข Execute Rebalance Buy]
B -- No Drift > +0.5% Overweight --> F{Scanner emits ADD <br/> and asset in Strong Uptrend?}
F -- Yes --> G[๐ก REBALANCE HOLD <br/> Pause profit taking to maximize trend gain]
F -- No --> H[๐ฃ Execute Tactical Trim]2.1 Dual-Protection Mechanism#
- Safety Intercept (
๐ด REBALANCE BLOCKED): When an underweight position (e.g.XSU.TO) breaks down or triggersTRIM/EXITsignals, the system highlights a yellow-on-red warning box and blocks rebalance buy orders. - Strong Trend Retention (
๐ก REBALANCE HOLD): When an overweight position remains in a strong primary markup phase with activeADDratings, mechanical trim orders are paused to capture full momentum run-ups.
๐ข III. Dynamic TRADE Budget Allocation Engine#
In core/exposure_engine.py, static tactical (TRADE) position allocations were replaced with a Signal Strength Score allocation engine.
3.1 Six-Factor Signal Scoring Formula#
For each tactical holding, the system calculates a composite signal score:
$$\text{Score} = (\text{Trend} \times 2) + (\text{Relative Strength} \times 2) + (\text{Volume Expansion} \times 1) + (\text{Macro Tailwinds} \times 1) + (\text{Earnings Momentum} \times 1) - (\text{Crowding Risk} \times 2)$$
# Dynamic TRADE budget allocation (core/exposure_engine.py)
total_trade_score = sum(p['signal_score'] for p in active_trade_positions)
for p in active_trade_positions:
# Dynamic Target Weight = Total TRADE Budget * (Asset Score / Sum of Active Asset Scores)
p['dynamic_target_weight'] = trade_budget * (p['signal_score'] / total_trade_score)- Active Holdings Exclusion: Closed or zero-weight positions (e.g.
TSLA) have target weights forced to zero and are excluded from the denominator, preventing ghost positions from tying up capital. - Tightened Drift Threshold: Drift sensitivity was narrowed from $\pm 2.0%$ to $\pm 0.5%$, ensuring rapid rebalancing response.
๐ก Summary & Architectural Significance#
The signal governance and smart rebalancing architecture endows Trade OS with disciplined capital allocation. By enforcing risk filters from top-level macro down to individual execution orders, the system maintains resilient defense and powerful offensive execution across volatile and trending markets alike.