升级到1.8.0版本的jqdatasdk后,jq.auth('手机号', '密码') 会报错
File "D:\softwares\anaconda\lib\site-packages\jqdatasdk\thrift_connector\connection_pool.py", line 471, in __init__
super(HeartbeatClientPool, self).__init__(
TypeError: super(type, obj): obj must be an instance or subtype of type
在写期货策略回测的时候出现了SecurityNotExist:
File "/tmp/strategy/user_code.py", line 97, in before_market_open
if (context.portfolio.long_positions[security1].closeable_amount == 0) and (context.portfolio.short_positions[security1].closeable_amount == 0):
File "/tmp/jqcore/jqboson/jqboson/api/objects/position.py", line 318, in __getitem__
security = self.__ctx.data_provider.get_security(key)
File "/tmp/jqcore/jqboson/jqboson/data/data_provider.py", line 98, in get_security
raise SecurityNotExist(code)
jqboson.data.interfaces.SecurityNotExist
security1是对于主力合约9999来寻找当前时刻的合约号,然后对于像HC,JD合约这种两个字母的合约是不会出现问题的,但是对于i,j这种合约名只有一个的会报错。如何才能实现对于g.stocks(多个产品合约)既有单个字母的合约名又有两个字母的合约名时不会出现这种错误啊?