[Mod] show exception message when loading strategy class in cta_backtester
This commit is contained in:
parent
73e893cfdb
commit
6d6756ae4d
@ -45,8 +45,6 @@ class BacktesterEngine(BaseEngine):
|
|||||||
# Optimization result
|
# Optimization result
|
||||||
self.result_values = None
|
self.result_values = None
|
||||||
|
|
||||||
self.load_strategy_class()
|
|
||||||
|
|
||||||
def init_engine(self):
|
def init_engine(self):
|
||||||
""""""
|
""""""
|
||||||
self.write_log("初始化CTA回测引擎")
|
self.write_log("初始化CTA回测引擎")
|
||||||
@ -55,6 +53,7 @@ class BacktesterEngine(BaseEngine):
|
|||||||
# Redirect log from backtesting engine outside.
|
# Redirect log from backtesting engine outside.
|
||||||
self.backtesting_engine.output = self.write_log
|
self.backtesting_engine.output = self.write_log
|
||||||
|
|
||||||
|
self.load_strategy_class()
|
||||||
self.write_log("策略文件加载完成")
|
self.write_log("策略文件加载完成")
|
||||||
|
|
||||||
self.init_rqdata()
|
self.init_rqdata()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from datetime import datetime, timedelta
|
from datetime import timedelta
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from rqdatac import init as rqdata_init
|
from rqdatac import init as rqdata_init
|
||||||
|
Loading…
Reference in New Issue
Block a user