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

修复WtBtAnalyst中手续费的计算与WtHotPicker对郑商所和上期所的兼容 #145

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

daohsong
Copy link

WtBtAnalyst的手续费计算

以demos/cta_arbitrage_bt/runBT.py为例:

  1. 根据代码逻辑,adjust_profit = profit - transaction_fee;然而生成的xlsx中,调整净利润净利润还高,如下图红框
WtBtAnalyst
  1. 上图蓝框的“已付手续费”,与/outputs_bt/t1_rb_i/trades.csv的fee列求和的值(即2151.64)不同

在d655afa中根据上版本代码逻辑修复了此问题

WtHotPicker的兼容

运行demos/test_hotpicker/testHots.py时,发现无法成功获取郑商所和上期所的每日结算数据

  1. 郑商所的目标地址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)
  2. 上期所的目标地址目标地址直接404了,在浏览器上也打不开。22186a8修改目标地址到老版网站http://tsite.shfe.com.cn/data/dailydata/kx/kx%s.dat

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

Successfully merging this pull request may close these issues.

1 participant