You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-26Lines changed: 28 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
Quant system on LongPort OpenAPI and Google Cloud Run.
11
11
12
12
This repository uses `QuantPlatformKit` for LongPort token handling, context bootstrap, account snapshot access, market data, and order submission. Cloud Run deploys this repository directly.
13
-
The LongBridge runtime can execute all seven live `us_equity` profiles from `UsEquityStrategies`; `LongBridgePlatform` keeps the LongPort runtime, token refresh, execution, and notification flow.
13
+
The LongBridge runtime can execute all eight live `us_equity` profiles from `UsEquityStrategies`; `LongBridgePlatform` keeps the LongPort runtime, token refresh, execution, and notification flow.
14
14
15
15
Full strategy documentation now lives in [`UsEquityStrategies`](https://github.com/QuantStrategyLab/UsEquityStrategies). The sections below focus on LongBridge runtime behavior, profile enablement, deployment, and credentials.
16
16
This runtime matrix is the authoritative enablement source for LongBridge. `UsEquityStrategies` carries strategy-layer logic, cadence, compatibility, and metadata.
@@ -29,15 +29,16 @@ Platform execution no longer depends on `strategy/allocation.py` or hard-coded s
|`global_etf_rotation`| Global ETF Rotation | Yes | Yes | No | No |`us_equity`| enabled weight-mode rotation line |
35
-
|`russell_1000_multi_factor_defensive`| Russell 1000 Multi-Factor | Yes | Yes | No | No |`us_equity`| enabled feature-snapshot stock baseline |
36
-
|`mega_cap_leader_rotation_dynamic_top20`| Mega Cap Leader Rotation Dynamic Top20 | Yes | Yes | No | No |`us_equity`| selectable monthly feature-snapshot leader rotation |
37
-
|`dynamic_mega_leveraged_pullback`| Dynamic Mega Leveraged Pullback | Yes | Yes | No | No |`us_equity`| selectable 2x mega-cap pullback line |
38
-
|`soxl_soxx_trend_income`| SOXL/SOXX Semiconductor Trend Income | Yes | Yes | Yes | Yes |`us_equity`| current LongBridge default |
39
-
|`tqqq_growth_income`| TQQQ Growth Income | Yes | Yes | No | No |`us_equity`| current SG dry-run line |
40
-
|`tech_communication_pullback_enhancement`| Tech/Communication Pullback Enhancement | Yes | Yes | No | No |`us_equity`| current HK feature-snapshot line |
|`mega_cap_leader_rotation_aggressive`| Mega Cap Leader Rotation Aggressive | Yes | Yes |`us_equity`| selectable aggressive monthly feature-snapshot leader rotation |
37
+
|`mega_cap_leader_rotation_dynamic_top20`| Mega Cap Leader Rotation Dynamic Top20 | Yes | Yes |`us_equity`| selectable monthly feature-snapshot leader rotation |
38
+
|`dynamic_mega_leveraged_pullback`| Dynamic Mega Leveraged Pullback | Yes | Yes |`us_equity`| selectable 2x mega-cap pullback line |
39
+
|`soxl_soxx_trend_income`| SOXL/SOXX Semiconductor Trend Income | Yes | Yes |`us_equity`| current SG deployment |
40
+
|`tqqq_growth_income`| TQQQ Growth Income | Yes | Yes |`us_equity`| selectable growth line |
41
+
|`tech_communication_pullback_enhancement`| Tech/Communication Pullback Enhancement | Yes | Yes |`us_equity`| current HK feature-snapshot line |
41
42
42
43
Check the current matrix locally:
43
44
@@ -63,7 +64,7 @@ Telegram notifications include structured execution and heartbeat messages, with
63
64
|`LONGPORT_APP_SECRET`| Yes | LongPort OpenAPI app secret (for token refresh); recommended to inject from the region-specific Secret Manager secret for this deployment, such as `longport-app-secret-hk` / `longport-app-secret-sg`|
64
65
|`LONGPORT_SECRET_NAME`| No | Secret Manager secret name for LongPort token (default: `longport_token_hk`) |
65
66
|`ACCOUNT_PREFIX`| No | Alert/log prefix for account/environment (default: `DEFAULT`) |
66
-
|`STRATEGY_PROFILE`|No| Strategy profile selector (default: `soxl_soxx_trend_income`; enabled values include `dynamic_mega_leveraged_pullback`, `global_etf_rotation`, `mega_cap_leader_rotation_dynamic_top20`, `russell_1000_multi_factor_defensive`, `soxl_soxx_trend_income`, `tech_communication_pullback_enhancement`, and `tqqq_growth_income`)|
67
+
|`STRATEGY_PROFILE`|Yes| Strategy profile selector. Set explicitly per deployment; enabled values include `dynamic_mega_leveraged_pullback`, `global_etf_rotation`, `mega_cap_leader_rotation_aggressive`, `mega_cap_leader_rotation_dynamic_top20`, `russell_1000_multi_factor_defensive`, `soxl_soxx_trend_income`, `tech_communication_pullback_enhancement`, and `tqqq_growth_income`|
67
68
|`ACCOUNT_REGION`| No | Account region marker for platform-style deployment (e.g. `HK`, `SG`; defaults to `ACCOUNT_PREFIX` / `DEFAULT`) |
68
69
|`LONGBRIDGE_DRY_RUN_ONLY`| No | Set to `true` to keep the selected deployment in dry-run mode. |
69
70
|`INCOME_THRESHOLD_USD`| No | Optional override for the `tqqq_growth_income` income-layer threshold. Leave unset to use the strategy package default. |
@@ -89,7 +90,7 @@ Deploy the same codebase as multiple Cloud Run services (e.g. `HK` and `SG`) by
89
90
90
91
-`LONGPORT_SECRET_NAME`: point to different secrets (e.g. `longport_token_hk`, `longport_token_sg`)
91
92
-`ACCOUNT_PREFIX`: e.g. `HK`, `SG` (all Telegram/log alerts will include `[ACCOUNT_PREFIX]`)
92
-
-`STRATEGY_PROFILE`: set per service; current live examples are `tech_communication_pullback_enhancement` on HK and `tqqq_growth_income` on SG
93
+
-`STRATEGY_PROFILE`: set per service; current live examples are `tech_communication_pullback_enhancement` on HK and `soxl_soxx_trend_income` on SG
93
94
- Current strategy domain is `us_equity`. `STRATEGY_PROFILE` now goes through a platform capability matrix plus a rollout allowlist derived from `runtime_enabled` strategy metadata: `eligible` means the platform can run it in theory, `enabled` means the current rollout really allows it.
94
95
-`ACCOUNT_REGION`: explicitly mark the deployed account region (`HK` / `SG`); if unset, the app falls back to `ACCOUNT_PREFIX` or `DEFAULT`
95
96
-`LONGBRIDGE_DRY_RUN_ONLY`: set per service when that deployment should stay dry-run
On every push to `main`, the workflow updates both Cloud Run services with the shared and per-environment values above, and removes `TELEGRAM_CHAT_ID` from each Cloud Run service.
@@ -157,7 +158,7 @@ IAM: the Cloud Run service account needs **Secret Manager Admin** (or Secret Acc
157
158
基于 LongPort OpenAPI 和 Google Cloud Run 的量化交易系统。
158
159
159
160
这个仓库通过 `QuantPlatformKit` 复用 LongPort token 处理、上下文初始化、账户快照、行情读取和下单逻辑。Cloud Run 直接部署这个仓库。
0 commit comments