diff --git a/src/quant_platform_kit/common/strategy_plugins.py b/src/quant_platform_kit/common/strategy_plugins.py index d3aac15..b8276d8 100644 --- a/src/quant_platform_kit/common/strategy_plugins.py +++ b/src/quant_platform_kit/common/strategy_plugins.py @@ -42,6 +42,7 @@ MARKET_REGIME_CONTROL_SUPPORTED_STRATEGIES = frozenset( { "tqqq_growth_income", + "soxl_soxx_trend_income", "global_etf_rotation", "russell_1000_multi_factor_defensive", "mega_cap_leader_rotation_top50_balanced", diff --git a/tests/test_strategy_plugins.py b/tests/test_strategy_plugins.py index 3d78313..2f13187 100644 --- a/tests/test_strategy_plugins.py +++ b/tests/test_strategy_plugins.py @@ -217,6 +217,7 @@ def test_default_plugin_definition_supports_market_regime_control_for_approved_s ) for strategy in ( "tqqq_growth_income", + "soxl_soxx_trend_income", "global_etf_rotation", "russell_1000_multi_factor_defensive", "mega_cap_leader_rotation_top50_balanced", @@ -235,15 +236,6 @@ def test_default_plugin_definition_supports_market_regime_control_for_approved_s plugin=PLUGIN_MARKET_REGIME_CONTROL, mode=PLUGIN_MODE_SHADOW, ) - with self.assertRaisesRegex( - ValueError, - "market_regime_control does not support strategy soxl_soxx_trend_income", - ): - validate_strategy_plugin_compatibility( - strategy="soxl_soxx_trend_income", - plugin=PLUGIN_MARKET_REGIME_CONTROL, - mode=PLUGIN_MODE_SHADOW, - ) validate_strategy_plugin_notification_target( notification_target=GENERAL_MARKET_REGIME_NOTIFICATION_TARGET, plugin=PLUGIN_MARKET_REGIME_CONTROL, @@ -338,20 +330,21 @@ def test_parse_strategy_plugin_mounts_accepts_market_regime_control_tqqq(self): self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL) self.assertEqual(mounts[0].expected_schema_version, "market_regime_control.v1") - def test_parse_strategy_plugin_mounts_rejects_market_regime_control_soxl(self): - with self.assertRaisesRegex( - ValueError, - "market_regime_control does not support strategy soxl_soxx_trend_income", - ): - parse_strategy_plugin_mounts( - [ - { - "strategy": "soxl_soxx_trend_income", - "plugin": PLUGIN_MARKET_REGIME_CONTROL, - "signal_path": "gs://bucket/market_regime/latest_signal.json", - } - ] - ) + def test_parse_strategy_plugin_mounts_accepts_market_regime_control_soxl(self): + mounts = parse_strategy_plugin_mounts( + [ + { + "strategy": "soxl_soxx_trend_income", + "plugin": PLUGIN_MARKET_REGIME_CONTROL, + "signal_path": "gs://bucket/market_regime/latest_signal.json", + "expected_schema_version": "market_regime_control.v1", + } + ] + ) + + self.assertEqual(mounts[0].strategy, "soxl_soxx_trend_income") + self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL) + self.assertEqual(mounts[0].expected_schema_version, "market_regime_control.v1") def test_parse_strategy_plugin_mounts_accepts_market_regime_control_weight_profile(self): mounts = parse_strategy_plugin_mounts(