Closed AntonioFasano closed 1 month ago
Yahoo's data and API is notoriously inconsistent/unreliable/bad. We only use it for demos because it is universally available without API keys or logins.
If you want to carry out replicable studies, I'm afraid you need a commercial or academic data source.
If you want a free source, maybe try quandl or alpha vantage? Both require an account and API keys, but both have free tiers.
I agree with @braverock. You have to be very cautious with Yahoo data.
I use tiingo data (@tiingo). Their free tier is generous and their paid tiers are reasonably priced. Most importantly, their data quality is much better than Yahoo. I've also heard good things about Polygon for intraday data. I'm not paid to recommend either of these products.
I'm closing this because it's not something I can fix in quantmod.
Description
Calling
getSymbols()
twice or more gives different price adjusted values.Minimal, reproducible example
Below, I ask four times for MCD adjusted close prices from 2000-01-01 to 2000-01-11:
Note that only column 1 is equal to column 4, and columns 2 is equal to column a3.
Repeating the experiment may bring more or less similarity.
Changing dates or symbol did not show any difference.
Using long data sets and with multiple stocks, the observed differences can be significant, therefore rounding doesn't help.
I have read a number of stories regarding Yahoo data, so the cause can be on their side.
Be it as it may, if this behaviour is confirmed, it would make it impossible to carry out replicable studies.
Expected behaviour
Columns in the output above should be identical.
Session Info