Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可转债行情接口cb_daily返回的可转债价格数据仅精确到小数点后两位 #1721

Open
justin745 opened this issue Oct 20, 2023 · 0 comments

Comments

@justin745
Copy link

调用可转债行情接口cb_daily时,如果传入TS代码ts_code,返回的可转债价格数据仅精确到小数点后两位。相比现实中的可转债价格数据都是精确到小数点后三位,Tushare的数据精准度就不够了。

举例:
df1 = pro.cb_daily(ts_code='110063.SH')
df1[['close', 'open', 'high', 'low']]

close open high low
0 107.72 108.28 108.28 107.21
1 108.28 108.90 108.98 108.06
2 108.90 110.24 110.39 108.88
3 110.22 111.19 111.19 110.12
4 110.90 110.33 111.23 110.30
... ... ... ... ...
914 122.61 122.31 123.22 122.30
915 122.40 122.07 122.77 120.51
916 122.32 121.70 122.36 121.67
917 122.05 121.61 122.41 120.22
918 122.34 123.39 124.20 122.05

另外,如果不传入TS代码ts_code,只传入trade_date参数,返回的数据好像没问题。
df2 = pro.cb_daily(trade_date='20190719')
df2[['close', 'open', 'high', 'low']]

close open high low
0 92.262 92.256 92.450 92.256
1 92.748 93.012 93.170 92.670
2 92.920 92.799 93.060 92.790
3 93.000 93.220 93.399 93.000
4 94.010 94.000 94.195 93.910
... ... ... ... ...
164 137.710 137.001 140.300 136.800
165 149.001 149.880 152.101 148.262
166 162.340 163.990 164.680 161.820
167 174.496 177.000 184.300 173.507
168 194.240 194.870 198.000 192.010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant