From 472bdf66f70d9806e2efcdb36e6b498ea23ffaea Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 1 Apr 2019 15:45:40 +0800 Subject: [PATCH] [Fix]close #1487 --- vnpy/app/cta_strategy/backtesting.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vnpy/app/cta_strategy/backtesting.py b/vnpy/app/cta_strategy/backtesting.py index ab168b72..4b5077aa 100644 --- a/vnpy/app/cta_strategy/backtesting.py +++ b/vnpy/app/cta_strategy/backtesting.py @@ -35,7 +35,7 @@ class OptimizationSetting: def __init__(self): """""" self.params = {} - self.target = "" + self.target_name = "" def add_parameter( self, name: str, start: float, end: float = None, step: float = None @@ -62,9 +62,9 @@ class OptimizationSetting: self.params[name] = value_list - def set_target(self, target: str): + def set_target(self, target_name: str): """""" - self.target = target + self.target_name = target_name def generate_setting(self): """""" @@ -473,7 +473,7 @@ class BacktestingEngine: return if not target_name: - self.output("优化目标为设置,请检查") + self.output("优化目标未设置,请检查") return # Use multiprocessing pool for running backtesting with different setting