Skip to content

Commit 5787f10

Browse files
Pigbibicodex
andcommitted
Support US core combo shadow profile
Co-Authored-By: Codex <noreply@openai.com>
1 parent 2161de4 commit 5787f10

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"google-cloud-storage",
2323
"yfinance",
2424
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@0063af3b4a974650ea58a7d3f26dd1b94f65d3e8",
25-
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@cd959e30e91e57697ad878d98799c1afb43bf5fb",
25+
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@67e1ed69d7b9c318f94c8809121d2b9481d6b11a",
2626
"hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@61993bf261aeccf64b5a75428b9405f4e1d1d682",
2727
]
2828

tests/test_runtime_config_support.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"soxl_soxx_trend_income",
7474
"tqqq_growth_income",
7575
"us_equity_combo",
76+
"us_equity_combo_core",
7677
"us_equity_combo_leveraged",
7778
"hk_global_etf_tactical_rotation",
7879
"hk_low_vol_dividend_quality_snapshot",
@@ -748,6 +749,18 @@ def test_load_platform_runtime_settings_accepts_nasdaq_sp500_smart_dca(monkeypat
748749
assert settings.strategy_profile == "nasdaq_sp500_smart_dca"
749750

750751

752+
def test_load_platform_runtime_settings_accepts_us_equity_combo_core(monkeypatch):
753+
monkeypatch.setenv("RUNTIME_TARGET_JSON", runtime_target_json("us_equity_combo_core"))
754+
monkeypatch.setenv("ACCOUNT_GROUP", "paper")
755+
monkeypatch.setenv("IB_ACCOUNT_GROUP_CONFIG_JSON", MINIMAL_GROUP_JSON)
756+
757+
settings = load_platform_runtime_settings(project_id_resolver=lambda: "project-1")
758+
759+
assert settings.strategy_profile == "us_equity_combo_core"
760+
assert settings.strategy_display_name == "US Core Combo Shadow"
761+
assert settings.strategy_target_mode == "weight"
762+
763+
751764
def test_load_platform_runtime_settings_rejects_legacy_qqq_tech_alias(monkeypatch):
752765
monkeypatch.setenv("RUNTIME_TARGET_JSON", runtime_target_json("tech_pullback_cash_buffer"))
753766
monkeypatch.setenv("ACCOUNT_GROUP", "paper")
@@ -788,6 +801,9 @@ def test_platform_profile_status_matrix_matches_current_ibkr_rollout():
788801
assert by_profile["tqqq_growth_income"]["enabled"] is True
789802
assert "nasdaq_sp500_smart_dca" in by_profile
790803
assert "ibit_smart_dca" in by_profile
804+
assert by_profile["us_equity_combo_core"]["display_name"] == "US Core Combo Shadow"
805+
assert by_profile["us_equity_combo_core"]["eligible"] is True
806+
assert by_profile["us_equity_combo_core"]["enabled"] is True
791807
assert by_profile["hk_global_etf_tactical_rotation"] == {
792808
"canonical_profile": "hk_global_etf_tactical_rotation",
793809
"display_name": "HK Global ETF Tactical Rotation",
@@ -834,6 +850,9 @@ def test_print_strategy_profile_status_json_matches_registry():
834850
assert by_profile["global_etf_rotation"]["requires_strategy_config_path"] is False
835851
assert "nasdaq_sp500_smart_dca" in by_profile
836852
assert "ibit_smart_dca" in by_profile
853+
assert by_profile["us_equity_combo_core"]["profile_group"] == "direct_runtime_inputs"
854+
assert by_profile["us_equity_combo_core"]["input_mode"] == "current_holdings+russell_snapshot"
855+
assert by_profile["us_equity_combo_core"]["requires_strategy_config_path"] is False
837856
assert by_profile["us_equity_combo_leveraged"]["profile_group"] == "direct_runtime_inputs"
838857
assert by_profile["us_equity_combo_leveraged"]["input_mode"] == "market_data"
839858
assert by_profile["us_equity_combo_leveraged"]["requires_strategy_config_path"] is False

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)