feat ipo
This commit is contained in:
24
docs/todo.md
24
docs/todo.md
@@ -1,4 +1,28 @@
|
||||
|
||||
|
||||
### 2.4 开仓和补仓没有共享同一个本轮资金预算
|
||||
|
||||
位置:
|
||||
|
||||
- `py-client/strategy/trend/boot.py:133-140`
|
||||
- `py-client/strategy/trend/boot.py:182-187`
|
||||
- `py-client/strategy/trend/open.py:15-53`
|
||||
- `py-client/strategy/trend/positions.py:44-84`
|
||||
|
||||
现状:开仓前只检查一次现金比例,`open_signal()` 可对多个信号分别按 `buy_value` 下单,但不扣减本轮可用资金。随后 `manage_positions()` 又以最初的 `assets.available` 作为补仓预算。
|
||||
|
||||
影响:同一轮多笔开仓与多笔补仓的总金额可能超过真实可用资金,导致集中拒单或资金计划失控。
|
||||
|
||||
解决方案:
|
||||
|
||||
1. `RunOnce()` 创建唯一的本轮 `remaining_cash`。
|
||||
2. 开仓、补仓共享该预算对象。
|
||||
3. 每笔订单提交成功后立即预留预计金额。
|
||||
4. 预算应保留 `min_cash_ratio` 对应的安全现金,不能把全部 available 用完。
|
||||
5. 下单结果未知时也应暂时占用预算,直到对账明确失败。
|
||||
|
||||
验收标准:模拟多个开仓和补仓信号时,全部订单预计金额与保留现金之和不超过本轮资产快照的可用资金。
|
||||
|
||||
### 2.8 服务端与客户端可能把失败下单当成成功
|
||||
|
||||
位置:
|
||||
|
||||
Reference in New Issue
Block a user