1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-18 19:51:42 +08:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Linlang Lv (iSoftStone Information)
2315256992 Merge branch 'main' of github.com:microsoft/qlib into fix_issue_1729 2024-05-09 13:25:30 +08:00
Linlang
3779b5186a bump version (#1784)
Co-authored-by: Linlang Lv (iSoftStone Information) <v-lvlinlang@microsoft.com>
2024-05-08 13:50:55 +08:00
Linlang Lv (iSoftStone Information)
6443d86b87 fix issue 1729 2024-04-10 14:00:45 +08:00
Linlang Lv (iSoftStone Information)
27ab49a0ab fix issue 1729 2024-04-10 13:59:19 +08:00
Linlang Lv (iSoftStone Information)
0e8571415c fix issue 1729 2024-04-10 13:58:35 +08:00

View File

@@ -396,14 +396,7 @@ class CSI500Index(CSIIndex):
today = pd.Timestamp.now()
date_range = pd.DataFrame(pd.date_range(start="2007-01-15", end=today, freq="7D"))[0].dt.date
ret_list = []
col = ["date", "symbol", "code_name"]
for date in tqdm(date_range, desc="Download CSI500"):
rs = bs.query_zz500_stocks(date=str(date))
zz500_stocks = []
while (rs.error_code == "0") & rs.next():
zz500_stocks.append(rs.get_row_data())
result = pd.DataFrame(zz500_stocks, columns=col)
result["symbol"] = result["symbol"].apply(lambda x: x.replace(".", "").upper())
result = self.get_data_from_baostock(date)
ret_list.append(result[["date", "symbol"]])
bs.logout()