-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Assignment of Dates when pulling historical data #43
Comments
I have also noticed this issue. |
from tvDatafeed import TvDatafeed, Interval print(index_data) ERROR:tvDatafeed.main:Connection is already closed. help |
import pandas as pd #adjusted time offset using timedelta |
I am getting wrong datetime on the hourly time frame. There is one hour backward shift in time. This problem does not appear on all of the historical data. It starts from October 2022. Prior to this date, the time is accurate. |
Hi,
I was pulling historical yield data with a daily resolution, for example:
DE10Y = tv.get_hist(symbol='DE10Y',exchange='TVC',interval=Interval.in_daily, n_bars=10)
which yields:
symbol open high low close volume
datetime
2024-03-05 22:00:00 TVC:DE10Y 2.323 2.362 2.311 2.330 0.0
2024-03-06 22:00:00 TVC:DE10Y 2.332 2.350 2.250 2.298 0.0
2024-03-07 22:00:00 TVC:DE10Y 2.290 2.297 2.233 2.272 0.0
2024-03-10 21:00:00 TVC:DE10Y 2.269 2.318 2.241 2.303 0.0
2024-03-11 21:00:00 TVC:DE10Y 2.303 2.342 2.275 2.325 0.0
2024-03-12 21:00:00 TVC:DE10Y 2.325 2.370 2.295 2.367 0.0
2024-03-13 21:00:00 TVC:DE10Y 2.367 2.437 2.357 2.436 0.0
2024-03-14 21:00:00 TVC:DE10Y 2.426 2.455 2.423 2.434 0.0
2024-03-17 21:00:00 TVC:DE10Y 2.436 2.468 2.429 2.455 0.0
2024-03-18 21:00:00 TVC:DE10Y 2.455 2.465 2.428 2.446 0.0
The values are correct but the dates are all shifted by one day, i.e. the last values in the df should be for 2024-03-19 (not the 18th), while 2024-03-17 has the values of 2024-03-18 bar when checking against the TradingView website. The 17th was a Sunday...
Am I calling the function incorrectly? Should I explicitly set a timezone? Or is it a bug?
Thank you!
The text was updated successfully, but these errors were encountered: