Skip to content

Commit 74640f7

Browse files
authored
docs: rewrite open-source readmes
Rewrite the README pair as separate English and Chinese open-source project entry points.
1 parent 4479ba8 commit 74640f7

2 files changed

Lines changed: 58 additions & 76 deletions

File tree

README.md

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,54 @@
22

33
[Chinese README](README.zh-CN.md)
44

5-
> ⚠️ Investing involves risk. This project does not provide investment advice and is for educational and research purposes only.
5+
> Investing involves risk. This project does not provide investment advice and is for education, research, and engineering review only.
66
7-
## What this project does
7+
## What this repository is
88

9-
InteractiveBrokersPlatform is an **Execution platform** in the QuantStrategyLab ecosystem. It executes QuantStrategyLab US and Hong Kong equity strategies through Interactive Brokers runtime services, including account-group config, region handling, dry-run controls, and SEHK/HKD support.
9+
InteractiveBrokersPlatform is a QuantStrategyLab Interactive Brokers multi-market execution platform. It runs US and HK equity profiles through IBKR runtime services with dry-run, paper, and live controls.
1010

11-
## Who this is for
11+
It is an execution layer, not a strategy research repository. Strategy logic comes from `UsEquityStrategies / HkEquityStrategies`; snapshot and validation artifacts come from `UsEquitySnapshotPipelines / HkEquitySnapshotPipelines` when a profile requires them.
1212

13-
- Engineers and researchers who want to inspect, reproduce, or extend this part of the QuantStrategyLab stack.
14-
- Operators who need a clear entry point before reading the deeper runbooks or workflow files.
15-
- Reviewers who need to understand the repository purpose, safety boundary, and evidence requirements before enabling automation.
13+
## Runtime boundary
1614

17-
## Current status
15+
- Loads only runtime-enabled strategy profiles exposed by the strategy packages.
16+
- Handles broker/API connectivity, dry-run checks, notifications, and deployment settings.
17+
- Must keep credentials in GitHub Secrets, cloud secret stores, or the broker-specific secret system, never in Git.
18+
- Should start with dry-run or paper mode before any live order path is enabled.
1819

19-
Production-oriented broker integration; use paper or dry-run validation before real trading.
20+
## Direct vs snapshot-backed profiles
21+
22+
Direct runtime profiles can usually run from market history or portfolio state. Snapshot-backed profiles need a current artifact bundle from the matching snapshot pipeline before this platform should execute them. The platform should not invent strategy eligibility; it should consume the status and artifacts published by the strategy and snapshot repositories.
23+
24+
## Deploy safely
25+
26+
1. Configure secrets and runtime variables outside Git.
27+
2. Run the workflow or service in dry-run mode.
28+
3. Review generated orders, logs, notifications, and reconciliation output.
29+
4. Confirm rollback steps and artifact versions.
30+
5. Enable scheduled or live execution only after the above checks are clear.
2031

2132
## Repository layout
2233

23-
- `application/`, `entrypoints/`, `notifications/`, `strategy/`: Python package code.
24-
- `tests/`: unit and contract tests.
25-
- `docs/`: detailed design notes, runbooks, and evidence docs.
26-
- `.github/workflows/`: CI, scheduled jobs, and deployment workflows.
34+
- `tests/`: unit, contract, and regression tests.
35+
- `docs/`: runbooks, design notes, evidence, and integration contracts.
36+
- `.github/workflows/`: CI, scheduled jobs, release, or deployment workflows.
2737
- `scripts/`: operator scripts and local helpers.
38+
- `research/`: research configs and non-live candidate artifacts.
2839

2940
## Quick start
3041

31-
From a fresh clone:
32-
3342
```bash
3443
python -m pip install -r requirements.txt
3544
python -m pytest -q
3645
```
3746

38-
If a command requires credentials, run it only after reading the relevant workflow or runbook and configuring secrets outside Git.
39-
40-
## Deployment and operation
41-
42-
Prepare IBKR connectivity, account identifiers, runtime variables, and strategy source. Run the workflow or service in dry-run mode, verify orders and notifications, then schedule production runs.
43-
44-
Prefer manual or dry-run execution first. Enable schedules or live execution only after logs, artifacts, permissions, and rollback steps are reviewed.
45-
46-
## Strategy performance and evidence
47-
48-
Execution performance is measured by reliability and order correctness. Strategy performance must be reviewed in the strategy/snapshot repositories before routing orders through IBKR.
49-
50-
README files are intentionally not a source of dated performance promises. Re-run the relevant tests, backtests, or pipeline jobs before relying on any result.
51-
52-
## Safety notes
53-
54-
- Never commit API keys, broker credentials, OAuth tokens, cookies, or account identifiers.
55-
- Run new strategies and platform changes in dry-run or paper mode before any live execution.
56-
- Review generated orders, artifacts, and logs manually before enabling schedules.
57-
58-
## Contributing
47+
## Useful docs
5948

60-
Keep changes small, reproducible, and covered by the narrowest useful tests. For strategy-facing changes, include the evidence artifact or command used to validate behavior.
49+
- [`docs/hk_equity_runtime.md`](docs/hk_equity_runtime.md)
50+
- [`docs/ibkr_paper_top50_switch.md`](docs/ibkr_paper_top50_switch.md)
51+
- [`docs/ibkr_runtime_rollout.md`](docs/ibkr_runtime_rollout.md)
6152

6253
## License
6354

64-
See [LICENSE](LICENSE) if present in this repository.
55+
See [LICENSE](LICENSE).

README.zh-CN.md

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,54 @@
22

33
[English README](README.md)
44

5-
> ⚠️ 投资有风险,不构成投资建议,仅供学习交流用途
5+
> 投资有风险。本项目不构成投资建议,仅用于学习、研究和工程审阅
66
7-
## 这个项目做什么
7+
## 这个仓库是什么
88

9-
InteractiveBrokersPlatform 是 QuantStrategyLab 体系中的**执行平台**。通过 Interactive Brokers 执行 QuantStrategyLab 的美股和港股策略,包含账户组配置、区域处理、dry-run 控制以及港股/HKD 支持
9+
InteractiveBrokersPlatform 是 QuantStrategyLab 的Interactive Brokers 多市场执行平台。通过 IBKR 运行服务执行美股和港股 profile,支持 dry-run、paper 和 live 控制
1010

11-
## 适合谁使用
11+
它属于执行层,不是策略研究仓库。策略逻辑来自 `UsEquityStrategies / HkEquityStrategies`;如果 profile 依赖 snapshot,验证和产物来自 `UsEquitySnapshotPipelines / HkEquitySnapshotPipelines`
1212

13-
- 希望阅读、复现或扩展 QuantStrategyLab 相关模块的工程师和研究人员。
14-
- 在阅读详细 runbook 或 workflow 前,需要先理解项目入口的运维人员。
15-
- 在启用自动化前,需要确认项目职责、安全边界和证据要求的 reviewer。
13+
## 运行边界
1614

17-
## 当前状态
15+
- 只加载策略包暴露的 runtime-enabled profile。
16+
- 负责券商/API 连接、dry-run 检查、通知和部署配置。
17+
- 凭据必须放在 GitHub Secrets、云密钥系统或券商专用密钥系统中,不能提交到 Git。
18+
- 任何 live 下单路径启用前,都应先从 dry-run 或 paper mode 开始。
1819

19-
生产型券商接入;真实交易前必须先完成 paper 或 dry-run 验证。
20+
## 普通 profile 与 snapshot-backed profile
21+
22+
普通 runtime profile 通常可以直接基于 market history 或 portfolio state 执行。Snapshot-backed profile 需要先从对应 snapshot pipeline 获取当前 artifact bundle,平台才应该执行。平台不应该自行判断策略资格,而应消费策略仓和 snapshot 仓发布的状态与产物。
23+
24+
## 安全部署顺序
25+
26+
1. 在 Git 之外配置 secrets 和 runtime variables。
27+
2. 先以 dry-run 模式运行 workflow 或服务。
28+
3. 检查生成订单、日志、通知和 reconciliation 输出。
29+
4. 确认回滚步骤和 artifact 版本。
30+
5. 上述检查清楚后,再启用定时任务或 live 执行。
2031

2132
## 仓库结构
2233

23-
- `application/`, `entrypoints/`, `notifications/`, `strategy/`:Python 包代码。
24-
- `tests/`:单元测试和契约测试。
25-
- `docs/`:详细设计说明、运行手册和证据文档。
26-
- `.github/workflows/`:CI、定时任务和部署 workflow。
34+
- `tests/`:单元测试、契约测试和回归测试。
35+
- `docs/`:运行手册、设计说明、证据和集成契约。
36+
- `.github/workflows/`:CI、定时任务、发布或部署 workflow。
2737
- `scripts/`:运维脚本和本地辅助工具。
38+
- `research/`:研究配置和非 live 候选产物。
2839

2940
## 快速开始
3041

31-
从全新 clone 开始:
32-
3342
```bash
3443
python -m pip install -r requirements.txt
3544
python -m pytest -q
3645
```
3746

38-
如果命令需要凭据,请先阅读相关 workflow 或 runbook,并把密钥配置在 Git 之外。
39-
40-
## 部署和运行
41-
42-
准备 IBKR 连接、账户标识、运行变量和策略来源。先以 dry-run 运行 workflow 或服务,确认订单和通知无误后再启用生产定时任务。
43-
44-
建议先手工运行或 dry-run。只有在日志、产物、权限和回滚步骤都检查过之后,才启用定时任务或 live 执行。
45-
46-
## 策略表现与证据边界
47-
48-
执行平台关注可靠性和订单正确性。策略表现需要在策略/快照仓库中确认后,才能通过 IBKR 路由订单。
49-
50-
README 不应该承诺固定收益或过期指标。实际使用前,请重新运行对应测试、回测或流水线任务。
51-
52-
## 安全注意事项
53-
54-
- 不要把 API key、券商凭据、OAuth token、Cookie 或账户标识提交到 Git。
55-
- 新策略或平台变更在 live 前必须先跑 dry-run 或 paper 流程。
56-
- 启用定时任务前,需要人工检查生成的订单、产物和日志。
57-
58-
## 参与贡献
47+
## 延伸文档
5948

60-
请保持改动小、可复现,并用最小必要测试覆盖。涉及策略的改动,需要附上验证行为的证据产物或命令。
49+
- [`docs/hk_equity_runtime.md`](docs/hk_equity_runtime.md)
50+
- [`docs/ibkr_paper_top50_switch.md`](docs/ibkr_paper_top50_switch.md)
51+
- [`docs/ibkr_runtime_rollout.md`](docs/ibkr_runtime_rollout.md)
6152

6253
## 许可证
6354

64-
如仓库包含 [LICENSE](LICENSE),请以该文件为准
55+
详见 [LICENSE](LICENSE)

0 commit comments

Comments
 (0)