This commit is contained in:
vn.py 2019-04-01 15:45:40 +08:00
parent 7ca9eec426
commit 472bdf66f7

View File

@ -35,7 +35,7 @@ class OptimizationSetting:
def __init__(self): def __init__(self):
"""""" """"""
self.params = {} self.params = {}
self.target = "" self.target_name = ""
def add_parameter( def add_parameter(
self, name: str, start: float, end: float = None, step: float = None self, name: str, start: float, end: float = None, step: float = None
@ -62,9 +62,9 @@ class OptimizationSetting:
self.params[name] = value_list 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): def generate_setting(self):
"""""" """"""
@ -473,7 +473,7 @@ class BacktestingEngine:
return return
if not target_name: if not target_name:
self.output("优化目标设置,请检查") self.output("优化目标设置,请检查")
return return
# Use multiprocessing pool for running backtesting with different setting # Use multiprocessing pool for running backtesting with different setting