yahooquery icon indicating copy to clipboard operation
yahooquery copied to clipboard

Instable history

Open RudyNL opened this issue 1 year ago • 2 comments

I am noticing that randomly the dividend payments of the last one or two years are missing on both the Yahoo Finance site and the requested history data by yahooquery. As a result the adjusted columns like adjclose can be wrong. Especially calculating the performance of stocks during several years can deviate a lot. At this moment I can't find any pattern. At this moment I consider it to be a random problem caused by Yahoo. I tried several different locations of Yahoo Finance (Germany, France, USA,....) at different times for different stocks.

To show what is happening I am using a graph of the performance of Apple. Notice the missing dividend payments in the recent years. Apple

Does anyone know how to deal with this problem? How can I avoid this behavior? How can I detect this problem?

RudyNL avatar Apr 13 '23 18:04 RudyNL

I have done some more testing. The problem seems to be related with the data rate. I tried to introduce some waiting time between the calls. At this moment I am getting reliable results if there is a waiting time of 3 seconds between the history calls

Its a nasty property of Yahoo Finance to give erroneous results instead of no results if you are overrunning the data rate.

RudyNL avatar Apr 16 '23 19:04 RudyNL

This is purely anecdotal, but I do think that YF is returning bad data for requests it deems to be programmatic (e.g. making a lot of requests in a small period of time). I've seen this happen personally and have heard it from others.

dpguthrie avatar Apr 25 '23 17:04 dpguthrie