зеркало из https://github.com/microsoft/qlib.git
change_pitdata_source (#1171)
* change_pitdata_source * retain_normalize * add_comment
This commit is contained in:
Родитель
50d74b5560
Коммит
2ca0d88d2d
|
@ -40,17 +40,21 @@ class TestPIT(unittest.TestCase):
|
|||
pit_dir = str(SOURCE_DIR.joinpath("pit").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")
|
||||
bs.login()
|
||||
Run(
|
||||
source_dir=pit_dir,
|
||||
interval="quarterly",
|
||||
).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
|
||||
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit")
|
||||
|
||||
# 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.
|
||||
# bs.login()
|
||||
# Run(
|
||||
# source_dir=pit_dir,
|
||||
# interval="quarterly",
|
||||
# ).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
|
||||
# bs.logout()
|
||||
|
||||
Run(
|
||||
source_dir=pit_dir,
|
||||
normalize_dir=pit_normalized_dir,
|
||||
interval="quarterly",
|
||||
).normalize_data()
|
||||
bs.logout()
|
||||
DumpPitData(
|
||||
csv_path=pit_normalized_dir,
|
||||
qlib_dir=cn_data_dir,
|
||||
|
|
Загрузка…
Ссылка в новой задаче