|
|
|
|
@ -728,110 +728,6 @@ PARKING_PRESETS: dict[str, dict] = {
|
|
|
|
|
"cash_parking_defensive_relay_risk_score_max": 100.0,
|
|
|
|
|
"cash_parking_defensive_momentum_min": 0.05,
|
|
|
|
|
},
|
|
|
|
|
# ── TQQQ Overlay Shock Brake / Dwell Cap / Blend variants ───────────────
|
|
|
|
|
"qqqm_low_dd_tqqq_active_v2_gld_brake": {
|
|
|
|
|
"cash_parking_enabled": True,
|
|
|
|
|
"cash_parking_symbol": "qqqm",
|
|
|
|
|
"cash_parking_gate_mode": "volatility",
|
|
|
|
|
"cash_parking_gate_vol_lookback": 20,
|
|
|
|
|
"cash_parking_gate_vol_threshold": 0.35,
|
|
|
|
|
"cash_parking_temperature_threshold": 1.2,
|
|
|
|
|
"cash_parking_entropy_lookback": 20,
|
|
|
|
|
"cash_parking_entropy_threshold": 1.45,
|
|
|
|
|
"cash_parking_require_trend": True,
|
|
|
|
|
"cash_parking_trend_mode": "momentum",
|
|
|
|
|
"cash_parking_trend_sma_period": 20,
|
|
|
|
|
"cash_parking_trend_reentry_pct": 0.001,
|
|
|
|
|
"cash_parking_autocorr_threshold": 0.0,
|
|
|
|
|
"cash_parking_topup_max_peak_drawdown_pct": 0.02,
|
|
|
|
|
"cash_parking_reserve_pct": 0.0,
|
|
|
|
|
"cash_parking_low_vol_overlay_symbol": "tqqq",
|
|
|
|
|
"cash_parking_low_vol_overlay_vol_threshold": 0.22,
|
|
|
|
|
"cash_parking_low_vol_overlay_temperature_max": 1.05,
|
|
|
|
|
"cash_parking_low_vol_overlay_entropy_max": 1.45,
|
|
|
|
|
"cash_parking_defensive_symbol": "gld",
|
|
|
|
|
"cash_parking_defensive_relay_enabled": True,
|
|
|
|
|
"cash_parking_defensive_relay_trigger_mode": "always",
|
|
|
|
|
"cash_parking_defensive_relay_risk_score_max": 100.0,
|
|
|
|
|
"cash_parking_defensive_momentum_min": 0.05,
|
|
|
|
|
# Shock brake
|
|
|
|
|
"cash_parking_overlay_shock_brake_enabled": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio": 1.35,
|
|
|
|
|
"cash_parking_overlay_shock_brake_dd5_pct": 0.0225,
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_cross": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_cooldown_days": 2,
|
|
|
|
|
},
|
|
|
|
|
"qqqm_low_dd_tqqq_active_v2_gld_brake_blend": {
|
|
|
|
|
"cash_parking_enabled": True,
|
|
|
|
|
"cash_parking_symbol": "qqqm",
|
|
|
|
|
"cash_parking_gate_mode": "volatility",
|
|
|
|
|
"cash_parking_gate_vol_lookback": 20,
|
|
|
|
|
"cash_parking_gate_vol_threshold": 0.35,
|
|
|
|
|
"cash_parking_temperature_threshold": 1.2,
|
|
|
|
|
"cash_parking_entropy_lookback": 20,
|
|
|
|
|
"cash_parking_entropy_threshold": 1.45,
|
|
|
|
|
"cash_parking_require_trend": True,
|
|
|
|
|
"cash_parking_trend_mode": "momentum",
|
|
|
|
|
"cash_parking_trend_sma_period": 20,
|
|
|
|
|
"cash_parking_trend_reentry_pct": 0.001,
|
|
|
|
|
"cash_parking_autocorr_threshold": 0.0,
|
|
|
|
|
"cash_parking_topup_max_peak_drawdown_pct": 0.02,
|
|
|
|
|
"cash_parking_reserve_pct": 0.0,
|
|
|
|
|
"cash_parking_low_vol_overlay_symbol": "tqqq",
|
|
|
|
|
"cash_parking_low_vol_overlay_vol_threshold": 0.22,
|
|
|
|
|
"cash_parking_low_vol_overlay_temperature_max": 1.05,
|
|
|
|
|
"cash_parking_low_vol_overlay_entropy_max": 1.45,
|
|
|
|
|
"cash_parking_defensive_symbol": "gld",
|
|
|
|
|
"cash_parking_defensive_relay_enabled": True,
|
|
|
|
|
"cash_parking_defensive_relay_trigger_mode": "always",
|
|
|
|
|
"cash_parking_defensive_relay_risk_score_max": 100.0,
|
|
|
|
|
"cash_parking_defensive_momentum_min": 0.05,
|
|
|
|
|
# Shock brake
|
|
|
|
|
"cash_parking_overlay_shock_brake_enabled": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio": 1.35,
|
|
|
|
|
"cash_parking_overlay_shock_brake_dd5_pct": 0.0225,
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_cross": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_cooldown_days": 2,
|
|
|
|
|
# Continuous leverage blend
|
|
|
|
|
"cash_parking_overlay_blend_enabled": True,
|
|
|
|
|
"cash_parking_overlay_blend_target_vol": 0.30,
|
|
|
|
|
"cash_parking_overlay_blend_max_leverage": 2.3,
|
|
|
|
|
},
|
|
|
|
|
"qqqm_low_dd_tqqq_active_v2_gld_brake_dwell": {
|
|
|
|
|
"cash_parking_enabled": True,
|
|
|
|
|
"cash_parking_symbol": "qqqm",
|
|
|
|
|
"cash_parking_gate_mode": "volatility",
|
|
|
|
|
"cash_parking_gate_vol_lookback": 20,
|
|
|
|
|
"cash_parking_gate_vol_threshold": 0.35,
|
|
|
|
|
"cash_parking_temperature_threshold": 1.2,
|
|
|
|
|
"cash_parking_entropy_lookback": 20,
|
|
|
|
|
"cash_parking_entropy_threshold": 1.45,
|
|
|
|
|
"cash_parking_require_trend": True,
|
|
|
|
|
"cash_parking_trend_mode": "momentum",
|
|
|
|
|
"cash_parking_trend_sma_period": 20,
|
|
|
|
|
"cash_parking_trend_reentry_pct": 0.001,
|
|
|
|
|
"cash_parking_autocorr_threshold": 0.0,
|
|
|
|
|
"cash_parking_topup_max_peak_drawdown_pct": 0.02,
|
|
|
|
|
"cash_parking_reserve_pct": 0.0,
|
|
|
|
|
"cash_parking_low_vol_overlay_symbol": "tqqq",
|
|
|
|
|
"cash_parking_low_vol_overlay_vol_threshold": 0.22,
|
|
|
|
|
"cash_parking_low_vol_overlay_temperature_max": 1.05,
|
|
|
|
|
"cash_parking_low_vol_overlay_entropy_max": 1.45,
|
|
|
|
|
"cash_parking_defensive_symbol": "gld",
|
|
|
|
|
"cash_parking_defensive_relay_enabled": True,
|
|
|
|
|
"cash_parking_defensive_relay_trigger_mode": "always",
|
|
|
|
|
"cash_parking_defensive_relay_risk_score_max": 100.0,
|
|
|
|
|
"cash_parking_defensive_momentum_min": 0.05,
|
|
|
|
|
# Shock brake
|
|
|
|
|
"cash_parking_overlay_shock_brake_enabled": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio": 1.35,
|
|
|
|
|
"cash_parking_overlay_shock_brake_dd5_pct": 0.0225,
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_cross": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_cooldown_days": 2,
|
|
|
|
|
# Dwell cap
|
|
|
|
|
"cash_parking_overlay_max_hold_days": 5,
|
|
|
|
|
"cash_parking_overlay_revalidation_days": 3,
|
|
|
|
|
},
|
|
|
|
|
"qqqm_low_dd_tqqq_active_v2_gld_brake_v2": {
|
|
|
|
|
"cash_parking_enabled": True,
|
|
|
|
|
"cash_parking_symbol": "qqqm",
|
|
|
|
|
@ -857,17 +753,21 @@ PARKING_PRESETS: dict[str, dict] = {
|
|
|
|
|
"cash_parking_defensive_relay_trigger_mode": "always",
|
|
|
|
|
"cash_parking_defensive_relay_risk_score_max": 100.0,
|
|
|
|
|
"cash_parking_defensive_momentum_min": 0.05,
|
|
|
|
|
# Shock brake (base)
|
|
|
|
|
# Shock brake: Signal 4 (near-SMA buffer) ONLY — Signals 1-3 disabled
|
|
|
|
|
# Signals 1-3 (rv_ratio, dd5_pct, sma_cross) over-trigger 2023-2024, compounding equity loss
|
|
|
|
|
# Signal 4 correctly fires Dec 11 (SmaGap=0.37%, vol5/vol20=0.284>0.25) without false alarms
|
|
|
|
|
"cash_parking_overlay_shock_brake_enabled": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio": 1.35,
|
|
|
|
|
"cash_parking_overlay_shock_brake_dd5_pct": 0.0225,
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_cross": True,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio": 99.0, # Signal 1: effectively disabled
|
|
|
|
|
"cash_parking_overlay_shock_brake_dd5_pct": 1.0, # Signal 3: effectively disabled
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_cross": False, # Signal 2: disabled
|
|
|
|
|
"cash_parking_overlay_shock_brake_cooldown_days": 2,
|
|
|
|
|
# Near-SMA buffer: exit TQQQ when QQQ within 0.5% above SMA10 (pre-emptive)
|
|
|
|
|
# Signal 4: exit TQQQ when QQQ within 0.5% above SMA10 + vol5/vol20 ∈ (0.25, 0.45)
|
|
|
|
|
# Upper bound 0.45 filters out high-vol days (regular gate handles those) and false alarms.
|
|
|
|
|
# Targets "barely elevated" pre-crash vol signature; fires Dec 11 (0.284) not May 21 (0.529).
|
|
|
|
|
# Same-day re-buy is skipped after brake fires; next day gate decides (SGOV on crash days)
|
|
|
|
|
"cash_parking_overlay_shock_brake_sma_buffer": 0.005,
|
|
|
|
|
# Tighter dwell cap: force TQQQ exit after 4 days
|
|
|
|
|
"cash_parking_overlay_max_hold_days": 4,
|
|
|
|
|
"cash_parking_overlay_revalidation_days": 3,
|
|
|
|
|
"cash_parking_overlay_shock_brake_rv_ratio_upper": 0.45,
|
|
|
|
|
# Dwell cap: disabled (max_hold=4 caused Sep-26 bottom-exit; default 0 = unlimited)
|
|
|
|
|
},
|
|
|
|
|
# ── Bearish Parking (SH inverse ETF) ────────────────────────────────────
|
|
|
|
|
# Two-stage: normal→QQQ, mild stress→SGOV, deep stress→SH
|
|
|
|
|
@ -1220,46 +1120,17 @@ FORM4_CAPTURE_SLEEVE_PRESETS: dict[str, dict[str, Any]] = {
|
|
|
|
|
"max_positions": 6,
|
|
|
|
|
"max_new_per_day": 2,
|
|
|
|
|
},
|
|
|
|
|
"reserve_form4_cluster_plus_fresh_balanced": {
|
|
|
|
|
"enabled": True,
|
|
|
|
|
"pit_events_path": "data/reference/form4_daily_events_pit.parquet",
|
|
|
|
|
"reserve_pct": 0.05,
|
|
|
|
|
"min_owner_count": 2,
|
|
|
|
|
"min_total_value": 5_000_000.0,
|
|
|
|
|
"min_purchase_pct": 0.0,
|
|
|
|
|
"min_transaction_count": 2,
|
|
|
|
|
"max_lag_days": 2,
|
|
|
|
|
"max_min_lag_days": 1,
|
|
|
|
|
"hold_days": 20,
|
|
|
|
|
"max_positions": 6,
|
|
|
|
|
"max_new_per_day": 2,
|
|
|
|
|
},
|
|
|
|
|
"reserve_form4_cluster_plus_fresh_strict": {
|
|
|
|
|
"reserve_form4_cluster_plus_fresh_same_day": {
|
|
|
|
|
"enabled": True,
|
|
|
|
|
"pit_events_path": "data/reference/form4_daily_events_pit.parquet",
|
|
|
|
|
"reserve_pct": 0.06,
|
|
|
|
|
"min_owner_count": 2,
|
|
|
|
|
"min_total_value": 5_000_000.0,
|
|
|
|
|
"min_purchase_pct": 0.0,
|
|
|
|
|
"min_transaction_count": 3,
|
|
|
|
|
"min_transaction_count": 2,
|
|
|
|
|
"max_lag_days": 2,
|
|
|
|
|
"max_min_lag_days": 1,
|
|
|
|
|
"hold_days": 20,
|
|
|
|
|
"max_positions": 6,
|
|
|
|
|
"max_new_per_day": 2,
|
|
|
|
|
},
|
|
|
|
|
"reserve_form4_cluster_patient": {
|
|
|
|
|
"enabled": True,
|
|
|
|
|
"pit_events_path": "data/reference/form4_daily_events_pit.parquet",
|
|
|
|
|
"reserve_pct": 0.125,
|
|
|
|
|
"min_owner_count": 2,
|
|
|
|
|
"min_total_value": 5_000_000.0,
|
|
|
|
|
"min_purchase_pct": 0.0,
|
|
|
|
|
"max_lag_days": None,
|
|
|
|
|
"disable_day1_early_failure": True,
|
|
|
|
|
"no_progress_days_override": 3,
|
|
|
|
|
"no_progress_r_override": 0.15,
|
|
|
|
|
"no_progress_fraction_override": 1.0,
|
|
|
|
|
"max_transaction_span_days": 0,
|
|
|
|
|
"hold_days": 20,
|
|
|
|
|
"max_positions": 6,
|
|
|
|
|
"max_new_per_day": 2,
|
|
|
|
|
@ -1307,30 +1178,6 @@ OWNERSHIP_CAPTURE_SLEEVE_PRESETS: dict[str, dict[str, Any]] = {
|
|
|
|
|
"min_cash_ratio_for_overlay": 0.25,
|
|
|
|
|
"max_idle_deploy_pct": 0.0,
|
|
|
|
|
},
|
|
|
|
|
"ownership_13d_raise_reserve_ultra_balanced_purpose_plus_cooldown90_saturation4_fullidle": {
|
|
|
|
|
"enabled": True,
|
|
|
|
|
"pit_events_path": "data/reference/ownership_13d13g_events_pit.parquet",
|
|
|
|
|
"reserve_pct": 0.49,
|
|
|
|
|
"form_groups": ["13D"],
|
|
|
|
|
"min_percent_owned": 5.0,
|
|
|
|
|
"min_percent_delta_points": 2.0,
|
|
|
|
|
"exclude_housekeeping_purpose": True,
|
|
|
|
|
"exclude_structural_exchange_purpose": True,
|
|
|
|
|
"require_amendment": True,
|
|
|
|
|
"require_initial": False,
|
|
|
|
|
"require_activist": False,
|
|
|
|
|
"require_13g_to_13d_transition": False,
|
|
|
|
|
"symbol_cooldown_days_after_loss": 90,
|
|
|
|
|
"symbol_max_entries_in_lookback": 4,
|
|
|
|
|
"symbol_entry_lookback_days": 540,
|
|
|
|
|
"hold_days": 30,
|
|
|
|
|
"min_avg_dollar_volume": 10_000_000.0,
|
|
|
|
|
"max_positions": 6,
|
|
|
|
|
"max_new_per_day": 2,
|
|
|
|
|
"min_cash_ratio_for_overlay": 0.25,
|
|
|
|
|
"max_idle_deploy_pct": 0.0,
|
|
|
|
|
"extra_idle_deploy_pct_above_reserve": 1.0,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RISK_OFF_ALPHA_SLEEVE_PRESETS: dict[str, dict[str, Any]] = {
|
|
|
|
|
@ -1546,6 +1393,7 @@ class RiskConfig(BaseModel):
|
|
|
|
|
cash_parking_overlay_shock_brake_sma_cross: bool = True # QQQ < SMA10 AND smh_mom_5 < 0 → brake
|
|
|
|
|
cash_parking_overlay_shock_brake_cooldown_days: int = 2 # days before TQQQ re-entry
|
|
|
|
|
cash_parking_overlay_shock_brake_sma_buffer: float = 0.0 # 0=disabled; 0.005=exit when QQQ within 0.5% ABOVE SMA10 (pre-emptive)
|
|
|
|
|
cash_parking_overlay_shock_brake_rv_ratio_upper: float = 0.0 # Signal 4 upper vol bound; 0=disabled; 0.45=only fire when vol5/vol20 in (0.25,0.45)
|
|
|
|
|
# TQQQ overlay dwell cap: limit consecutive hold days and periodic revalidation
|
|
|
|
|
cash_parking_overlay_max_hold_days: int = 0 # max overlay days (0=unlimited)
|
|
|
|
|
cash_parking_overlay_revalidation_days: int = 0 # re-check every N days (0=disabled)
|
|
|
|
|
@ -1940,11 +1788,15 @@ class Form4CaptureConfig(BaseModel):
|
|
|
|
|
reserve_pct: float = 0.0
|
|
|
|
|
min_owner_count: int = 2
|
|
|
|
|
min_transaction_count: int = 1
|
|
|
|
|
min_c_suite_count: int = 0
|
|
|
|
|
min_cfo_count: int = 0
|
|
|
|
|
min_role_weight_score: float = 0.0
|
|
|
|
|
min_total_value: float = 5_000_000.0
|
|
|
|
|
min_purchase_pct: float = 0.0
|
|
|
|
|
min_event_day_count: int = 1
|
|
|
|
|
max_lag_days: int | None = None
|
|
|
|
|
max_min_lag_days: int | None = None
|
|
|
|
|
max_transaction_span_days: int | None = None
|
|
|
|
|
require_officer_or_director: bool = False
|
|
|
|
|
disable_day1_early_failure: bool = False
|
|
|
|
|
no_progress_days_override: int | None = None
|
|
|
|
|
|