Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/strategy_plugin_runtime_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The default registry currently defines versioned plugin contracts:

| Plugin | Schema versions | Supported strategies | Status | Supported mode | Escalated alert channel |
| --- | --- | --- | --- | --- | --- |
| `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` |
| `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` |
| `crisis_response_shadow` | `crisis_response_shadow.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
| `macro_risk_governor` | `macro_risk_governor.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
| `taco_rebound_shadow` | `taco_rebound_shadow.v2` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
Expand Down
2 changes: 1 addition & 1 deletion docs/strategy_plugin_runtime_contract.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ artifact 内,并固定为通知/观察用途的 `shadow`。

| 插件 | Schema versions | 支持策略 | 状态 | 支持模式 | 升级告警通道 |
| --- | --- | --- | --- | --- | --- |
| `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` |
| `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` |
| `crisis_response_shadow` | `crisis_response_shadow.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
| `macro_risk_governor` | `macro_risk_governor.v1` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
| `taco_rebound_shadow` | `taco_rebound_shadow.v2` | `tqqq_growth_income` | deprecated; successor `market_regime_control` | `shadow` | `email`, `sms`, `push`, `telegram` |
Expand Down
1 change: 1 addition & 0 deletions src/quant_platform_kit/common/strategy_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"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",
}
Expand Down
17 changes: 17 additions & 0 deletions tests/test_strategy_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def test_default_plugin_definition_supports_market_regime_control_for_approved_s
"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",
):
Expand Down Expand Up @@ -362,6 +363,22 @@ def test_parse_strategy_plugin_mounts_accepts_market_regime_control_weight_profi
self.assertEqual(mounts[0].strategy, "global_etf_rotation")
self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL)

def test_parse_strategy_plugin_mounts_accepts_market_regime_control_russell_top50(self):
mounts = parse_strategy_plugin_mounts(
[
{
"strategy": "russell_top50_leader_rotation",
"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, "russell_top50_leader_rotation")
self.assertEqual(mounts[0].plugin, PLUGIN_MARKET_REGIME_CONTROL)
self.assertEqual(mounts[0].expected_schema_version, "market_regime_control.v1")

def test_plugin_definition_marks_legacy_plugins_deprecated(self):
for plugin in (
PLUGIN_CRISIS_RESPONSE_SHADOW,
Expand Down