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

refactor qlib conf&init. Fix test bug

This commit is contained in:
Young
2020-09-29 11:38:48 +00:00
committed by you-n-g
parent 34ce3ad9bf
commit 5c2f218cfb
5 changed files with 267 additions and 218 deletions

View File

@@ -33,7 +33,7 @@ def get_benchmark_weight(
"""
if not path:
path = Path(C.mount_path).expanduser() / "raw" / "AIndexMembers" / "weights.csv"
path = Path(C.get_data_path()).expanduser() / "raw" / "AIndexMembers" / "weights.csv"
# TODO: the storage of weights should be implemented in a more elegent way
# TODO: The benchmark is not consistant with the filename in instruments.
bench_weight_df = pd.read_csv(path, usecols=["code", "date", "index", "weight"])