gaorufeng
gaorufeng
我使用简体中文回复你,附带谷歌翻译. 作者是根据每个屏幕的大小来决定显示多少K线的数量,然后 把获取到的数据的多少除以这个数量组成了k线图, 不是常规的15分钟 1小时K线图,我也琢磨了好久才明白. 比如3.7寸屏幕作者定义了显示45根k线. I reply to you in Simplified Chinese, with Google translation attached. The author decides how many K-lines to display based on the size of...
再请教 get_quote_history 更多选项有说明吗?
我尝试修改 C:\py\Lib\site-packages\pyalgotrade\broker\backtesting.py def getCash(self, includeShort=True): ret = self.__cash if not includeShort and self.__barFeed.getCurrentBars() is not None: bars = self.__barFeed.getCurrentBars() for instrument, shares in self.__shares.iteritems(): if shares < 0: instrumentPrice =...
谢谢我研究研究
还是有些迷惑,无从下手, 主要是测试商品期货时候, 有的品种整点价值是10 有的是5, 那计算亏损和利润的时候.是需要根据整点价值调整的, pyalgotrade默认是没有杠杆效应的,适合股票类, 回测商品期货 就碰到整点价值的困扰了,如果用没有杠杆测试,那第二笔交易没办法根据第一笔的实际利润来调整新的开仓数量, 那这样 最大回撤什么都不准确了.
C:\xuefu\api\stock\histmd\to_mongodb_md\ to_mongodb_md是一个文件夹, 里面包含了 2017/08/23 18:02 3,960 foundamental_dao.py 2017/08/23 18:02 4,904 k_data_dao.py 2017/08/23 18:02 5,386 k_index_dao.py 2017/08/23 18:02 4,256 k_min_dao.py 2017/08/23 18:02 71 test.py 2017/08/23 18:02 0 __init__.py 2017/08/24 10:42 138...
问题解决了 我添加了 brk = broker.backtesting.Broker(1000000, barfeed) , 参考了这篇文章 http://blog.csdn.net/qtlyx/article/details/73719274