Thanks to M.Kishinevsky and M. Here's a neat way to download stock data from Yahoo, perhaps into a spreadsheet (so you can play with the data). Here's a neat way to download stock data from Yahoo, perhaps into a spreadsheet (so you can play with the data). Discover historical prices for CSV stock on Yahoo Finance. View daily, weekly or monthly format back to when Carriage Services, Inc. Stock was issued. 10 New Ways to Download Historical Stock Quotes for Free Here is a list of websites that provide end of day historical data for US and international stock markets. All the quotes data provided by the websites listed here can be exported to CSV or Excel format.

Yahoo Finance recently changed its historical data URLs from http to https. For example, here is the URL to obtain the maximum history for IBM (as of today, 2017-05-29):
When I try to read this resource from within R I get the following:
The download works fine when invoked manually through the browser, so it's not like Yahoo Finance is trying to prevent access to the data. Evidently, the browser is sending some secret sauce to the Yahoo server. Can I send the same secret sauce through an R script?

2 Answers
I think Yahoo did away with its API a few months ago. If you want an Excel solution, you can download a sample file from the link titled 'Get Excel Spreadsheet to Download Bulk Historical Stock Data from Google Finance'
For R, do something like this.
Yahoo Finance Download Stock Quotes
Current version of 'free' Deriscope downloads both historical data and live feeds from YF.