AI4Finance-Foundation / AI4Finance-Foundation/FinRL

Timedelta depreciated on Papertrading demo

Ouverte
#958 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Jupyter Notebook
Étoiles
16.3k
Forks
3.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

` 50 # filter opening time of the New York Stock Exchange (NYSE) (from 9:30 am to 4:00 pm) if time_interval < 1D
51 # from trepan.api import debug;debug()
---> 52 # filter opening time of the New York Stock Exchange (NYSE) (from 9:30 am to 4:00 pm) if time_interval < 1D
53 day_delta = 86400000000000 # pd.Timedelta('1D').delta == 86400000000000
54 if pd.to_timedelta(time_interval) < day_delta:

AttributeError: 'Timedelta' object has no attribute 'delta'`

From the code

day_delta = 86400000000000 # pd.Timedelta('1D').delta == 86400000000000
if pd.to_timedelta(time_interval) < day_delta:
NYSE_open_hour = "14:30" # in UTC
NYSE_close_hour = "20:59" # in UTC
data_df = barset.between_time(NYSE_open_hour, NYSE_close_hour)
else:
data_df = barset

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.