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

Comments

Projects
None yet
6 participants
@lerenardmewa

lerenardmewa commented Mar 18, 2018

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

This comment has been minimized.

mtbakerguy commented Mar 19, 2018

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

This comment has been minimized.

msmith01 commented Mar 21, 2018

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

This comment has been minimized.

Solernova commented Mar 21, 2018

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

This comment has been minimized.

msmith01 commented Mar 24, 2018

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 from Financials no longer available from Google Finance to Google Finance no longer providing data Mar 24, 2018

@joshuaulrich

This comment has been minimized.

Owner

joshuaulrich commented Mar 24, 2018

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

Warn and point getSymbols.google to Yahoo
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

This comment has been minimized.

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

This comment has been minimized.

Contributor

ethanbsmith commented Apr 3, 2018

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

Remove Google example and fix Yahoo example
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

Defunct all Google source functions
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

This comment has been minimized.

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