AI4Finance-Foundation / AI4Finance-Foundation/FinRL
Error encountered when running practical tutorial
- 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ả
Hi,
I was trying to run the following [tutorial notebook](https://colab.research.google.com/github/AI4Finance-Foundation/FinRL-Tutorials/blob/master/3-Practical/FinRL_PaperTrading_Demo.ipynb#scrollTo=NPNxj6c8HIiE), but the following error was encountered:
```
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
----> 1 data = DP.download_data(start_date = '2021-10-04',
2 end_date = '2021-10-08',
3 ticker_list = ticker_list,
4 time_interval= '5Min')
1 frames
[/usr/local/lib/python3.9/site-packages/finrl/meta/data_processor.py](https://localhost:8080/#) in download_data(self, ticker_list, start_date, end_date, time_interval)
35 self, ticker_list, start_date, end_date, time_interval
36 ) -> pd.DataFrame:
---> 37 df = self.processor.download_data(
38 ticker_list=ticker_list,
39 start_date=start_date,
[/usr/local/lib/python3.9/site-packages/finrl/meta/data_processors/processor_alpaca.py](https://localhost:8080/#) in download_data(self, ticker_list, start_date, end_date, time_interval)
50 # filter opening time of the New York Stock Exchange (NYSE) (from 9:30 am to 4:00 pm) if time_interval < 1D
51 day_delta = 86400000000000 # pd.Timedelta('1D').delta == 86400000000000
---> 52 if pd.Timedelta(time_interval).delta < day_delta:
53 NYSE_open_hour = "14:30" # in UTC
54 NYSE_close_hour = "20:59" # in UTC
AttributeError: 'Timedelta' object has no attribute 'delta'
```
Is there something wrong with the data query?
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á.