from tqsdk import TqApi, TargetPosTask ''' 价差回归 当近月-远月的价差大于200时做空近月,做多远月 当价差小于150时平仓 '''...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'chengzhi' from tqsdk import TqApi, TargetPosTask ''' 价差回归 当近月-远月的价差大于200时做空近月,做多远月...
明白了,那怎样print成交后的状态呢?
图片中第二个红色方框回测内容显示模拟交易委托已经成交了啊
#!/usr/bin/env python # -*- coding: utf-8 -*- # 均线金叉开仓死叉平仓策略 __author__ = "ZYP" from tqsdk import TqApi,TqSim,TqBacktest,BacktestFinished...
请问下,程序运行时按Ctrl + C终止报这么多东西正常吗?
if api.is_changing(quote_nearby) or api.is_changing(quote_deferred): spread_quote_last = quote_nearby.last_price - quote_deferred.last_price # quote价差,返回float...