Saturday, June 3, 2017

Yahoo Finance API discontinued

Not too long after I wrote my R script to automate the computation of Spearman's correlation of stock counters (see here), the script failed to work. A real bummer indeed. To cut to the chase, the underlying import function from Quantmod was down.

As expected, the Quantmod package developer received a flurry of questions from disgruntled users who were also unable to import the historical stock data from Yahoo Finance into R for data processing. Well, it wasn't the developer's fault. Apparently, Yahoo Finance stealthily decided to discontinue the data importing functionality for no rhyme or reason.

For those interested, see the Yahoo Help Community thread on the matter here.

As quite a lot of people depend on Yahoo Finance's historical stock data for their data processing/stock market app/personal needs, a petition has been made to Yahoo to reinstate the service. Quite a lot of people, I noticed, were even willing to pay a monthly fee in order to be able to download historical stock data into the software of their choice.

Based on some of the responses I have read, some people surmised that Yahoo Finance realized that downloads of historical stock data through third-party applications does not generate ad revenue for the company. Hence, removing such a functionality would encourage users to access stock information through their browser (and hopefully click on some of their ads!).

Frankly, I don't know why the Yahoo Finance team doesn't realize that they are sitting on a revenue goldmine and offer historical stock data downloads to desperate users who are willing to pay for said service.

The next best alternative is not really an option. Though Google Finance provides historical stock data of SGX counters, there is no way you could readily and conveniently import that same data into the software of your choice. The exception is if you are looking at NYSE and NASDAQ counters.

For now, the Quantmod package developer has found a workaround solution to the problem and my script works as intended. I'm just keeping my fingers crossed that it will continue that way.


  1. Since the demise of the Yahoo financial API I've been using Alpha Vantage. They offer a free stock data API.

    I've written a blog posts about it, please check it out:

  2. Like Ashley, I am also now using Alpha Vantage.

    I went one step further and developed an addin that brings live last traded stock prices and historical data from Alpha Vantage straight into Excel.

    I make the addin available for free. You may download it from where you may also find related tutorials and spreadsheets.