Skip to content

Commit 39c0b5b

Browse files
committed
Add live switch examples to the runbook
1 parent d0889f3 commit 39c0b5b

2 files changed

Lines changed: 190 additions & 0 deletions

File tree

docs/us_equity_live_switch_runbook.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,101 @@ If the profile uses feature snapshots, also verify:
237237
- the manifest matches the expected contract version
238238
- the managed symbols in the first notification match the intended strategy
239239

240+
## Common switch examples
241+
242+
Use these as concrete templates. They are not the only valid switches, but they cover the most common operational paths.
243+
244+
### Example A: switch IBKR to `tqqq_growth_income`
245+
246+
Set:
247+
248+
- `STRATEGY_PROFILE=tqqq_growth_income`
249+
- keep `ACCOUNT_GROUP`
250+
- keep `IB_ACCOUNT_GROUP_CONFIG_SECRET_NAME`
251+
252+
Remove if present:
253+
254+
- `IBKR_FEATURE_SNAPSHOT_PATH`
255+
- `IBKR_FEATURE_SNAPSHOT_MANIFEST_PATH`
256+
- `IBKR_STRATEGY_CONFIG_PATH`
257+
- `IBKR_RECONCILIATION_OUTPUT_PATH`
258+
259+
Why:
260+
261+
- `tqqq_growth_income` only needs `benchmark_history + portfolio_snapshot`
262+
- it does not use the feature-snapshot artifact chain
263+
264+
### Example B: switch Schwab to `qqq_tech_enhancement`
265+
266+
Set:
267+
268+
- `STRATEGY_PROFILE=qqq_tech_enhancement`
269+
- `SCHWAB_FEATURE_SNAPSHOT_PATH`
270+
- `SCHWAB_FEATURE_SNAPSHOT_MANIFEST_PATH`
271+
- `SCHWAB_STRATEGY_CONFIG_PATH`
272+
273+
Keep or remove separately depending on the rollout choice:
274+
275+
- `SCHWAB_DRY_RUN_ONLY`
276+
277+
Why:
278+
279+
- `qqq_tech_enhancement` is a feature-snapshot profile
280+
- the strategy also expects its external config path on the runtime side
281+
282+
### Example C: switch LongBridge HK to `russell_1000_multi_factor_defensive`
283+
284+
Keep:
285+
286+
- `ACCOUNT_PREFIX=HK`
287+
- `ACCOUNT_REGION=HK`
288+
- `LONGPORT_SECRET_NAME`
289+
- `LONGPORT_APP_KEY_SECRET_NAME`
290+
- `LONGPORT_APP_SECRET_SECRET_NAME`
291+
292+
Set:
293+
294+
- `STRATEGY_PROFILE=russell_1000_multi_factor_defensive`
295+
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
296+
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
297+
298+
Remove if present:
299+
300+
- `LONGBRIDGE_STRATEGY_CONFIG_PATH`
301+
302+
Why:
303+
304+
- Russell uses the feature snapshot contract
305+
- unlike `qqq_tech_enhancement`, it does not need the extra strategy config path
306+
307+
### Example D: switch LongBridge SG back to a non-snapshot profile
308+
309+
Keep:
310+
311+
- `ACCOUNT_PREFIX=SG`
312+
- `ACCOUNT_REGION=SG`
313+
314+
Set one of:
315+
316+
- `STRATEGY_PROFILE=tqqq_growth_income`
317+
- `STRATEGY_PROFILE=soxl_soxx_trend_income`
318+
- `STRATEGY_PROFILE=global_etf_rotation`
319+
320+
Remove if present:
321+
322+
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
323+
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
324+
- `LONGBRIDGE_STRATEGY_CONFIG_PATH`
325+
326+
Decide separately:
327+
328+
- whether `LONGBRIDGE_DRY_RUN_ONLY` should stay or be removed
329+
330+
Why:
331+
332+
- non-snapshot profiles do not need the feature-snapshot artifact chain
333+
- SG often carries dry-run as an operational choice, not as a profile requirement
334+
240335
## Rollback rules
241336

242337
Rollback is simple if you keep it operational:

docs/us_equity_live_switch_runbook.zh-CN.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,101 @@ gcloud run services describe longbridge-quant-sg-service \
238238
- manifest 和当前 contract version 对得上
239239
- 第一条通知里的 managed symbols 符合预期
240240

241+
## 常用切换示例
242+
243+
下面这些不是唯一做法,但都是最常见、最容易照抄的切换模板。
244+
245+
### 示例 A:把 IBKR 切到 `tqqq_growth_income`
246+
247+
设置:
248+
249+
- `STRATEGY_PROFILE=tqqq_growth_income`
250+
- 保留 `ACCOUNT_GROUP`
251+
- 保留 `IB_ACCOUNT_GROUP_CONFIG_SECRET_NAME`
252+
253+
如果还留着,就删掉:
254+
255+
- `IBKR_FEATURE_SNAPSHOT_PATH`
256+
- `IBKR_FEATURE_SNAPSHOT_MANIFEST_PATH`
257+
- `IBKR_STRATEGY_CONFIG_PATH`
258+
- `IBKR_RECONCILIATION_OUTPUT_PATH`
259+
260+
原因:
261+
262+
- `tqqq_growth_income` 只需要 `benchmark_history + portfolio_snapshot`
263+
- 不需要 feature-snapshot 这条 artifact 链
264+
265+
### 示例 B:把 Schwab 切到 `qqq_tech_enhancement`
266+
267+
设置:
268+
269+
- `STRATEGY_PROFILE=qqq_tech_enhancement`
270+
- `SCHWAB_FEATURE_SNAPSHOT_PATH`
271+
- `SCHWAB_FEATURE_SNAPSHOT_MANIFEST_PATH`
272+
- `SCHWAB_STRATEGY_CONFIG_PATH`
273+
274+
是否保留下面这个开关,单独按 rollout 决定:
275+
276+
- `SCHWAB_DRY_RUN_ONLY`
277+
278+
原因:
279+
280+
- `qqq_tech_enhancement` 是 feature-snapshot 策略
281+
- 运行时还需要它对应的外部 config 路径
282+
283+
### 示例 C:把 LongBridge HK 切到 `russell_1000_multi_factor_defensive`
284+
285+
保留:
286+
287+
- `ACCOUNT_PREFIX=HK`
288+
- `ACCOUNT_REGION=HK`
289+
- `LONGPORT_SECRET_NAME`
290+
- `LONGPORT_APP_KEY_SECRET_NAME`
291+
- `LONGPORT_APP_SECRET_SECRET_NAME`
292+
293+
设置:
294+
295+
- `STRATEGY_PROFILE=russell_1000_multi_factor_defensive`
296+
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
297+
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
298+
299+
如果还留着,就删掉:
300+
301+
- `LONGBRIDGE_STRATEGY_CONFIG_PATH`
302+
303+
原因:
304+
305+
- Russell 走的是 feature snapshot 合约
306+
- 但它不像 `qqq_tech_enhancement`,不需要额外的 strategy config path
307+
308+
### 示例 D:把 LongBridge SG 切回非 snapshot 策略
309+
310+
保留:
311+
312+
- `ACCOUNT_PREFIX=SG`
313+
- `ACCOUNT_REGION=SG`
314+
315+
下面三选一设置:
316+
317+
- `STRATEGY_PROFILE=tqqq_growth_income`
318+
- `STRATEGY_PROFILE=soxl_soxx_trend_income`
319+
- `STRATEGY_PROFILE=global_etf_rotation`
320+
321+
如果还留着,就删掉:
322+
323+
- `LONGBRIDGE_FEATURE_SNAPSHOT_PATH`
324+
- `LONGBRIDGE_FEATURE_SNAPSHOT_MANIFEST_PATH`
325+
- `LONGBRIDGE_STRATEGY_CONFIG_PATH`
326+
327+
下面这个单独决定:
328+
329+
- `LONGBRIDGE_DRY_RUN_ONLY` 是否保留
330+
331+
原因:
332+
333+
- 非 snapshot 策略不需要 feature-snapshot artifact 链
334+
- SG 是否 dry-run 是运维选择,不是策略本身要求
335+
241336
## 回滚原则
242337

243338
回滚时保持简单:

0 commit comments

Comments
 (0)