From 97bf7e0cf50880871f8d3db697f549059e272f4c Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sat, 6 Oct 2018 08:58:35 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8D=E5=A4=9A=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E4=BC=98=E5=8C=96=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/app/ctaStrategy/ctaBacktesting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py index 19267ef9..ad570f72 100644 --- a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py +++ b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py @@ -1387,8 +1387,8 @@ def optimize(strategyClass, setting, targetName, engine.initStrategy(strategyClass, setting) engine.runBacktesting() - self.calculateDailyResult() - d, result = self.calculateDailyStatistics() + engine.calculateDailyResult() + d, result = engine.calculateDailyStatistics() try: targetValue = result[targetName] except KeyError: