🌱 I’m currently learning AI
lowinli / fushare Goto Github PK
View Code? Open in Web Editor NEWA utility for fundamentals data of China commodity futures
A utility for fundamentals data of China commodity futures
比如A品种2015年12月17日
import fushare as f
f.get_rollYield_bar(type = 'date', var = 'A', start = '20151215', end = '20151218',plot = True)
如题
比如黑色数据:我的钢铁网https://kucun.mysteel.com/
需要乘以商品合约的乘数,否则金额会小5倍,10倍。
symbolVar.py 中 chinese_to_english 函数 ‘纸浆’ 和对应的 ‘SP' 后面都没有逗号,应该要加的吧
cot文件get_czce_rank_table里我看到有四个date判断,除了最后一个work外,其余date < datetime.date(2015,9,21),date < datetime.date(2017, 12, 28),date <= datetime.date(2010, 8, 25)均已无效。
A = re.sub(r'\D', '', symbol1)
A1 = int(A[:-2]) ##年
A2 = int(A[-2:]) ## 月份
B = re.sub(r'\D', '', symbol2)
B1 = int(B[:-2])
B2 = int(B[-2:])
print(A1, A2, B1, B2)
c = (A1 - B1) * 12 + (A2 - B2)
上述代码,不适用于AP当前情况,会将AP001判断成主力合约
pos=chineseList.index(var)
ValueError: '20号胶20' is not in list
应该是最近新出的期货没有录入到
chineseList=['橡胶','天然橡胶','石油沥青','沥青','沥青仓库','沥青(仓库)','沥青厂库','沥青(厂库)','热轧卷板','热轧板卷','燃料油',
'白银','线材','螺纹钢','铅','铜','铝','锌','黄金','钯金','锡','镍','纸浆',
'豆一','大豆','豆二','胶合板','玉米','玉米淀粉','聚乙烯','LLDPE','LDPE','豆粕','豆油','大豆油',
'棕榈油','纤维板','鸡蛋','聚氯乙烯','PVC','聚丙烯','PP','焦炭','焦煤','铁矿石','乙二醇',
'强麦','强筋小麦',' 强筋小麦','硬冬白麦','普麦','硬白小麦','硬白小麦()','皮棉','棉花','一号棉','白糖','PTA','菜籽油','菜油','早籼稻','早籼','甲醇','柴油','玻璃',
'油菜籽','菜籽','菜籽粕','菜粕','动力煤','粳稻','晚籼稻','晚籼','硅铁','锰硅','硬麦','棉纱','苹果',
'原油','中质含硫原油']
这里, 下次再更新可以都添加一下
现在是只能在Jupyter Notebook中运行吗?
在console command line运行时,依赖一些画图的组件,会导致报错。
比方说这个错误:
no module named '_tkinter',
只从fushare api提取数据,不画图,是否可以尽量减少依赖? 特别是不要依赖tkinter,这个比较不友好。
似乎被生意社墙掉了爬虫,大佬空的时候可以更新一下吗。
请教一下楼主:
策略的逻辑也特别简单,如果前20持多单会员的多单增加了,前20持空单会员的空单减少了,那么后市看多做多;如果前20持多单会员的多单减少了,前20持空单会员的空单增加了,那么后市看空做空;其他情况不持仓。
笔者将该因子拓展到其他所有流动性好的品种上,效果依然很不错,如下图所示,只是近一年来震荡明显。
请问楼主你做的的时候是每天判断信号持仓一天吗?还是持有固定天数呢?看券商研报说就持有一天效果是最好的,但这样加入滑点的话回测效果就很差了呀...
谢谢~
没有数据的日期,应该返回None,现在未处理这些情况,程序会挂掉。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.