alvarobartt / investiny

🤏🏻 `investpy` but made tiny
https://alvarobartt.github.io/investiny
MIT License
280 stars 32 forks source link

Issue with max from date and limit of max daily data #52

Closed hm0293 closed 1 year ago

hm0293 commented 1 year ago

Is there a way to get max daily data for an Id... Currently there seems to be some limits. So for japan Germany 10 Y government spread (ID: 1079966). I get this as a result Screenshot 2022-10-18 at 1 03 48 PM

Clearly 1301 rows for 22 years of data is a problem. The date jumps from 1998 to 2017. Screenshot 2022-10-18 at 1 06 48 PM

The start date on investing.com is 01/11/2010. However while getting historical daily data they seem to have some kind of limit while downloading (Tried multiple tickers in excel. There seems to be some limit around 5400 points).

Is there a way to get max daily data which is available?

hm0293 commented 1 year ago

I mean I have two questions in the above: 1) From date gives some weird data jumps? (Dates seem to be wrong) 2) Is their a limit on max daily data. Can we download the max daily data, without specifying the from date?

alvarobartt commented 1 year ago

Hi, @hm0293 so Investing.com limitations are at 5000 data points, but that should be already handled by investiny, maybe that data is missing in Investing.com too?

Also, the maximum daily data is at 01/01/1970 so it shouldn't be a problem, and the maximum retrievable daily data per request is around 19 years, which corresponds to less than 5000 data points, but close.

alvarobartt commented 1 year ago

Wow thanks a lot for the one-time sponsor @hm0293 :heart: I've just realised! (P.S. you're my first sponsor ever!)

hm0293 commented 1 year ago

Hi @alvarobartt , Thanks for the wonderful package. The data in investing.com is 1301 points only and is available from March 04,2016. However, in the package the dates start from 1998 and then jump to 2017. I have tried different bond tickers still the same problem.

alvarobartt commented 1 year ago

@hm0293 I've already checked the following historical_data(investing_id=1079966, from_date="01/01/1998", to_date="12/30/2020"), and I get data from 03/02/2016 until the specified to_date, which corresponds to 1301 data points as you're mentioning above. But I don't see the date jump from 1998 to 2017 as you do, probably related to timezone issues.

Can you please let me know the investiny version that you're using with pip show investiny, and if it's not v0.7.1 can you please run pip install investiny --upgrade? And, can you please let me know your timezone so that I can replicate exactly what you're testing? Thanks 🤗

hm0293 commented 1 year ago

I am surprised I'm the first one there should be many more for the package you have developed. Thanks for the package.

hm0293 commented 1 year ago

I have upgraded still the same issue. Timezone UTC+5:30

hm0293 commented 1 year ago

Its corrected working now. Thanks (I think may be some problem with the version) Thanks

alvarobartt commented 1 year ago

Hi, @hm0293 I'm glad it's working now 😄 Anyway I'll explore this issue further, as the timezone may be related somehow...