Skip to content

Commit 95afeee

Browse files
committed
Refresh IBKR rollout naming docs
1 parent 15aeb7f commit 95afeee

5 files changed

Lines changed: 25 additions & 23 deletions

File tree

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The mainline runtime now follows one path only:
4040

4141
- `global_etf_rotation`
4242
- `russell_1000_multi_factor_defensive`
43+
- `semiconductor_rotation_income`
4344
- `tech_pullback_cash_buffer`
4445

4546

@@ -49,7 +50,8 @@ The mainline runtime now follows one path only:
4950
| --- | --- | --- | --- | --- | --- | --- | --- |
5051
| `global_etf_rotation` | Global ETF Rotation | Yes | Yes | Yes | Yes | `us_equity` | current rollback line |
5152
| `russell_1000_multi_factor_defensive` | Russell 1000 Multi-Factor | Yes | Yes | No | No | `us_equity` | defensive stock baseline |
52-
| `tech_pullback_cash_buffer` | QQQ Tech Enhancement | Yes | Yes | No | No | `us_equity` | current IBKR paper dry-run candidate |
53+
| `semiconductor_rotation_income` | SOXL/SOXX Semiconductor Trend Income | Yes | Yes | No | No | `us_equity` | current IBKR dry-run line |
54+
| `tech_pullback_cash_buffer` | QQQ Tech Enhancement | Yes | Yes | No | No | `us_equity` | enabled feature-snapshot alternative |
5355

5456
Check the current matrix locally:
5557

@@ -171,7 +173,7 @@ The selected `ACCOUNT_GROUP` is now the runtime identity. Keep broker-specific i
171173
|----------|----------|-------------|
172174
| `IB_GATEWAY_ZONE` | Optional fallback | GCE zone (for example `us-central1-a`). Recommended to keep in the selected account-group entry; this env var is only a transition fallback. |
173175
| `IB_GATEWAY_IP_MODE` | Optional fallback | `internal` (default) or `external`. Recommended to keep in the selected account-group entry; this env var is only a transition fallback. |
174-
| `STRATEGY_PROFILE` | Yes | Strategy profile selector. Supported `us_equity` values: `global_etf_rotation`, `russell_1000_multi_factor_defensive`, `tech_pullback_cash_buffer` |
176+
| `STRATEGY_PROFILE` | Yes | Strategy profile selector. Supported `us_equity` values: `global_etf_rotation`, `russell_1000_multi_factor_defensive`, `semiconductor_rotation_income`, `tech_pullback_cash_buffer` |
175177
| `ACCOUNT_GROUP` | Yes | Account-group selector. No default fallback. |
176178
| `IBKR_FEATURE_SNAPSHOT_PATH` | Conditionally required | Required when `STRATEGY_PROFILE=russell_1000_multi_factor_defensive`. Path to the latest feature snapshot file (`.csv`, `.json`, `.jsonl`, `.parquet`). |
177179
| `IB_ACCOUNT_GROUP_CONFIG_SECRET_NAME` | Yes for Cloud Run | Secret Manager secret name for account-group config JSON. Recommended production source. |
@@ -244,7 +246,7 @@ Recommended account-group config payload:
244246
"ib_gateway_mode": "paper",
245247
"ib_gateway_ip_mode": "internal",
246248
"ib_client_id": 1,
247-
"service_name": "interactive-brokers-quant-global-etf-rotation",
249+
"service_name": "interactive-brokers-quant-service",
248250
"account_ids": ["DU1234567"]
249251
},
250252
"ira": {
@@ -253,7 +255,7 @@ Recommended account-group config payload:
253255
"ib_gateway_mode": "paper",
254256
"ib_gateway_ip_mode": "internal",
255257
"ib_client_id": 7,
256-
"service_name": "interactive-brokers-quant-global-etf-rotation-ira",
258+
"service_name": "interactive-brokers-quant-ira-service",
257259
"account_ids": ["U1234567"]
258260
}
259261
}
@@ -305,7 +307,7 @@ Important:
305307
### Deployment unit and naming
306308

307309
- `QuantPlatformKit` is only a shared dependency; Cloud Run now deploys `InteractiveBrokersPlatform`.
308-
- Recommended Cloud Run service name: `interactive-brokers-quant-global-etf-rotation-service`.
310+
- Recommended Cloud Run service name: `interactive-brokers-quant-service`.
309311
- For future multi-account rollout, keep one Cloud Run service per `ACCOUNT_GROUP`, and let each service select its account-group config at runtime.
310312
- If you later rename or move this repository, reselect the GitHub source in Cloud Build / Cloud Run trigger instead of assuming the existing source binding will update itself.
311313
- For the shared deployment model and trigger migration checklist, see [`QuantPlatformKit/docs/deployment_model.md`](../QuantPlatformKit/docs/deployment_model.md).
@@ -322,7 +324,7 @@ Important:
322324
Example deploy/update command:
323325

324326
```bash
325-
gcloud run deploy interactive-brokers-quant-global-etf-rotation-service \
327+
gcloud run deploy interactive-brokers-quant-service \
326328
--source . \
327329
--region us-central1 \
328330
--service-account ibkr-platform-runtime@PROJECT_ID.iam.gserviceaccount.com \
@@ -350,7 +352,7 @@ gcloud run services update ibkr-quant \
350352

351353
基于 IBKR 的全球 ETF 季度轮动策略(国际市场、商品、美股行业、美股宽基、科技和半导体),含每日金丝雀应急机制。定位上比 `TQQQ``SOXL` 这类高弹性科技策略更稳健,但不再把科技完全排除在外。部署在 GCP Cloud Run,连接 GCE 上的 IB Gateway。
352354

353-
当前 `global_etf_rotation``russell_1000_multi_factor_defensive``tech_pullback_cash_buffer` 的策略实现都来自 `UsEquityStrategies`
355+
当前 `global_etf_rotation``russell_1000_multi_factor_defensive``semiconductor_rotation_income``tech_pullback_cash_buffer` 的策略实现都来自 `UsEquityStrategies`
354356

355357
完整策略说明现在放在 [`UsEquityStrategies`](https://github.com/QuantStrategyLab/UsEquityStrategies#global_etf_rotation)。下面的策略章节主要保留执行侧摘要。
356358

@@ -420,7 +422,7 @@ IBKR 账户
420422
|------|------|------|
421423
| `IB_GATEWAY_ZONE` | 可选过渡项 | GCE zone(如 `us-central1-a`)。推荐直接放进选中的账号组配置里;这里只保留过渡 fallback。 |
422424
| `IB_GATEWAY_IP_MODE` | 可选过渡项 | `internal`(默认)或 `external`。推荐直接放进选中的账号组配置里;这里只保留过渡 fallback。 |
423-
| `STRATEGY_PROFILE` || 策略档位选择。当前可用的 `us_equity` 值:`global_etf_rotation``russell_1000_multi_factor_defensive``tech_pullback_cash_buffer` |
425+
| `STRATEGY_PROFILE` || 策略档位选择。当前可用的 `us_equity` 值:`global_etf_rotation``russell_1000_multi_factor_defensive``semiconductor_rotation_income``tech_pullback_cash_buffer` |
424426
| `ACCOUNT_GROUP` || 账号组选择器,不再提供默认回退。 |
425427
| `IB_ACCOUNT_GROUP_CONFIG_SECRET_NAME` | Cloud Run 建议必填 | 账号组配置 JSON 在 Secret Manager 里的密钥名。生产环境推荐使用。 |
426428
| `IB_ACCOUNT_GROUP_CONFIG_JSON` || 本地开发用的账号组配置 JSON fallback。不建议在生产 Cloud Run 直接使用。 |
@@ -446,7 +448,7 @@ IBKR 账户
446448
当前第一步,建议让 GitHub / Cloud Run 只维护服务级变量:
447449

448450
```bash
449-
STRATEGY_PROFILE=global_etf_rotation
451+
STRATEGY_PROFILE=semiconductor_rotation_income
450452
ACCOUNT_GROUP=default
451453
IB_ACCOUNT_GROUP_CONFIG_SECRET_NAME=ibkr-account-groups
452454
GLOBAL_TELEGRAM_CHAT_ID=<telegram-chat-id>
@@ -470,7 +472,7 @@ IB_GATEWAY_IP_MODE=internal
470472
"ib_gateway_mode": "paper",
471473
"ib_gateway_ip_mode": "internal",
472474
"ib_client_id": 1,
473-
"service_name": "interactive-brokers-quant-global-etf-rotation",
475+
"service_name": "interactive-brokers-quant-service",
474476
"account_ids": ["DU1234567"]
475477
},
476478
"ira": {
@@ -479,7 +481,7 @@ IB_GATEWAY_IP_MODE=internal
479481
"ib_gateway_mode": "paper",
480482
"ib_gateway_ip_mode": "internal",
481483
"ib_client_id": 7,
482-
"service_name": "interactive-brokers-quant-global-etf-rotation-ira",
484+
"service_name": "interactive-brokers-quant-ira-service",
483485
"account_ids": ["U1234567"]
484486
}
485487
}
@@ -531,7 +533,7 @@ IB_GATEWAY_IP_MODE=internal
531533
### 部署单元和命名建议
532534

533535
- `QuantPlatformKit` 只是共享依赖,不单独部署;Cloud Run 现在部署的是 `InteractiveBrokersPlatform`
534-
- 推荐 Cloud Run 服务名:`interactive-brokers-quant-global-etf-rotation-service`
536+
- 推荐 Cloud Run 服务名:`interactive-brokers-quant-service`
535537
- 后续如果扩到多账户,建议按 `ACCOUNT_GROUP` 拆成多个 Cloud Run 服务,并让每个服务在运行时选中自己的账号组配置。
536538
- 如果后面改 GitHub 仓库名或再次迁组织,Cloud Build / Cloud Run 里的 GitHub 来源需要重新选择,不要假设旧绑定会自动跟过去。
537539
- 统一部署模型和触发器迁移清单见 [`QuantPlatformKit/docs/deployment_model.md`](../QuantPlatformKit/docs/deployment_model.md)
@@ -548,7 +550,7 @@ IB_GATEWAY_IP_MODE=internal
548550
示例部署命令:
549551

550552
```bash
551-
gcloud run deploy interactive-brokers-quant-global-etf-rotation-service \
553+
gcloud run deploy interactive-brokers-quant-service \
552554
--source . \
553555
--region us-central1 \
554556
--service-account ibkr-platform-runtime@PROJECT_ID.iam.gserviceaccount.com \

docs/examples/ibkr-account-groups.default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ib_gateway_mode": "paper",
77
"ib_gateway_ip_mode": "internal",
88
"ib_client_id": 1,
9-
"service_name": "interactive-brokers-quant-global-etf-rotation",
9+
"service_name": "interactive-brokers-quant-service",
1010
"account_ids": [
1111
"DU1234567"
1212
]

docs/ibkr_runtime_rollout.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# InteractiveBrokersPlatform 配置落地:先跑通 `ACCOUNT_GROUP=default`
22

3-
这份文档只管当前这一步:**先把 `interactive-brokers-quant-global-etf-rotation-service` 这一个 Cloud Run 服务,用 `ACCOUNT_GROUP=default` 跑通。**
3+
这份文档只管当前这一步:**先把 `interactive-brokers-quant-service` 这一个 Cloud Run 服务,用 `ACCOUNT_GROUP=default` 跑通。**
44

55
不在这一步里做的事:
66

@@ -67,7 +67,7 @@ cp docs/examples/ibkr-account-groups.default.json /tmp/ibkr-account-groups.json
6767
"ib_gateway_mode": "paper",
6868
"ib_gateway_ip_mode": "internal",
6969
"ib_client_id": 1,
70-
"service_name": "interactive-brokers-quant-global-etf-rotation",
70+
"service_name": "interactive-brokers-quant-service",
7171
"account_ids": ["DU1234567"]
7272
}
7373
}
@@ -224,7 +224,7 @@ gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
224224
6. **检查 Cloud Run 当前 env**
225225

226226
```bash
227-
gcloud run services describe interactive-brokers-quant-global-etf-rotation-service \
227+
gcloud run services describe interactive-brokers-quant-service \
228228
--project "${PROJECT_ID}" \
229229
--region "us-central1" \
230230
--format="yaml(spec.template.spec.serviceAccountName,spec.template.spec.containers[0].env)"
@@ -233,7 +233,7 @@ gcloud run services describe interactive-brokers-quant-global-etf-rotation-servi
233233
7. **看启动日志**
234234

235235
```bash
236-
gcloud run services logs read interactive-brokers-quant-global-etf-rotation-service \
236+
gcloud run services logs read interactive-brokers-quant-service \
237237
--project "${PROJECT_ID}" \
238238
--region "us-central1" \
239239
--limit=100

tests/test_account_group_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ def test_default_account_group_example_is_valid():
1919
assert default_group.ib_gateway_mode == "paper"
2020
assert default_group.ib_gateway_ip_mode == "internal"
2121
assert default_group.ib_client_id == 1
22-
assert default_group.service_name == "interactive-brokers-quant-global-etf-rotation"
22+
assert default_group.service_name == "interactive-brokers-quant-service"
2323
assert default_group.account_ids == ("DU1234567",)

tests/test_runtime_config_support.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_load_platform_runtime_settings_supports_explicit_group_config_values(mo
108108
'{"groups":{"taxable_main":{"ib_gateway_instance_name":"ib-gateway-main",'
109109
'"ib_gateway_zone":"us-central1-a","ib_gateway_mode":"live",'
110110
'"ib_gateway_ip_mode":"external","ib_client_id":7,'
111-
'"service_name":"interactive-brokers-quant-global-etf-rotation-taxable-main",'
111+
'"service_name":"interactive-brokers-quant-taxable-main-service",'
112112
'"account_ids":["U1234567"]}}}',
113113
)
114114
monkeypatch.setenv("TELEGRAM_TOKEN", "token-1")
@@ -129,7 +129,7 @@ def test_load_platform_runtime_settings_supports_explicit_group_config_values(mo
129129
assert settings.feature_snapshot_path is None
130130
assert settings.feature_snapshot_manifest_path is None
131131
assert settings.account_group == "taxable_main"
132-
assert settings.service_name == "interactive-brokers-quant-global-etf-rotation-taxable-main"
132+
assert settings.service_name == "interactive-brokers-quant-taxable-main-service"
133133
assert settings.account_ids == ("U1234567",)
134134
assert settings.tg_token == "token-1"
135135
assert settings.tg_chat_id == "chat-1"
@@ -332,7 +332,7 @@ def test_load_platform_runtime_settings_uses_account_group_secret(monkeypatch):
332332
"ib_gateway_mode": "live",
333333
"ib_gateway_ip_mode": "external",
334334
"ib_client_id": 9,
335-
"service_name": "interactive-brokers-quant-global-etf-rotation-ira",
335+
"service_name": "interactive-brokers-quant-ira-service",
336336
"account_ids": ["U1234567", "U7654321"]
337337
}
338338
}
@@ -359,7 +359,7 @@ def access_secret_version(self, request):
359359
assert settings.ib_gateway_ip_mode == "external"
360360
assert settings.ib_client_id == 9
361361
assert settings.account_group == "ira"
362-
assert settings.service_name == "interactive-brokers-quant-global-etf-rotation-ira"
362+
assert settings.service_name == "interactive-brokers-quant-ira-service"
363363
assert settings.account_ids == ("U1234567", "U7654321")
364364

365365

0 commit comments

Comments
 (0)