Repository navigation
feat: 支持基金历史条款与分类版本 - #9
Merged
Merged
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.
问题
Dataset.funds原先把基金身份、分类和申赎条款合并为一个固定快照,历史研究、下单、确认、费用和监控都会读取同一份当前值。后续管理人、策略、开放日、锁定期、确认/到账或费率变化会因此穿透到过去决策,订单确认也无法证明使用了提交时可见的合同版本。最终行为
fund_terms.json双时间版本契约:先按known_at选择每个terms_id当时最新修订,再按effective_from/effective_to选择唯一有效版本;缺失、重叠和歧义均失败。funds.json只保留不可变身份。旧完整静态快照继续按原语义运行,并明确标记为legacy_static和非历史PIT。quant-fund.research-run@2,归档所有实际输入并从归档输入重新复核申请日、版本、确认/到账、确切净值、费用和Lot证据。旧真实research-run@1静态产物继续兼容验证。@2语义复核在建立订单映射前要求order_id为唯一的规范正整数字符串,并拒绝精确重复及1/01这类数值归一冲突;基金与条款身份字段继续按文本保存前导零。实际验证
python -m pip checkpython -m ruff check src tests app.pypython -m ruff format --check src tests app.pypython -m pytest -q:68项通过demo --historical-terms、validate、research、preflight、run、verify-run均通过;最终报告复核50个文件、15笔订单版本绑定,最大资金对账误差2.3283064365386963e-10quant-lab validate通过,standard/v2的code_version为9a7455e379bbb231cfdbd5cc114a90f2d302089a1/01碰撞均被拒绝;主进程原重复订单产物也由新代码在订单ID唯一性校验处拒绝legacy_static、新绑定复核数0边界
样本和逐笔基线均为明确标记的synthetic数据。历史条款选择能力不证明真实合同来源、版本完整性或实际获知时间;真实公募/私募资料仍需独立验收。名称仍是不可变身份字段,本次不实现名称历史。ETF、外币和PE/VC模型范围未扩展。