Skip to content

Commit 2ca0d88

Browse files
authored
change_pitdata_source (#1171)
* change_pitdata_source * retain_normalize * add_comment
1 parent 50d74b5 commit 2ca0d88

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/test_pit.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,21 @@ def setUpClass(cls) -> None:
4040
pit_dir = str(SOURCE_DIR.joinpath("pit").resolve())
4141
pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve())
4242
GetData().qlib_data(name="qlib_data_simple", target_dir=cn_data_dir, region="cn")
43-
bs.login()
44-
Run(
45-
source_dir=pit_dir,
46-
interval="quarterly",
47-
).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
43+
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit")
44+
45+
# 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.
46+
# bs.login()
47+
# Run(
48+
# source_dir=pit_dir,
49+
# interval="quarterly",
50+
# ).download_data(start="2000-01-01", end="2020-01-01", symbol_regex="^(600519|000725).*")
51+
# bs.logout()
52+
4853
Run(
4954
source_dir=pit_dir,
5055
normalize_dir=pit_normalized_dir,
5156
interval="quarterly",
5257
).normalize_data()
53-
bs.logout()
5458
DumpPitData(
5559
csv_path=pit_normalized_dir,
5660
qlib_dir=cn_data_dir,

0 commit comments

Comments
 (0)