修改套利回测的计算bug,增加每日净值的结果导出。(暂不支持结算价的净值记过计算)

This commit is contained in:
msincenselee 2017-04-20 20:32:18 +08:00
parent fa572b40ba
commit 3e033a9aff

View File

@ -155,7 +155,6 @@ class BacktestingEngine(object):
return self.capital, self.avaliable, self.percent, self.percentLimit
#----------------------------------------------------------------------
def setStartDate(self, startDate='20100416', initDays=10):
"""设置回测的启动日期"""
@ -1388,6 +1387,8 @@ class BacktestingEngine(object):
"""
self.strategy = strategyClass(self, setting)
self.strategy.name = self.strategy.className
self.strategy.onInit()
self.strategy.onStart()
#----------------------------------------------------------------------
def sendOrder(self, vtSymbol, orderType, price, volume, strategy):
@ -1458,8 +1459,6 @@ class BacktestingEngine(object):
order.cancelTime = str(self.dt)
del self.workingLimitOrderDict[vtOrderID]
#----------------------------------------------------------------------
def sendStopOrder(self, vtSymbol, orderType, price, volume, strategy):
"""发停止单(本地实现)"""