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
19 changes: 11 additions & 8 deletions docs/platform_runtime_inventory.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Platform Runtime Inventory

_Verified snapshot: 2026-04-14_
_Verified snapshot: 2026-04-18_

This document records the **current live runtime inventory** across platform repositories and deployment projects. It is meant to answer one question quickly:

Expand Down Expand Up @@ -28,7 +28,7 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
|---|---|---:|---|---|---|---|
| IBKR | `QuantStrategyLab/InteractiveBrokersPlatform` | `us_equity` | `soxl_soxx_trend_income` | Cloud Run | `interactivebrokersquant` | `interactive-brokers-quant-service` |
| Schwab | `QuantStrategyLab/CharlesSchwabPlatform` | `us_equity` | `tqqq_growth_income` | Cloud Run | `charlesschwabquant` | `charles-schwab-quant-service` |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement` / `SG: tqqq_growth_income` | Cloud Run | `longbridgequant` | `longbridge-quant-hk-service`, `longbridge-quant-sg-service` |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement` / `SG: soxl_soxx_trend_income` | Cloud Run | `longbridgequant` | `longbridge-quant-hk-service`, `longbridge-quant-sg-service` |
| Binance | `QuantStrategyLab/BinancePlatform` | `crypto` | `crypto_leader_rotation` | Oracle Cloud + self-hosted runner | `binancequant` only for Firestore / GCP credentials | GitHub Actions `workflow_dispatch` + self-hosted runner |

## Platform details
Expand All @@ -44,7 +44,7 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
- **Runtime service account**
- `ibkr-platform-runtime@interactivebrokersquant.iam.gserviceaccount.com`
- **Current ready revision**
- `interactive-brokers-quant-service-00072-2hn`
- `interactive-brokers-quant-service-00111-wr5`
- **Scheduler**
- `interactive-brokers-quant-service-scheduler`
- region: `us-central1`
Expand All @@ -56,7 +56,7 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
- `ibkr-account-groups`
- `interactive-brokers-telegram-token`
- **Current notes**
- Transitional envs `IB_GATEWAY_ZONE` and `IB_GATEWAY_IP_MODE` have already been removed from the service because the selected account-group payload now carries those values.
- Transitional envs `IB_GATEWAY_ZONE=us-central1-c` and `IB_GATEWAY_IP_MODE=internal` are still present as service-level fallbacks; the target state is to keep these in the selected account-group payload.

### Charles Schwab

Expand All @@ -69,19 +69,21 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
- **Runtime service account**
- `schwab-platform-runtime@charlesschwabquant.iam.gserviceaccount.com`
- **Current ready revision**
- `charles-schwab-quant-service-00043-jvd`
- `charles-schwab-quant-service-00092-8hz`
- **Scheduler**
- `charles-schwab-quant-service-scheduler`
- region: `us-central1`
- **Core runtime selectors**
- `STRATEGY_PROFILE=tqqq_growth_income`
- `DUAL_DRIVE_UNLEVERED_SYMBOL=QQQM`
- **Runtime secrets**
- `schwab_token`
- `charles-schwab-api-key`
- `charles-schwab-app-secret`
- `charles-schwab-telegram-token`
- **Current notes**
- Runtime-sensitive envs have already been moved off plain Cloud Run env vars and into Secret Manager refs.
- `crisis_response_shadow` is mounted for `tqqq_growth_income` in `shadow` mode. It is log/notification context only and does not change allocation.
- The token refresher lives outside this repo:
- `QuantStrategyLab/SchwabTokenAutoRefresher`

Expand All @@ -97,13 +99,13 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
- **Runtime service account**
- `longbridge-platform-runtime@longbridgequant.iam.gserviceaccount.com`
- **Current ready revisions**
- HK: `longbridge-quant-hk-service-00060-xgm`
- SG: `longbridge-quant-sg-service-00055-pch`
- HK: `longbridge-quant-hk-service-00086-slh`
- SG: `longbridge-quant-sg-service-00089-526`
- **Schedulers**
- `longbridge-quant-hk-service-scheduler` in `asia-east2`
- `longbridge-quant-sg-service-scheduler` in `asia-southeast1`
- **Core runtime selectors**
- `STRATEGY_PROFILE=tech_communication_pullback_enhancement on HK; STRATEGY_PROFILE=tqqq_growth_income on SG`
- `STRATEGY_PROFILE=tech_communication_pullback_enhancement on HK; STRATEGY_PROFILE=soxl_soxx_trend_income on SG`
- `ACCOUNT_REGION=HK|SG`
- `LONGPORT_SECRET_NAME=longport_token_hk|longport_token_sg`
- **Runtime secrets**
Expand All @@ -118,6 +120,7 @@ For the current platform / strategy-domain / live-profile matrix, see [`platform
- `longport_token_sg`
- **Current notes**
- HK and SG keep two independent Cloud Run services, two triggers, and two GitHub Environments.
- HK uses feature-snapshot envs for `tech_communication_pullback_enhancement`; SG is currently on the direct-runtime `soxl_soxx_trend_income` profile.
- App key / secret are region-specific Secret Manager refs; Telegram token is shared inside the LongBridge project.
- `SERVICE_NAME` is now aligned to the full runtime-facing names above, instead of using the older short `longbridge-quant-hk` / `longbridge-quant-sg` prefixes.

Expand Down
19 changes: 11 additions & 8 deletions docs/platform_runtime_inventory.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 平台运行清单

_校验快照日期:2026-04-14_
_校验快照日期:2026-04-18_

这份文档记录的是**当前线上真实运行清单**,用来快速回答一个问题:

Expand Down Expand Up @@ -28,7 +28,7 @@ _校验快照日期:2026-04-14_
|---|---|---:|---|---|---|---|
| IBKR | `QuantStrategyLab/InteractiveBrokersPlatform` | `us_equity` | `soxl_soxx_trend_income` | Cloud Run | `interactivebrokersquant` | `interactive-brokers-quant-service` |
| Schwab | `QuantStrategyLab/CharlesSchwabPlatform` | `us_equity` | `tqqq_growth_income` | Cloud Run | `charlesschwabquant` | `charles-schwab-quant-service` |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement` / `SG: tqqq_growth_income` | Cloud Run | `longbridgequant` | `longbridge-quant-hk-service`、`longbridge-quant-sg-service` |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement` / `SG: soxl_soxx_trend_income` | Cloud Run | `longbridgequant` | `longbridge-quant-hk-service`、`longbridge-quant-sg-service` |
| Binance | `QuantStrategyLab/BinancePlatform` | `crypto` | `crypto_leader_rotation` | Oracle Cloud + self-hosted runner | `binancequant` 只承担 Firestore / GCP 凭据 | GitHub Actions `workflow_dispatch` + self-hosted runner |

## 各平台明细
Expand All @@ -44,7 +44,7 @@ _校验快照日期:2026-04-14_
- **runtime service account**
- `ibkr-platform-runtime@interactivebrokersquant.iam.gserviceaccount.com`
- **当前 ready revision**
- `interactive-brokers-quant-service-00072-2hn`
- `interactive-brokers-quant-service-00111-wr5`
- **Scheduler**
- `interactive-brokers-quant-service-scheduler`
- region:`us-central1`
Expand All @@ -56,7 +56,7 @@ _校验快照日期:2026-04-14_
- `ibkr-account-groups`
- `interactive-brokers-telegram-token`
- **当前说明**
- 过渡 env `IB_GATEWAY_ZONE`、`IB_GATEWAY_IP_MODE` 已经从服务上删掉,因为当前选中的 account-group payload 已经带了这两个值
- 过渡 env `IB_GATEWAY_ZONE=us-central1-c`、`IB_GATEWAY_IP_MODE=internal` 目前仍作为服务级 fallback 保留;目标状态仍然是放进选中的 account-group payload。

### Charles Schwab

Expand All @@ -69,19 +69,21 @@ _校验快照日期:2026-04-14_
- **runtime service account**
- `schwab-platform-runtime@charlesschwabquant.iam.gserviceaccount.com`
- **当前 ready revision**
- `charles-schwab-quant-service-00043-jvd`
- `charles-schwab-quant-service-00092-8hz`
- **Scheduler**
- `charles-schwab-quant-service-scheduler`
- region:`us-central1`
- **核心运行选择器**
- `STRATEGY_PROFILE=tqqq_growth_income`
- `DUAL_DRIVE_UNLEVERED_SYMBOL=QQQM`
- **运行时 secret**
- `schwab_token`
- `charles-schwab-api-key`
- `charles-schwab-app-secret`
- `charles-schwab-telegram-token`
- **当前说明**
- 运行时敏感配置已经不再走 Cloud Run 明文 env,而是走 Secret Manager 引用。
- `crisis_response_shadow` 以 `shadow` 模式挂载到 `tqqq_growth_income`;它只进入日志/通知上下文,不改变 allocation。
- token refresher 不在这个仓库里,而是在:
- `QuantStrategyLab/SchwabTokenAutoRefresher`

Expand All @@ -97,13 +99,13 @@ _校验快照日期:2026-04-14_
- **runtime service account**
- `longbridge-platform-runtime@longbridgequant.iam.gserviceaccount.com`
- **当前 ready revision**
- HK:`longbridge-quant-hk-service-00060-xgm`
- SG:`longbridge-quant-sg-service-00055-pch`
- HK:`longbridge-quant-hk-service-00086-slh`
- SG:`longbridge-quant-sg-service-00089-526`
- **Scheduler**
- `longbridge-quant-hk-service-scheduler`(`asia-east2`)
- `longbridge-quant-sg-service-scheduler`(`asia-southeast1`)
- **核心运行选择器**
- `STRATEGY_PROFILE=HK 使用 tech_communication_pullback_enhancement;SG 使用 tqqq_growth_income`
- `STRATEGY_PROFILE=HK 使用 tech_communication_pullback_enhancement;SG 使用 soxl_soxx_trend_income`
- `ACCOUNT_REGION=HK|SG`
- `LONGPORT_SECRET_NAME=longport_token_hk|longport_token_sg`
- **运行时 secret**
Expand All @@ -118,6 +120,7 @@ _校验快照日期:2026-04-14_
- `longport_token_sg`
- **当前说明**
- HK / SG 继续保持两个 Cloud Run 服务、两个 trigger、两个 GitHub Environment。
- HK 使用 `tech_communication_pullback_enhancement` 的 feature-snapshot env;SG 当前是直接运行输入的 `soxl_soxx_trend_income`。
- App key / secret 现在使用分区域的 Secret Manager 引用;Telegram token 在 LongBridge 项目内共享。
- `SERVICE_NAME` 现在也已经对齐到上面的完整运行时名字,不再使用旧的 `longbridge-quant-hk` / `longbridge-quant-sg` 这种短前缀。

Expand Down
9 changes: 7 additions & 2 deletions docs/platform_strategy_matrix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Platform Strategy Matrix

_Verified snapshot: 2026-04-15_
_Verified snapshot: 2026-04-18_

This page is the short answer to one question:

Expand All @@ -10,6 +10,9 @@ For live runtime projects, services, schedulers, runtime identities, and secret

For repository responsibility boundaries, see [`platform_repo_boundaries.md`](./platform_repo_boundaries.md).

For strategy behavior, research status, and archived backtest evidence, see
`UsEquityStrategies/docs/us_equity_strategy_status.zh-CN.md`.

## Summary

- There are currently two strategy domains:
Expand All @@ -26,7 +29,7 @@ For repository responsibility boundaries, see [`platform_repo_boundaries.md`](./
|---|---|---|---|---|---|
| IBKR | `QuantStrategyLab/InteractiveBrokersPlatform` | `us_equity` | `soxl_soxx_trend_income` | Cloud Run | Yes - rollout allowlist can switch among supported profiles |
| Charles Schwab | `QuantStrategyLab/CharlesSchwabPlatform` | `us_equity` | `tqqq_growth_income` | Cloud Run | Yes - rollout allowlist can switch among supported profiles |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `tech_communication_pullback_enhancement` on HK / `tqqq_growth_income` on SG | Cloud Run | Yes - rollout allowlist can switch among supported profiles |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `tech_communication_pullback_enhancement` on HK / `soxl_soxx_trend_income` on SG | Cloud Run | Yes - rollout allowlist can switch among supported profiles |
| Binance | `QuantStrategyLab/BinancePlatform` | `crypto` | `crypto_leader_rotation` | Oracle Cloud + self-hosted runner | No - only this profile is supported today |

## What this means right now
Expand All @@ -49,7 +52,9 @@ Currently enabled live profiles in `us_equity`:

- `dynamic_mega_leveraged_pullback`
- `global_etf_rotation`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `soxl_soxx_trend_income`
- `tqqq_growth_income`
Expand Down
9 changes: 7 additions & 2 deletions docs/platform_strategy_matrix.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 平台策略矩阵

_核对时间:2026-04-15_
_核对时间:2026-04-18_

这页只回答一个问题:

Expand All @@ -10,6 +10,9 @@ _核对时间:2026-04-15_

如果要看仓库职责边界,请看 [`platform_repo_boundaries.zh-CN.md`](./platform_repo_boundaries.zh-CN.md)。

如果要看每条策略的特点、研究状态和已归档回测证据,请看
`UsEquityStrategies/docs/us_equity_strategy_status.zh-CN.md`。

## 总结

- 当前只有两个策略大类:
Expand All @@ -26,7 +29,7 @@ _核对时间:2026-04-15_
|---|---|---|---|---|---|
| IBKR | `QuantStrategyLab/InteractiveBrokersPlatform` | `us_equity` | `soxl_soxx_trend_income` | Cloud Run | 可以,rollout allowlist 可在受支持 profile 间切换 |
| Charles Schwab | `QuantStrategyLab/CharlesSchwabPlatform` | `us_equity` | `tqqq_growth_income` | Cloud Run | 可以,rollout allowlist 可在受支持 profile 间切换 |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement / SG: tqqq_growth_income` | Cloud Run | 可以,rollout allowlist 可在受支持 profile 间切换 |
| LongBridge | `QuantStrategyLab/LongBridgePlatform` | `us_equity` | `HK: tech_communication_pullback_enhancement / SG: soxl_soxx_trend_income` | Cloud Run | 可以,rollout allowlist 可在受支持 profile 间切换 |
| Binance | `QuantStrategyLab/BinancePlatform` | `crypto` | `crypto_leader_rotation` | Oracle Cloud + self-hosted runner | 不能,当前只支持这个 profile |

## 这张表现在该怎么理解
Expand All @@ -49,7 +52,9 @@ _核对时间:2026-04-15_

- `dynamic_mega_leveraged_pullback`
- `global_etf_rotation`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `tqqq_growth_income`
- `soxl_soxx_trend_income`
Expand Down
5 changes: 4 additions & 1 deletion docs/us_equity_live_switch_runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Current live US equity profiles:
- `global_etf_rotation`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `soxl_soxx_trend_income`
- `tqqq_growth_income`
Expand All @@ -27,7 +28,7 @@ Current runtime platforms:
- `schwab`
- `longbridge`

For the current eight-profile scope, all three platforms now report the full matrix as `eligible=true` and `enabled=true`. That means live switching is now an operational change, not a strategy-contract migration.
For the current nine-profile scope, all three platforms now report the full matrix as `eligible=true` and `enabled=true`. That means live switching is now an operational change, not a strategy-contract migration.

## Operational profile groups

Expand All @@ -41,6 +42,7 @@ Treat the live profiles as two operational groups:
- `dynamic_mega_leveraged_pullback`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `tech_communication_pullback_enhancement`

Expand Down Expand Up @@ -121,6 +123,7 @@ If any of those checks fail, stop. That is a code or rollout problem, not a live
| `global_etf_rotation` | none |
| `mega_cap_leader_rotation_aggressive` | feature snapshot path + snapshot manifest path |
| `mega_cap_leader_rotation_dynamic_top20` | feature snapshot path + snapshot manifest path |
| `mega_cap_leader_rotation_top50_balanced` | feature snapshot path + snapshot manifest path |
| `russell_1000_multi_factor_defensive` | feature snapshot path |
| `soxl_soxx_trend_income` | none |
| `tqqq_growth_income` | none |
Expand Down
5 changes: 4 additions & 1 deletion docs/us_equity_live_switch_runbook.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- `global_etf_rotation`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `soxl_soxx_trend_income`
- `tqqq_growth_income`
Expand All @@ -30,7 +31,7 @@
- `schwab`
- `longbridge`

对当前这 8 条策略来说,三个平台现在都已经是 `eligible=true` 且 `enabled=true`。也就是说,接下来换线上策略主要是运维切换,不再是契约迁移。
对当前这 9 条策略来说,三个平台现在都已经是 `eligible=true` 且 `enabled=true`。也就是说,接下来换线上策略主要是运维切换,不再是契约迁移。

## 运维分组

Expand All @@ -44,6 +45,7 @@
- `dynamic_mega_leveraged_pullback`
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_dynamic_top20`
- `mega_cap_leader_rotation_top50_balanced`
- `russell_1000_multi_factor_defensive`
- `tech_communication_pullback_enhancement`

Expand Down Expand Up @@ -124,6 +126,7 @@ PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/Us
| `global_etf_rotation` | 无 |
| `mega_cap_leader_rotation_aggressive` | feature snapshot 路径 + manifest 路径 |
| `mega_cap_leader_rotation_dynamic_top20` | feature snapshot 路径 + manifest 路径 |
| `mega_cap_leader_rotation_top50_balanced` | feature snapshot 路径 + manifest 路径 |
| `russell_1000_multi_factor_defensive` | feature snapshot 路径 |
| `soxl_soxx_trend_income` | 无 |
| `tqqq_growth_income` | 无 |
Expand Down
6 changes: 3 additions & 3 deletions docs/us_equity_release_cutover_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ If any repo still has unrelated local edits, split or stash them before creating
| --- | --- | --- |
| `charles-schwab-quant-service` | `tqqq_growth_income` | TQQQ Growth Income should remain the Schwab live profile |
| `longbridge-quant-hk-service` | `tech_communication_pullback_enhancement` | HK should move to Tech/Communication Pullback Enhancement |
| `longbridge-quant-sg-service` | `tqqq_growth_income` | SG should remain TQQQ Growth Income |
| `longbridge-quant-sg-service` | `soxl_soxx_trend_income` | SG should run SOXL/SOXX Semiconductor Trend Income |
| `interactive-brokers-quant-service` | `soxl_soxx_trend_income` | IBKR should move to SOXL/SOXX Semiconductor Trend Income |

## Cutover env changes
Expand Down Expand Up @@ -239,7 +239,7 @@ Set:

- `ACCOUNT_PREFIX=SG`
- `ACCOUNT_REGION=SG`
- `STRATEGY_PROFILE=tqqq_growth_income`
- `STRATEGY_PROFILE=soxl_soxx_trend_income`

Keep current dry-run choice unless separately changed:

Expand Down Expand Up @@ -302,7 +302,7 @@ Then verify the first heartbeat / execution notification:

- Schwab -> `TQQQ Growth Income`
- LongBridge HK -> `Tech/Communication Pullback Enhancement`
- LongBridge SG -> `TQQQ Growth Income`
- LongBridge SG -> `SOXL/SOXX Semiconductor Trend Income`
- IBKR -> `SOXL/SOXX Semiconductor Trend Income`

## Rollback rules
Expand Down
6 changes: 3 additions & 3 deletions docs/us_equity_release_cutover_plan.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ git push origin HEAD
| --- | --- | --- |
| `charles-schwab-quant-service` | `tqqq_growth_income` | Schwab 继续跑 TQQQ 增长收益 |
| `longbridge-quant-hk-service` | `tech_communication_pullback_enhancement` | HK 切到科技通信回调增强 |
| `longbridge-quant-sg-service` | `tqqq_growth_income` | SG 继续跑 TQQQ 增长收益 |
| `longbridge-quant-sg-service` | `soxl_soxx_trend_income` | SG 运行 SOXL/SOXX 半导体趋势收益 |
| `interactive-brokers-quant-service` | `soxl_soxx_trend_income` | IBKR 切到 SOXL/SOXX 半导体趋势收益 |

## 切换时要改的 env
Expand Down Expand Up @@ -239,7 +239,7 @@ git push origin HEAD

- `ACCOUNT_PREFIX=SG`
- `ACCOUNT_REGION=SG`
- `STRATEGY_PROFILE=tqqq_growth_income`
- `STRATEGY_PROFILE=soxl_soxx_trend_income`

是否继续 dry-run,保持当前决定:

Expand Down Expand Up @@ -302,7 +302,7 @@ git push origin HEAD

- Schwab -> `TQQQ Growth Income`
- LongBridge HK -> `Tech/Communication Pullback Enhancement`
- LongBridge SG -> `TQQQ Growth Income`
- LongBridge SG -> `SOXL/SOXX Semiconductor Trend Income`
- IBKR -> `SOXL/SOXX Semiconductor Trend Income`

## 回滚原则
Expand Down