feat: 股本/上市日期入库 + 换手率支持(closes #1) - #46
Merged
Merged
Conversation
- stock_info 新增 zgb/ltag(万股)、capital_date/list_date, 来自 base.dbf(ZGB/LTAG/GXRQ/SSDATE),缺失/不可读降级 NULL - 换手率(%) = daily_data.volume / stock_info.ltag(手 与 万股 单位差恰好抵消;实测平安 0.547%/茅台 0.328% 与行情软件同量级) - save_stock_info 改单事务快照替换(append 重跑撞 code 唯一约束) - parse_base_dbf 通用化(按列名取值),parse_base_dbf_dy 改为薄封装 - blocks 四链文件读取统一补缺失/不可读降级(#44 同款场景) - 迁移脚本 migrate_stock_info_capital.sql;测试 +4(含目录冒充文件 触发 OSError 的跨平台降级测试) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- blocks 链的格式异常(如 base.dbf 缺列)改为单链降级, 不再传播丢弃已收集的其他链结果 - 测试 +2:缺列 DBF 仅地区链降级 / save_stock_info 快照替换与失败回滚 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
issue #1(换手率)的内置方案:股本数据入库,消费端一个 JOIN 算换手率;上市日期一并入库支持次新股过滤。
Related Issue
Closes #45
Closes #1
What Changed
stock_info+4 列:zgb/ltag(万股)、capital_date/list_date,来自本地base.dbf(盘后自动更新;单位已用平安 194.06 亿股、茅台 12.5 亿股核准)换手率(%) = daily_data.volume / stock_info.ltag——volume(手)与 ltag(万股)的单位差恰好抵消。实测 7/6:平安 0.547%、茅台 0.328%,与行情软件同量级save_stock_info改单事务快照替换(原 append 语义重跑撞 code 唯一约束,股本刷新需要可重跑)parse_base_dbf通用化按列取值;blocks 四链统一补"存在但不可读"降级(fix: infoharbor_ex.code 存在但不可读时回退占位符,不中断同步 #44 的 SMB 锁定场景,此前 blocks 只兜了缺失)migrate_stock_info_capital.sql(ALTER ×4,三库通用)Done Criteria Mapping
Risks / Tradeoffs
🤖 Generated with Claude Code