修复WtBtAnalyst中手续费的计算与WtHotPicker对郑商所和上期所的兼容 #145
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.
WtBtAnalyst的手续费计算
以demos/cta_arbitrage_bt/runBT.py为例:
adjust_profit
=profit
-transaction_fee
;然而生成的xlsx中,调整净利润
比净利润
还高,如下图红框fee
列求和的值(即2151.64)不同在d655afa中根据上版本代码逻辑修复了此问题
WtHotPicker的兼容
运行demos/test_hotpicker/testHots.py时,发现无法成功获取郑商所和上期所的每日结算数据
http://www.czce.com.cn/cn/DFSStaticFiles/Future/%s/%s/FutureDataDaily.htm
以js生成cookie的方式做了反爬。d706c87的目标地址改成http://www.czce.com.cn/cn/DFSStaticFiles/Future/%s/%s/FutureDataDaily.xls
,使用pandas读取(依赖xlrd)http://tsite.shfe.com.cn/data/dailydata/kx/kx%s.dat