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 +