feat: cockpit

This commit is contained in:
OpenSquared
2026-07-24 12:59:12 +02:00
parent a2e770aac9
commit 3ec0c024ad

View File

@@ -44,9 +44,15 @@ _ASSET_CLASS_TO_CATEGORY = {
# existing Drivers editor (update_instrument_drivers), same as any other instrument.
_QUICK_ADD_DEFAULTS = {
"chart": {"ma_periods": [20, 50, 200], "bollinger_period": 20, "bollinger_std": 2, "show_volume": True},
"drivers": [], "regime_labels": [], "event_keywords": [],
"drivers": [], "event_keywords": [],
"related_assets": [], "correlation_instruments": [], "ai_context": "",
"currency": "USD", "description": "",
# NOT [] — _detect_regime() truncates its 5-slot score vector to len(regime_labels)
# then does np.argmax() on it; an empty list truncates to an empty vector and
# np.argmax([]) raises ValueError, an uncaught 500 for every quick-added instrument
# the moment it has enough real bars (len(df) >= 20) to reach that code path — same
# 5 generic labels _detect_regime() itself falls back to when regime_labels is absent.
"regime_labels": ["Bull", "Bear", "Transition", "Volatile", "Consolidation"],
}