Skip to content
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

Google Finance no longer providing data #221

Closed
lerenardmewa opened this issue Mar 18, 2018 · 8 comments
Closed

Google Finance no longer providing data #221

lerenardmewa opened this issue Mar 18, 2018 · 8 comments

Comments

@lerenardmewa
Copy link

getFinancials no longer retrieves financial data from Google Finance:

getFinancials("AAPL")
Error in download.file(paste(google.fin, Symbol, sep = ""), quiet = TRUE, :
cannot open URL 'http://finance.google.com/finance?fstype=ii&q=AAPL'
In addition: Warning message:
In download.file(paste(google.fin, Symbol, sep = ""), quiet = TRUE, :
cannot open URL 'http://finance.google.com/finance?fstype=ii&q=AAPL': HTTP status was '404 Not Found'

Moreover, seems like Google is no longer providing this info.

@mtbakerguy
Copy link

Trying it on OSX, you get the following:

getFinancials('AAPL',auto.assign=FALSE)
Error in thead[x]:thead[x + 1] : NA/NaN argument

Looking at the (still HTTP; yay!) packet trace: it looks like there's a redirect.

@msmith01
Copy link

I get the same error

Error in thead[x]:thead[x + 1] : NA/NaN argument

Also using; quantmod::getFin("COP")

Error:

Error in get(Info[i, 1], envir = env) : 
  lazy-load database 'C:/Users/USER/Documents/R/win-library/3.4/quantmod/R/quantmod.rdb' is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

I have deleted, reinstalled in many different ways and still the same problem.

@Solernova
Copy link

It seems as though Google is selectively blocking the getSymbols query and it is affecting the rest of the code base.
screen shot 2018-03-21 at 2 07 00 pm

@msmith01
Copy link

Has Google completely removed financial accounts from their service altogether?

https://www.google.com/search?q=NASDAQ:AAPL&tbm=fin#scso=uid_m7i2WrSfDML1Uv7jtNAK_5:0

Reveals no annual accounts for AAPL... Is it possible to change the default source from finance.google to finance.yahoo?

@joshuaulrich joshuaulrich changed the title Financials no longer available from Google Finance Google Finance no longer providing data Mar 24, 2018
@joshuaulrich
Copy link
Owner

Thanks for the report. The original comment only mentioned getFinancials(), but getSymbols.google() is also no longer working. It appears Google has simply stopped providing historical prices, and the financials provided on their website are very limited. That suggests to me that functions that request data from Google should either be marked as defunct, and/or use another source.

@msmith01: I cannot change the default source from Google to Yahoo because there is no implementation that uses Yahoo as a source. I'm not inclined to work on scraping/parsing the financial data from Yahoo, so someone else would need to do it.

joshuaulrich added a commit that referenced this issue Apr 1, 2018
Google Finance stopped providing historical data for download sometime
in March, 2018. Replace all getSymbols.google() calls with a call to
getSymbols.yahoo(), since there doesn't appear to be an alternative
means to acquire data from Google Finance.

I considered marking getSymbols.google() as defunct, or deprecating
it, but it seems better to at least try to return some data to the
user.

See #221.
@joshuaulrich
Copy link
Owner

joshuaulrich commented Apr 1, 2018

Does anyone have thoughts/opinions whether getSymbols.google() should use .Deprecated() or .Defunct() versus passing the call to getSymbols.yahoo()? Also, consider that there's no alternative data source for getFinancials(), so there's no function to pass the call to.

@ethanbsmith
Copy link
Contributor

since google does not follow the same rules as yahoo on splits nor does it use the same extended symbology as yahoo, pointing .google calls to .yahoo is setting people up for subtle errors. I would just warn that the functionality is not supported and people should port to .yahoo calls. just my $.02

joshuaulrich added a commit that referenced this issue Apr 6, 2018
The Google example no longer works (see #221), and the Yahoo example
didn't work because Yahoo doesn't provide data for its own ticker.
joshuaulrich added a commit that referenced this issue Apr 6, 2018
Google Finance stopped providing historical price data for download
in mid-March, 2018. Mark getSymbols.google() as defunct and suggest
users call getSymbols(..., src = "yahoo") instead. Also mark getFin()
and getFinancials() as defunct.

I considered automatically calling getSymbols.yahoo() to try and
return _some_ data, but Ethan Smith rightly commented that Yahoo
and Google data differ enough to potentially cause subtle bugs.

See #221.
@msmith01
Copy link

msmith01 commented Jul 16, 2018

@joshuaulrich and to others who want to download fundamental data. There was an interesting post over at Stackexchange, somebody wrote a script to collect financial data from yahoo. Heres the post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants