Expose disabled HK strategy profiles#107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b4ca3dae6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| os.getenv("ACCOUNT_REGION"), | ||
| account_prefix=account_prefix, | ||
| ) | ||
| market = infer_market(os.getenv("LONGBRIDGE_MARKET"), account_region=account_region) |
There was a problem hiding this comment.
Do not infer HK market from account region
When the longbridge-hk deployment runs any of the currently enabled US-equity profiles with LONGBRIDGE_MARKET unset, this fallback turns ACCOUNT_REGION=HK into the HK market defaults. In this commit the HK profiles are still disabled while the enabled profiles are US profiles, so the HK-region service will start using .HK symbols, HKD cash, and the XHKG calendar for symbols like SOXL/QQQ, causing quotes/orders to target the wrong market or see zero usable USD cash. The market should stay US unless an explicit market/profile selection requires HK.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d35e1c588
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| os.getenv("ACCOUNT_REGION"), | ||
| account_prefix=account_prefix, | ||
| ) | ||
| market = infer_market(os.getenv("LONGBRIDGE_MARKET"), account_region=account_region) |
There was a problem hiding this comment.
Keep HK deployments on explicit US market defaults
When the HK Cloud Run environment does not define LONGBRIDGE_MARKET, this now derives market=HK solely from ACCOUNT_REGION=HK, even though the currently enabled LongBridge profiles are still US-equity profiles and the HK profiles remain disabled. The fresh evidence is that this commit also makes env sync remove LONGBRIDGE_MARKET when the GitHub variable is unset, so the HK service can start using .HK/HKD/XHKG defaults for profiles such as SOXL/QQQ after a sync. Please keep the market default tied to the selected strategy/domain, or require an explicit HK market/profile selection before switching defaults.
Useful? React with 👍 / 👎.
Summary
hk_listed_global_etf_rotationafter the HK strategy package added the research candidateHkEquityStrategiesto the new commitSafety
STRATEGY_PROFILEremains rejected for HK research candidatesValidation
PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m pytest tests/test_runtime_config_support.py -q -k 'not print_strategy_profile_status_json and not print_strategy_switch_env_plan'-> 33 passed, 8 deselected, 10 subtests passedbash tests/test_sync_cloud_run_env_workflow.shPYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m compileall -q . && git diff --checkKnown local limitation: full subprocess-based strategy status tests are affected by sibling
UsEquityStrategies/srcpath precedence on this machine; the targeted non-subprocess/runtime checks above passed.