|
63 | 63 | "soxl_soxx_trend_income", |
64 | 64 | "tech_communication_pullback_enhancement", |
65 | 65 | "tqqq_growth_income", |
| 66 | + "hk_high_dividend_low_vol_trend", |
66 | 67 | "hk_listed_global_etf_rotation", |
| 68 | + "hk_low_vol_dividend_quality", |
67 | 69 | } |
68 | 70 | ) |
69 | 71 | HK_DISABLED_PROFILES = frozenset( |
@@ -1058,6 +1060,42 @@ def test_print_strategy_switch_env_plan_for_mega_cap_top50_balanced_profile(): |
1058 | 1060 | assert plan["hints"]["feature_snapshot_filename"] == "mega_cap_leader_rotation_top50_balanced_feature_snapshot_latest.csv" |
1059 | 1061 |
|
1060 | 1062 |
|
| 1063 | +def test_print_strategy_switch_env_plan_for_hk_low_vol_dividend_quality_profile(): |
| 1064 | + result = subprocess.run( |
| 1065 | + [ |
| 1066 | + sys.executable, |
| 1067 | + str(SWITCH_PLAN_SCRIPT_PATH), |
| 1068 | + "--profile", |
| 1069 | + "hk_low_vol_dividend_quality", |
| 1070 | + "--dry-run-only", |
| 1071 | + "--deployment-selector", |
| 1072 | + "hk-verify", |
| 1073 | + "--account-scope", |
| 1074 | + "HK", |
| 1075 | + "--service-name", |
| 1076 | + "interactive-brokers-hk-verify-service", |
| 1077 | + "--json", |
| 1078 | + ], |
| 1079 | + check=True, |
| 1080 | + capture_output=True, |
| 1081 | + text=True, |
| 1082 | + ) |
| 1083 | + |
| 1084 | + plan = json.loads(result.stdout) |
| 1085 | + assert plan["canonical_profile"] == "hk_low_vol_dividend_quality" |
| 1086 | + assert plan["enabled"] is True |
| 1087 | + assert plan["profile_group"] == "snapshot_backed" |
| 1088 | + assert plan["input_mode"] == "feature_snapshot" |
| 1089 | + assert plan["snapshot_contract_version"] == "hk_low_vol_dividend_quality.factor_snapshot.v1" |
| 1090 | + assert plan["set_env"]["IBKR_DRY_RUN_ONLY"] == "true" |
| 1091 | + assert plan["set_env"]["IBKR_FEATURE_SNAPSHOT_PATH"] == "<required>" |
| 1092 | + assert plan["set_env"]["IBKR_FEATURE_SNAPSHOT_MANIFEST_PATH"] == "<required>" |
| 1093 | + assert plan["hints"]["feature_snapshot_filename"] == "hk_low_vol_dividend_quality_factor_snapshot_latest.csv" |
| 1094 | + assert plan["hints"]["feature_snapshot_manifest_filename"] == ( |
| 1095 | + "hk_low_vol_dividend_quality_factor_snapshot_latest.csv.manifest.json" |
| 1096 | + ) |
| 1097 | + |
| 1098 | + |
1061 | 1099 | @pytest.mark.parametrize("profile", sorted(HK_DISABLED_PROFILES)) |
1062 | 1100 | def test_print_strategy_switch_env_plan_rejects_hk_disabled_profiles(profile): |
1063 | 1101 | result = subprocess.run( |
|
0 commit comments