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

Merge remote-tracking branch 'qlib/main' into save_inst

This commit is contained in:
zhupr
2021-01-26 19:42:59 +08:00
9 changed files with 256 additions and 124 deletions

View File

@@ -26,9 +26,8 @@ import pandas as pd
from pathlib import Path
from typing import Union, Tuple
from .. import __version__ as qlib_version
from ..config import C
from ..log import get_module_logger
from ..log import get_module_logger, set_log_with_config
log = get_module_logger("utils")
@@ -163,7 +162,7 @@ def parse_field(field):
# - $open+$close -> Feature("open")+Feature("close")
if not isinstance(field, str):
field = str(field)
return re.sub(r"\$(\w+)", r'Feature("\1")', field)
return re.sub(r"\$(\w+)", r'Feature("\1")', re.sub(r"(\w+\s*)\(", r"Operators.\1(", field))
def get_module_by_module_path(module_path):