fix #473 : 修复通达信盘后数据导入ETF/B股/LOF/REIT等品种时日线价格精度偏差#474
Merged
fasiondog merged 1 commit intoJun 3, 2026
Conversation
通达信日线数据的整数精度因品种而异:A股/北交所/深B为/100, ETF/沪B/LOF/REIT/债券为/1000。原代码统一按/100处理(×10), 导致非A股品种的DAY K线价格是5MIN的10倍。 新增 get_day_price_multiplier() 函数,根据股票代码前缀判断 精度倍数:ETF(15/51/56/58)、LOF(16)、REIT(18)、SH基金(50)、 沪B(900)、债券(10/11/12) 返回1,其余返回10。 深市B股(200xxx)精度为/100(同A股),与沪市B股(900xxx) 的/1000不同,不加入白名单。
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.
通达信日线数据的整数精度因品种而异:A股/北交所/深B为/100,
ETF/沪B/LOF/REIT/债券为/1000。原代码统一按/100处理(×10),
导致非A股品种的DAY K线价格是5MIN的10倍。
新增 get_day_price_multiplier() 函数,根据股票代码前缀判断
精度倍数:ETF(15/51/56/58)、LOF(16)、REIT(18)、SH基金(50)、
沪B(900)、债券(10/11/12) 返回1,其余返回10。
深市B股(200xxx)精度为/100(同A股),与沪市B股(900xxx)
的/1000不同,不加入白名单。
Fix #473