修复WtBtAnalyst中手续费的计算与WtHotPicker对郑商所和上期所的兼容#145
Open
daohsong wants to merge 3 commits intowondertrader:devfrom
Open
修复WtBtAnalyst中手续费的计算与WtHotPicker对郑商所和上期所的兼容#145daohsong wants to merge 3 commits intowondertrader:devfrom
daohsong wants to merge 3 commits intowondertrader:devfrom
Conversation
feng-she
reviewed
Jan 19, 2025
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.
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