AI4Finance-Foundation / AI4Finance-Foundation/FinRL

Had the same problem with #958

未关闭
#1,009 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Jupyter Notebook
星标
16.3k
派生
3.5k
PR 合并指标
30 天内没有已合并 PR

描述

@XiaoYangLiu-FinRL

Excuse me, is issue #958 resolved?
I also encountered the same problem today

*******************
colab report error
-------------------

Alpaca successfully connected
AttributeError Traceback (most recent call last)
in ()
----> 1 train(start_date = '2022-08-25',
2 end_date = '2022-08-31',
3 ticker_list = ticker_list,
4 data_source = 'alpaca',
5 time_interval='1Min',

2 frames
/finrl/meta/data_processors/processor_alpaca.py 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'

***

chatGPT recommended changes:
---
![image](https://github.com/AI4Finance-Foundation/FinRL/assets/112242664/0f1cd71a-35d7-459c-a721-130e18543fac)

***

GPT4 recommended changes
---

![image](https://github.com/AI4Finance-Foundation/FinRL/assets/112242664/3cd3f32d-0f99-4278-83b8-7e9a7a173c02)

***

Please try it now.
Thank you!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。