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

请问想要一支具体基金的从15年开始的数据可以获得吗 #142

Open
BeckyWong0731 opened this issue Aug 18, 2021 · 3 comments

Comments

@BeckyWong0731
Copy link

查看整个说明,感觉
HX50AH.price[HX50AH.price['date']<='2019-01-04'] 这个代码只能获得16年开始的,并且以不完整的表格呈现,不知道是不是已经有缓存数据可以查看?感觉进本地文件夹没有看到直接下载的T.T
xa.get_daily("SH501050") # 沪深市场历史数据SH501050
这个数据最早是到20年的
看了策略定制类的示例
如果我想绘制一次性买入与定投买入的收入对比图目前有可能实现吗?
打扰了,希望能得到解答,感谢

@refraction-ray
Copy link
Owner

xa.get_daily("SH501050", start="2017-01-01") 可以调节时间段
缓存的话需要手动设置文件夹,参见 https://xalpha.readthedocs.io/en/latest/advance.html#get-daily
收入对比的话,我觉得最简单的办法就是一次性投入和定投都跑一遍策略,然后自己可视化

@BeckyWong0731
Copy link
Author

xa.get_daily("SH501050", start="2015-06-01")
还是只能2016-11-28开始,不知道是不是数据库来源的原因

@BeckyWong0731
Copy link
Author

抱歉我读了这个说明也没有明白
直接复制 xa.set_backend(backend=, path=, prefix=, precached=)
或者是xa.set_backend(backend=csv, path='C:/Users/WBQ/Desktop/xalpha-master/xalpha-master/data', prefix=, precached=)
报错都是SyntaxError: invalid syntax

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

2 participants