Skip to content

Commit ab1f35f

Browse files
authored
add Russell Top50 market regime plugin support (#106)
1 parent 46ca4ea commit ab1f35f

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

docs/strategy_plugin_runtime_contract.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The default registry currently defines versioned plugin contracts:
7070

7171
| Plugin | Schema versions | Supported strategies | Status | Supported mode | Escalated alert channel |
7272
| --- | --- | --- | --- | --- | --- |
73-
| `market_regime_control` | `market_regime_control.v1` | `tqqq_growth_income`, `soxl_soxx_trend_income`, `global_etf_rotation`, `russell_1000_multi_factor_defensive`, `mega_cap_leader_rotation_top50_balanced` | default | `shadow` | `email`, `sms`, `push`, `telegram` |
73+
| `market_regime_control` | `market_regime_control.v1` | `tqqq_growth_income`, `soxl_soxx_trend_income`, `global_etf_rotation`, `russell_top50_leader_rotation`, `russell_1000_multi_factor_defensive`, `mega_cap_leader_rotation_top50_balanced` | default | `shadow` | `email`, `sms`, `push`, `telegram` |
7474
| `crisis_response_shadow` | `crisis_response_shadow.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
7575
| `macro_risk_governor` | `macro_risk_governor.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
7676
| `taco_rebound_shadow` | `taco_rebound_shadow.v2` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |

docs/strategy_plugin_runtime_contract.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ artifact 内,并固定为通知/观察用途的 `shadow`。
6464

6565
| 插件 | Schema versions | 支持策略 | 状态 | 支持模式 | 升级告警通道 |
6666
| --- | --- | --- | --- | --- | --- |
67-
| `market_regime_control` | `market_regime_control.v1` | `tqqq_growth_income`, `soxl_soxx_trend_income`, `global_etf_rotation`, `russell_1000_multi_factor_defensive`, `mega_cap_leader_rotation_top50_balanced` | default | `shadow` | `email`, `sms`, `push`, `telegram` |
67+
| `market_regime_control` | `market_regime_control.v1` | `tqqq_growth_income`, `soxl_soxx_trend_income`, `global_etf_rotation`, `russell_top50_leader_rotation`, `russell_1000_multi_factor_defensive`, `mega_cap_leader_rotation_top50_balanced` | default | `shadow` | `email`, `sms`, `push`, `telegram` |
6868
| `crisis_response_shadow` | `crisis_response_shadow.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
6969
| `macro_risk_governor` | `macro_risk_governor.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
7070
| `taco_rebound_shadow` | `taco_rebound_shadow.v2` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |

src/quant_platform_kit/common/strategy_plugins.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"tqqq_growth_income",
4646
"soxl_soxx_trend_income",
4747
"global_etf_rotation",
48+
"russell_top50_leader_rotation",
4849
"russell_1000_multi_factor_defensive",
4950
"mega_cap_leader_rotation_top50_balanced",
5051
}

tests/test_strategy_plugins.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def test_default_plugin_definition_supports_market_regime_control_for_approved_s
221221
"tqqq_growth_income",
222222
"soxl_soxx_trend_income",
223223
"global_etf_rotation",
224+
"russell_top50_leader_rotation",
224225
"russell_1000_multi_factor_defensive",
225226
"mega_cap_leader_rotation_top50_balanced",
226227
):
@@ -362,6 +363,22 @@ def test_parse_strategy_plugin_mounts_accepts_market_regime_control_weight_profi
362363
self.assertEqual(mounts[0].strategy, "global_etf_rotation")
363364
self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL)
364365

366+
def test_parse_strategy_plugin_mounts_accepts_market_regime_control_russell_top50(self):
367+
mounts = parse_strategy_plugin_mounts(
368+
[
369+
{
370+
"strategy": "russell_top50_leader_rotation",
371+
"plugin": PLUGIN_MARKET_REGIME_CONTROL,
372+
"signal_path": "gs://bucket/market_regime/latest_signal.json",
373+
"expected_schema_version": "market_regime_control.v1",
374+
}
375+
]
376+
)
377+
378+
self.assertEqual(mounts[0].strategy, "russell_top50_leader_rotation")
379+
self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL)
380+
self.assertEqual(mounts[0].expected_schema_version, "market_regime_control.v1")
381+
365382
def test_plugin_definition_marks_legacy_plugins_deprecated(self):
366383
for plugin in (
367384
PLUGIN_CRISIS_RESPONSE_SHADOW,

0 commit comments

Comments
 (0)