From c1c9d93c8fcf1285191580b3c27297f598e939c5 Mon Sep 17 00:00:00 2001 From: nanoric <475647575@qq.com> Date: Mon, 17 Sep 2018 23:16:24 -0300 Subject: [PATCH] Update ctaBacktesting.py --- vnpy/trader/app/ctaStrategy/ctaBacktesting.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py index df5ba085..fc86d441 100644 --- a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py +++ b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py @@ -949,7 +949,8 @@ class BacktestingEngine(object): # 显示结果 resultList = [res.get() for res in l] - return resultList.sort(reverse=True, key=lambda result:result[1]) + resultList.sort(reverse=True, key=lambda result:result[1]) + return resultList def outputOptimizeResult(self, resultList): self.output('-' * 30) @@ -1376,4 +1377,4 @@ def optimize(strategyClass, setting, targetName, except KeyError: targetValue = 0 return (str(setting), targetValue, d) - \ No newline at end of file +