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
3 changes: 0 additions & 3 deletions docs/platform_strategy_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ Important limitation:

Configurable runtime-enabled 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`
Expand Down
3 changes: 0 additions & 3 deletions docs/platform_strategy_matrix.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ _核对时间:2026-04-18_

当前 `us_equity` 域里已经启用的 runtime profile 有:

- `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`
Expand Down
7 changes: 1 addition & 6 deletions docs/us_equity_cross_platform_strategy_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,8 @@ Current runtime-enabled profiles can migrate incrementally, but the end state sh
`feature_snapshot` artifact delivery
- `tech_communication_pullback_enhancement`: portable through standardized `feature_snapshot`
artifact delivery
- `mega_cap_leader_rotation_aggressive`: portable through standardized
- `mega_cap_leader_rotation_top50_balanced`: portable through standardized
`feature_snapshot` artifact delivery
- `mega_cap_leader_rotation_dynamic_top20`: portable through standardized
`feature_snapshot` artifact delivery
- `dynamic_mega_leveraged_pullback`: portable through standardized
`feature_snapshot` artifact delivery plus canonical market, benchmark, and
portfolio inputs

New profiles should target the end state immediately instead of adding more
one-off runtime contracts.
6 changes: 1 addition & 5 deletions docs/us_equity_cross_platform_strategy_spec.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,7 @@ allowlist 只影响 `enabled`,不要再手写一堆“这个策略天生只能
- 通过标准化 `feature_snapshot` artifact contract 实现跨平台
- `tech_communication_pullback_enhancement`
- 通过标准化 `feature_snapshot` artifact contract 实现跨平台
- `mega_cap_leader_rotation_aggressive`
- `mega_cap_leader_rotation_top50_balanced`
- 通过标准化 `feature_snapshot` artifact contract 实现跨平台
- `mega_cap_leader_rotation_dynamic_top20`
- 通过标准化 `feature_snapshot` artifact contract 实现跨平台
- `dynamic_mega_leveraged_pullback`
- 通过标准化 `feature_snapshot` artifact contract,加标准 market、benchmark 和 portfolio 输入实现跨平台

以后新策略应该直接朝这个目标写,不要再新增一堆一次性的运行时契约。
39 changes: 1 addition & 38 deletions docs/us_equity_live_switch_runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Do **not** use it to justify switching a profile that is not already supported b

Configurable US equity profiles:

- `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`
Expand All @@ -28,7 +25,7 @@ Runtime platforms:
- `schwab`
- `longbridge`

For the current nine-profile scope, all three platforms now report the full matrix as `eligible=true` and `enabled=true`. That means switching among these supported profiles is an operational change, not a strategy-contract migration.
For the current six-profile scope, all three broker platforms report the runtime-enabled matrix as `eligible=true` and `enabled=true`. That means switching among these supported profiles is an operational change, not a strategy-contract migration.

## Operational profile groups

Expand All @@ -39,9 +36,6 @@ Treat the profiles as two operational groups:
- `tqqq_growth_income`
- `soxl_soxx_trend_income`
- **Snapshot-backed profiles**
- `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 @@ -119,10 +113,7 @@ If any of those checks fail, stop. That is a code or rollout problem, not a live

| Profile | Extra runtime inputs beyond `STRATEGY_PROFILE` |
| --- | --- |
| `dynamic_mega_leveraged_pullback` | feature snapshot path + snapshot manifest path |
| `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 |
Expand All @@ -133,7 +124,6 @@ Notes:

- `tech_communication_pullback_enhancement` on IBKR may also keep a reconciliation output path when the deployment wants that artifact.
- `tech_communication_pullback_enhancement` now has `config_source_policy=bundled_or_env`, so the packaged canonical config is used unless an env path is deliberately set.
- `dynamic_mega_leveraged_pullback` also uses market history, benchmark history, and portfolio snapshot, but the platform runtime supplies those from broker/runtime data, not extra artifact env.
- `russell_1000_multi_factor_defensive` currently requires the snapshot path but not a manifest path.
- When switching away from a feature-snapshot profile, remove stale snapshot/config envs from the service instead of leaving them behind.

Expand Down Expand Up @@ -376,33 +366,6 @@ Why:
- non-snapshot profiles do not need the feature-snapshot artifact chain
- SG often carries dry-run as an operational choice, not as a profile requirement

### Example E: switch LongBridge SG dry-run to `dynamic_mega_leveraged_pullback`

Keep:

- `ACCOUNT_PREFIX=SG`
- `ACCOUNT_REGION=SG`
- `LONGPORT_SECRET_NAME`
- `LONGPORT_APP_KEY_SECRET_NAME`
- `LONGPORT_APP_SECRET_SECRET_NAME`

Set:

- `STRATEGY_PROFILE=dynamic_mega_leveraged_pullback`
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
- `LONGBRIDGE_DRY_RUN_ONLY=true`

Remove if present:

- `LONGBRIDGE_STRATEGY_CONFIG_PATH`

Why:

- the strategy uses a feature snapshot for the dynamic mega-cap pool
- the daily market, benchmark, and portfolio inputs are supplied by the platform runtime
- dry-run is a deployment choice, not part of the strategy contract

## Rollback rules

Rollback is simple if you keep it operational:
Expand Down
33 changes: 1 addition & 32 deletions docs/us_equity_live_switch_runbook.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

可配置美股 profile:

- `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`
Expand All @@ -31,7 +28,7 @@
- `schwab`
- `longbridge`

对当前这 9 条策略来说,三个平台现在都已经是 `eligible=true` 且 `enabled=true`。也就是说,在这些受支持 profile 之间切换主要是运维切换,不再是契约迁移。
对当前这 6 条策略来说,三个券商平台现在都已经是 `eligible=true` 且 `enabled=true`。也就是说,在这些受支持 profile 之间切换主要是运维切换,不再是契约迁移。

## 运维分组

Expand All @@ -42,9 +39,6 @@
- `tqqq_growth_income`
- `soxl_soxx_trend_income`
- **snapshot 驱动策略**
- `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 @@ -122,10 +116,7 @@ PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/Us

| 策略 | 除了 `STRATEGY_PROFILE` 之外还需要的输入 |
| --- | --- |
| `dynamic_mega_leveraged_pullback` | feature snapshot 路径 + manifest 路径 |
| `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` | 无 |
Expand All @@ -136,7 +127,6 @@ PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/Us

- `tech_communication_pullback_enhancement` 在 IBKR 上如果还要留对账产物,可以继续配 reconciliation output path。
- `tech_communication_pullback_enhancement` 现在是 `config_source_policy=bundled_or_env`,默认使用策略包里的 canonical config,只有显式覆盖时才配 env path。
- `dynamic_mega_leveraged_pullback` 还会用到 market history、benchmark history 和 portfolio snapshot,但这些由平台运行时从券商/行情侧供应,不是额外 artifact env。
- `russell_1000_multi_factor_defensive` 目前只强制 snapshot 路径,不强制 manifest 路径。
- 如果从 feature-snapshot 策略切回普通策略,要把旧的 snapshot/config env 一起删掉,不要留脏状态。

Expand Down Expand Up @@ -377,27 +367,6 @@ gcloud run services describe longbridge-quant-sg-service \
- 非 snapshot 策略不需要 feature-snapshot artifact 链
- SG 是否 dry-run 是运维选择,不是策略本身要求

### 示例 E:把 LongBridge SG dry-run 切到 `dynamic_mega_leveraged_pullback`

保留:

- `ACCOUNT_PREFIX=SG`
- `ACCOUNT_REGION=SG`
- `LONGPORT_SECRET_NAME`
- `LONGPORT_APP_KEY_SECRET_NAME`
- `LONGPORT_APP_SECRET_SECRET_NAME`

设置:

- `STRATEGY_PROFILE=dynamic_mega_leveraged_pullback`
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
- `LONGBRIDGE_DRY_RUN_ONLY=true`

如果还留着,就删掉:

- `LONGBRIDGE_STRATEGY_CONFIG_PATH`

原因:

- 这个策略用 feature snapshot 获取动态 mega-cap 池
Comment on lines 370 to 372

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 Delete orphaned rationale after removing Example E

After the 示例 E section was removed, a second 原因 block remains and now has no owning example while still describing behavior specific to the deleted dynamic mega-cap profile. In docs/us_equity_live_switch_runbook.zh-CN.md, this leaves contradictory operator guidance in the LongBridge SG switch flow and can mislead readers into applying snapshot/runtime assumptions for a profile that is no longer in the supported runbook set.

Useful? React with 👍 / 👎.

Expand Down
3 changes: 0 additions & 3 deletions src/quant_platform_kit/common/notification_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
("russell_1000_multi_factor_defensive", "罗素1000多因子"),
("tech_communication_pullback_enhancement", "科技通信回调增强"),
("qqq_tech_enhancement", "科技通信回调增强"),
("mega_cap_leader_rotation_aggressive", "Mega Cap 激进龙头轮动"),
("mega_cap_leader_rotation_dynamic_top20", "Mega Cap 动态 Top20 龙头轮动"),
("mega_cap_leader_rotation_top50_balanced", "Mega Cap Top50 平衡龙头轮动"),
("dynamic_mega_leveraged_pullback", "Mega Cap 2x 回调策略"),
("outside_monthly_execution_window", "当前不在月度执行窗口"),
("no_execution_window_after_snapshot", "快照后没有可用执行窗口"),
("no-op", "不执行"),
Expand Down