Skip to content
Merged
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"google-cloud-storage",
"yfinance",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@0063af3b4a974650ea58a7d3f26dd1b94f65d3e8",
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@cd959e30e91e57697ad878d98799c1afb43bf5fb",
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@67e1ed69d7b9c318f94c8809121d2b9481d6b11a",
"hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@61993bf261aeccf64b5a75428b9405f4e1d1d682",
]

Expand Down
19 changes: 19 additions & 0 deletions tests/test_runtime_config_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"soxl_soxx_trend_income",
"tqqq_growth_income",
"us_equity_combo",
"us_equity_combo_core",
"us_equity_combo_leveraged",
"hk_global_etf_tactical_rotation",
"hk_low_vol_dividend_quality_snapshot",
Expand Down Expand Up @@ -748,6 +749,18 @@ def test_load_platform_runtime_settings_accepts_nasdaq_sp500_smart_dca(monkeypat
assert settings.strategy_profile == "nasdaq_sp500_smart_dca"


def test_load_platform_runtime_settings_accepts_us_equity_combo_core(monkeypatch):
monkeypatch.setenv("RUNTIME_TARGET_JSON", runtime_target_json("us_equity_combo_core"))
monkeypatch.setenv("ACCOUNT_GROUP", "paper")
monkeypatch.setenv("IB_ACCOUNT_GROUP_CONFIG_JSON", MINIMAL_GROUP_JSON)

settings = load_platform_runtime_settings(project_id_resolver=lambda: "project-1")

assert settings.strategy_profile == "us_equity_combo_core"
assert settings.strategy_display_name == "US Core Combo Shadow"
assert settings.strategy_target_mode == "weight"


def test_load_platform_runtime_settings_rejects_legacy_qqq_tech_alias(monkeypatch):
monkeypatch.setenv("RUNTIME_TARGET_JSON", runtime_target_json("tech_pullback_cash_buffer"))
monkeypatch.setenv("ACCOUNT_GROUP", "paper")
Expand Down Expand Up @@ -788,6 +801,9 @@ def test_platform_profile_status_matrix_matches_current_ibkr_rollout():
assert by_profile["tqqq_growth_income"]["enabled"] is True
assert "nasdaq_sp500_smart_dca" in by_profile
assert "ibit_smart_dca" in by_profile
assert by_profile["us_equity_combo_core"]["display_name"] == "US Core Combo Shadow"
assert by_profile["us_equity_combo_core"]["eligible"] is True
assert by_profile["us_equity_combo_core"]["enabled"] is True
assert by_profile["hk_global_etf_tactical_rotation"] == {
"canonical_profile": "hk_global_etf_tactical_rotation",
"display_name": "HK Global ETF Tactical Rotation",
Expand Down Expand Up @@ -834,6 +850,9 @@ def test_print_strategy_profile_status_json_matches_registry():
assert by_profile["global_etf_rotation"]["requires_strategy_config_path"] is False
assert "nasdaq_sp500_smart_dca" in by_profile
assert "ibit_smart_dca" in by_profile
assert by_profile["us_equity_combo_core"]["profile_group"] == "direct_runtime_inputs"
assert by_profile["us_equity_combo_core"]["input_mode"] == "current_holdings+russell_snapshot"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add signal runtime support before enabling core combo

This enables us_equity_combo_core as an IBKR profile while the status now declares its input mode as current_holdings+russell_snapshot, but the live signal path in LoadedStrategyRuntime.evaluate only dispatches feature_snapshot, market_data, market_history, or portfolio_snapshot plus derived/benchmark inputs before raising ValueError("Unsupported required_inputs..."). In any Cloud Run/service target that selects this new profile, config loading and status checks can pass, but signal computation will fail because no runtime branch materializes russell_snapshot or handles this input combination; add that runtime path or keep the profile out of the enabled set until it exists.

Useful? React with 👍 / 👎.

assert by_profile["us_equity_combo_core"]["requires_strategy_config_path"] is False
assert by_profile["us_equity_combo_leveraged"]["profile_group"] == "direct_runtime_inputs"
assert by_profile["us_equity_combo_leveraged"]["input_mode"] == "market_data"
assert by_profile["us_equity_combo_leveraged"]["requires_strategy_config_path"] is False
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading