AI4Finance-Foundation / AI4Finance-Foundation/FinRL
only download the first ticker's data
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 16.3k
- Fork
- 3.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
`
# Download and save the data in a pandas DataFrame
start_date = pd.Timestamp(start_date)
end_date = pd.Timestamp(end_date)
delta = timedelta(days=1)
data_df = pd.DataFrame()
for tic in ticker_list:
while (
start_date <= end_date
): # downloading daily to workaround yfinance only allowing max 7 calendar (not trading) days of 1 min data per single download
temp_df = yf.download(
tic,
start=start_date,
end=start_date + delta,
interval=self.time_interval,
)
temp_df["tic"] = tic
data_df = pd.concat([data_df, temp_df])
start_date += delta`
when data of first `tic` of `ticker_list` was downloaded, then `start_date` > `end_date`,so the rest of `ticker_list` could never be downloaded.
Correct me if i am wrong.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.