mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-09 22:10:56 +08:00
change_pitdata_source (#1171)
* change_pitdata_source * retain_normalize * add_comment
This commit is contained in:
@@ -40,17 +40,21 @@ class TestPIT(unittest.TestCase):
|
|||||||
pit_dir = str(SOURCE_DIR.joinpath("pit").resolve())
|
pit_dir = str(SOURCE_DIR.joinpath("pit").resolve())
|
||||||
pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve())
|
pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve())
|
||||||
GetData().qlib_data(name="qlib_data_simple", target_dir=cn_data_dir, region="cn")
|
GetData().qlib_data(name="qlib_data_simple", target_dir=cn_data_dir, region="cn")
|
||||||
bs.login()
|
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit")
|
||||||
Run(
|
|
||||||
source_dir=pit_dir,
|
# NOTE: This code does the same thing as line 43, but since baostock is not stable in downloading data, we have chosen to download offline data.
|
||||||
interval="quarterly",
|
# bs.login()
|
||||||
).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
|
# Run(
|
||||||
|
# source_dir=pit_dir,
|
||||||
|
# interval="quarterly",
|
||||||
|
# ).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
|
||||||
|
# bs.logout()
|
||||||
|
|
||||||
Run(
|
Run(
|
||||||
source_dir=pit_dir,
|
source_dir=pit_dir,
|
||||||
normalize_dir=pit_normalized_dir,
|
normalize_dir=pit_normalized_dir,
|
||||||
interval="quarterly",
|
interval="quarterly",
|
||||||
).normalize_data()
|
).normalize_data()
|
||||||
bs.logout()
|
|
||||||
DumpPitData(
|
DumpPitData(
|
||||||
csv_path=pit_normalized_dir,
|
csv_path=pit_normalized_dir,
|
||||||
qlib_dir=cn_data_dir,
|
qlib_dir=cn_data_dir,
|
||||||
|
|||||||
Reference in New Issue
Block a user