1616from hk_equity_strategies .runtime_adapters import (
1717 describe_platform_runtime_requirements as describe_hk_platform_runtime_requirements ,
1818)
19+ from quant_us_combo_strategies import (
20+ get_platform_runtime_adapter as get_combo_runtime_adapter ,
21+ get_runtime_enabled_profiles as get_combo_runtime_enabled_profiles ,
22+ get_strategy_catalog as get_combo_strategy_catalog ,
23+ )
24+ from quant_us_combo_strategies .runtime_adapters import (
25+ describe_platform_runtime_requirements as describe_combo_platform_runtime_requirements ,
26+ )
1927
2028from quant_platform_kit .common .strategies import (
2129 PlatformCapabilityMatrix ,
3543
3644LONGBRIDGE_PLATFORM = "longbridge"
3745HK_EQUITY_DOMAIN = "hk_equity"
46+ COMBOS_DOMAIN = "quant_combo"
3847TECH_COMMUNICATION_PULLBACK_PROFILE = "tech_communication_pullback_enhancement"
3948HK_DIVIDEND_GOLD_DEFENSIVE_ROTATION_PROFILE = "hk_dividend_gold_defensive_rotation"
4049
4150PLATFORM_SUPPORTED_DOMAINS : dict [str , frozenset [str ]] = {
42- LONGBRIDGE_PLATFORM : frozenset ({US_EQUITY_DOMAIN , HK_EQUITY_DOMAIN }),
51+ LONGBRIDGE_PLATFORM : frozenset ({US_EQUITY_DOMAIN , HK_EQUITY_DOMAIN , COMBOS_DOMAIN }),
4352}
4453
4554
@@ -78,23 +87,31 @@ def _canonical_profile(profile: str | None) -> str:
7887 return STRATEGY_CATALOG .profile_aliases .get (normalized , normalized )
7988
8089
90+ COMBO_STRATEGY_PROFILES = frozenset (get_combo_strategy_catalog ().definitions )
91+
92+
8193def get_platform_runtime_adapter (profile : str | None , * , platform_id : str ):
8294 canonical_profile = _canonical_profile (profile )
8395 if canonical_profile in HK_STRATEGY_PROFILES :
8496 return get_hk_platform_runtime_adapter (canonical_profile , platform_id = platform_id )
97+ if canonical_profile in COMBO_STRATEGY_PROFILES :
98+ return get_combo_runtime_adapter (canonical_profile , platform_id = platform_id )
8599 return get_us_platform_runtime_adapter (canonical_profile , platform_id = platform_id )
86100
87101
88102def describe_platform_runtime_requirements (profile : str | None , * , platform_id : str ) -> dict [str , object ]:
89103 canonical_profile = _canonical_profile (profile )
90104 if canonical_profile in HK_STRATEGY_PROFILES :
91105 return describe_hk_platform_runtime_requirements (canonical_profile , platform_id = platform_id )
106+ if canonical_profile in COMBO_STRATEGY_PROFILES :
107+ return describe_combo_platform_runtime_requirements (canonical_profile , platform_id = platform_id )
92108 return describe_us_platform_runtime_requirements (canonical_profile , platform_id = platform_id )
93109
94110
95111US_STRATEGY_CATALOG = get_us_strategy_catalog ()
96112HK_STRATEGY_CATALOG = get_hk_strategy_catalog ()
97- STRATEGY_CATALOG = _merge_strategy_catalogs (US_STRATEGY_CATALOG , HK_STRATEGY_CATALOG )
113+ COMBO_STRATEGY_CATALOG = get_combo_strategy_catalog ()
114+ STRATEGY_CATALOG = _merge_strategy_catalogs (US_STRATEGY_CATALOG , HK_STRATEGY_CATALOG , COMBO_STRATEGY_CATALOG )
98115US_STRATEGY_PROFILES = frozenset (US_STRATEGY_CATALOG .definitions )
99116HK_STRATEGY_PROFILES = frozenset (HK_STRATEGY_CATALOG .definitions )
100117LONGBRIDGE_EXCLUDED_LIVE_PROFILES = frozenset (
@@ -104,7 +121,7 @@ def describe_platform_runtime_requirements(profile: str | None, *, platform_id:
104121 }
105122)
106123LONGBRIDGE_ROLLOUT_ALLOWLIST = (
107- get_us_runtime_enabled_profiles () | get_hk_runtime_enabled_profiles ()
124+ get_us_runtime_enabled_profiles () | get_hk_runtime_enabled_profiles () | get_combo_runtime_enabled_profiles ()
108125) - LONGBRIDGE_EXCLUDED_LIVE_PROFILES
109126PLATFORM_CAPABILITY_MATRIX = PlatformCapabilityMatrix (
110127 platform_id = LONGBRIDGE_PLATFORM ,
@@ -120,6 +137,9 @@ def describe_platform_runtime_requirements(profile: str | None, *, platform_id:
120137 "indicators" ,
121138 "account_state" ,
122139 "snapshot" ,
140+ "russell_snapshot" ,
141+ "current_holdings" ,
142+ "market_data" ,
123143 }
124144 ),
125145 # LongPort API enforces quantity ≥ 1 (regex ``^([1-9]\d*(\.\d+)?)$``).
0 commit comments