diff --git a/qlib/finco/tpl/sl/workflow_config.yaml b/qlib/finco/tpl/sl/workflow_config.yaml index 362725dc1..4c6c4821f 100644 --- a/qlib/finco/tpl/sl/workflow_config.yaml +++ b/qlib/finco/tpl/sl/workflow_config.yaml @@ -10,6 +10,7 @@ data_handler_config: &data_handler_config fit_start_time: 2008-01-01 fit_end_time: 2014-12-31 instruments: *market + label: "Ref($close, -21) / Ref($close, -1) - 1" infer_processors: - class: RobustZScoreNorm kwargs: diff --git a/qlib/utils/mod.py b/qlib/utils/mod.py index e53957260..22eddce8b 100644 --- a/qlib/utils/mod.py +++ b/qlib/utils/mod.py @@ -206,6 +206,9 @@ def find_all_classes(module_path: Union[str, ModuleType], cls: type) -> List[typ >>> from qlib.data.dataset.handler import DataHandler >>> find_all_classes("qlib.contrib.data.handler", DataHandler) [, , , , ] + >>> from qlib.contrib.rolling.base import Rolling + >>> find_all_classes("qlib.contrib.rolling", Rolling) + [, ] TODO: - skip import error @@ -220,7 +223,7 @@ def find_all_classes(module_path: Union[str, ModuleType], cls: type) -> List[typ def _append_cls(obj): # Leverage the closure trick to reuse code - if isinstance(obj, type) and issubclass(obj, cls) and cls not in cls_list: + if isinstance(obj, type) and issubclass(obj, cls) and obj not in cls_list: cls_list.append(obj) for attr in dir(mod):