diff --git a/vnpy/app/cta_backtester/engine.py b/vnpy/app/cta_backtester/engine.py index 20663cad..4214baa3 100644 --- a/vnpy/app/cta_backtester/engine.py +++ b/vnpy/app/cta_backtester/engine.py @@ -45,8 +45,6 @@ class BacktesterEngine(BaseEngine): # Optimization result self.result_values = None - self.load_strategy_class() - def init_engine(self): """""" self.write_log("初始化CTA回测引擎") @@ -55,6 +53,7 @@ class BacktesterEngine(BaseEngine): # Redirect log from backtesting engine outside. self.backtesting_engine.output = self.write_log + self.load_strategy_class() self.write_log("策略文件加载完成") self.init_rqdata() diff --git a/vnpy/trader/rqdata.py b/vnpy/trader/rqdata.py index 6c1d3e00..04fd17fe 100644 --- a/vnpy/trader/rqdata.py +++ b/vnpy/trader/rqdata.py @@ -1,4 +1,4 @@ -from datetime import datetime, timedelta +from datetime import timedelta from typing import List from rqdatac import init as rqdata_init