掘金社区

怎样获取当前商品的主力合约编号呢?Pinned highlighted

y***8@gmail.com 发表在掘金2 2017-08-09 07:03:23

掘金2
436
0
0

有没有函数或是方法能定位当前主力合约的编号,就像下面函数一样自动返回合约编号?

def ZhuLi(name):
if name == "中金股指主力":
return "1708"
elif name == "中金国债主力":
return "1712"
elif name == "大商主力":
return "1801"
elif name == "郑商主力":
return "801"
elif name == "上期主力":
return "1710"

暂无评论

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.