Skip to content

Commit 2639f86

Browse files
xuan-wangmapicccy
authored andcommitted
fixbug akshare_backend.py index support
1 parent 1aa1811 commit 2639f86

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

funcat/data/akshare_backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ def get_price(self, order_book_id, start, end, freq):
141141
try:
142142
if is_index:
143143
code = order_book_id[7:].lower() + order_book_id[:6]
144-
df = self.ak.stock_zh_index_daily_em(code)
145-
df['trade_date'] = df['date'].apply(lambda x: x.strftime("%Y%m%d"))
146-
df = df.loc[df["trade_date"] >= str_start_date & df["trade_date"] <= str_end_date]
144+
df = self.ak.stock_zh_index_daily_em(code,start_date=start, end_date=end)
147145
elif is_fund:
148146
code = self.convert_code(order_book_id)
149147
df = self.ak.fund_etf_hist_em(code,start_date=start, end_date=end, adjust="qfq")

0 commit comments

Comments
 (0)