1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 14:56:55 +08:00

datahandler support explicit selector & PortAnaRecord support strategy instance

This commit is contained in:
Dong Zhou
2020-11-27 09:00:43 +08:00
parent 6b4156ab9f
commit ad21092375
2 changed files with 5 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ from ..utils import init_instance_by_config, get_module_by_module_path
from ..log import get_module_logger
from ..utils import flatten_dict
from ..contrib.eva.alpha import calc_ic, calc_long_short_return
from ..contrib.strategy.strategy import BaseStrategy
logger = get_module_logger("workflow", "INFO")
@@ -220,7 +221,7 @@ class PortAnaRecord(SignalRecord):
self.strategy_config = config["strategy"]
self.backtest_config = config["backtest"]
self.strategy = init_instance_by_config(self.strategy_config)
self.strategy = init_instance_by_config(self.strategy_config, accept_types=BaseStrategy)
def generate(self, **kwargs):
# check previously stored prediction results