[Mod] show exception message when loading strategy class in cta_backtester

This commit is contained in:
vn.py 2019-10-19 18:14:54 +08:00
parent 73e893cfdb
commit 6d6756ae4d
2 changed files with 2 additions and 3 deletions

View File

@ -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()

View File

@ -1,4 +1,4 @@
from datetime import datetime, timedelta
from datetime import timedelta
from typing import List
from rqdatac import init as rqdata_init