From aa30bc27971916d74f0ddd7a36a64d1a3d39ba24 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sat, 20 Jun 2026 02:37:21 +0800 Subject: [PATCH] Remove HK dividend-gold selectable profile --- notifications/telegram.py | 2 -- requirements.txt | 6 +++--- strategy_registry.py | 8 +++++++- tests/test_notifications.py | 2 -- tests/test_runtime_config_support.py | 1 - 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/notifications/telegram.py b/notifications/telegram.py index 910ffb7..6d8cdb2 100644 --- a/notifications/telegram.py +++ b/notifications/telegram.py @@ -183,7 +183,6 @@ "strategy_name_nasdaq_sp500_smart_dca": "纳指100 / 标普500 智能定投", "strategy_name_ibit_smart_dca": "IBIT 比特币 ETF 智能定投", "strategy_name_hk_global_etf_tactical_rotation": "港股全球 ETF 战术轮动", - "strategy_name_hk_dividend_gold_defensive_rotation": "港股股息黄金防守轮动", "strategy_name_hk_low_vol_dividend_quality_snapshot": "港股低波股息质量快照", "strategy_name_tqqq_growth_income": "TQQQ 增长收益", "strategy_name_soxl_soxx_trend_income": "SOXL/SOXX 半导体趋势收益", @@ -360,7 +359,6 @@ "strategy_name_nasdaq_sp500_smart_dca": "Nasdaq 100 / S&P 500 Smart DCA", "strategy_name_ibit_smart_dca": "IBIT Smart DCA", "strategy_name_hk_global_etf_tactical_rotation": "HK Global ETF Tactical Rotation", - "strategy_name_hk_dividend_gold_defensive_rotation": "HK Dividend-Gold Defensive Rotation", "strategy_name_hk_low_vol_dividend_quality_snapshot": "HK Low-Vol Dividend Quality Snapshot", "strategy_name_tqqq_growth_income": "TQQQ Growth Income", "strategy_name_soxl_soxx_trend_income": "SOXL/SOXX Semiconductor Trend Income", diff --git a/requirements.txt b/requirements.txt index 84e4475..e85783a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ flask gunicorn -quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@6a273601b5213844168d4642a7f3c9c4ed3ce162 -us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@3b557b349566caa14b5630aea614fd10a0310f1d -hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@844e4506bdd114e787e05d6b557cfd0a11b195e6 +quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@46ca4ea3de8f98a58e2dd86158e7f2070d085cd1 +us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@31406abfb15507270992e62ead8d1068c03328d0 +hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@ec54c685b7dbea931016854db081b8eeaaaef7d2 pandas numpy requests diff --git a/strategy_registry.py b/strategy_registry.py index b664766..2bf2e3f 100644 --- a/strategy_registry.py +++ b/strategy_registry.py @@ -36,6 +36,7 @@ IBKR_PLATFORM = "ibkr" HK_EQUITY_DOMAIN = "hk_equity" TECH_COMMUNICATION_PULLBACK_PROFILE = "tech_communication_pullback_enhancement" +HK_DIVIDEND_GOLD_DEFENSIVE_ROTATION_PROFILE = "hk_dividend_gold_defensive_rotation" PLATFORM_SUPPORTED_DOMAINS: dict[str, frozenset[str]] = { IBKR_PLATFORM: frozenset({US_EQUITY_DOMAIN, HK_EQUITY_DOMAIN}), @@ -96,7 +97,12 @@ def describe_platform_runtime_requirements(profile: str | None, *, platform_id: STRATEGY_CATALOG = _merge_strategy_catalogs(US_STRATEGY_CATALOG, HK_STRATEGY_CATALOG) US_STRATEGY_PROFILES = frozenset(US_STRATEGY_CATALOG.definitions) HK_STRATEGY_PROFILES = frozenset(HK_STRATEGY_CATALOG.definitions) -IBKR_EXCLUDED_LIVE_PROFILES = frozenset({TECH_COMMUNICATION_PULLBACK_PROFILE}) +IBKR_EXCLUDED_LIVE_PROFILES = frozenset( + { + HK_DIVIDEND_GOLD_DEFENSIVE_ROTATION_PROFILE, + TECH_COMMUNICATION_PULLBACK_PROFILE, + } +) IBKR_ROLLOUT_ALLOWLIST = ( get_us_runtime_enabled_profiles() | get_hk_runtime_enabled_profiles() ) - IBKR_EXCLUDED_LIVE_PROFILES diff --git a/tests/test_notifications.py b/tests/test_notifications.py index 7bb9c85..a68bcde 100644 --- a/tests/test_notifications.py +++ b/tests/test_notifications.py @@ -188,8 +188,6 @@ def test_strategy_display_name_translates_new_live_profiles(): assert en_name("nasdaq_sp500_smart_dca") == "Nasdaq 100 / S&P 500 Smart DCA" assert zh_name("hk_global_etf_tactical_rotation") == "港股全球 ETF 战术轮动" assert en_name("hk_global_etf_tactical_rotation") == "HK Global ETF Tactical Rotation" - assert zh_name("hk_dividend_gold_defensive_rotation") == "港股股息黄金防守轮动" - assert en_name("hk_dividend_gold_defensive_rotation") == "HK Dividend-Gold Defensive Rotation" assert zh_name("hk_low_vol_dividend_quality_snapshot") == "港股低波股息质量快照" assert en_name("hk_low_vol_dividend_quality_snapshot") == "HK Low-Vol Dividend Quality Snapshot" diff --git a/tests/test_runtime_config_support.py b/tests/test_runtime_config_support.py index aabc470..89029c7 100644 --- a/tests/test_runtime_config_support.py +++ b/tests/test_runtime_config_support.py @@ -64,7 +64,6 @@ "ibit_smart_dca", "soxl_soxx_trend_income", "tqqq_growth_income", - "hk_dividend_gold_defensive_rotation", "hk_global_etf_tactical_rotation", "hk_low_vol_dividend_quality_snapshot", }