新增美元现金研究账户并修复小数股卖出账本精度 - #18
Merged
3 commits merged intoSep 27, 2026
Merged
3 commits merged into
3 commits merged into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增基于共享精确账本的美元现金研究账户,区分交易日现金与已结算购买力,支持标准T+2/T+1结算、已结算资金买入后的当日卖出、分红应收/支付与明确退市终止现金处置。显式us_equity/us_etf类型进入美股规则,保留A股既有行为。
同时修复小数股卖出时独立舍入现金、成本和盈亏造成的最小金额单位差额:先量化已入账现金与移除成本,盈亏取精确差值。
验证:同步香港市场主线后,本地执行层231项测试全部通过,包括15项美国结算、分红、拆股、退市、风险规则、幂等、时间倒序拒绝和小数股账本回归;核心模块纯分支覆盖率均达到90%门槛,三个阶段合成案例均通过账本平衡检查。账户没有真实券商连接,费用为研究假设。
依赖PureSaber/quant-data-kit#23的精确提交7a8813b3d1e52f476f8fe51f05ea714be41a52bb。共享数据PR应先评审;本PR未宣称真实市场认证。