Yahoo! Finance CSV file will not return Dow Jones (^DJI)

Replace ^DJI with INDU (that's one of the tickers for the Dow) - that will work.

No idea why ^DJI stopped working last weekend - someone has made a 'negative enhancement'.

Cheerio

GT


According to Yahoo at:

http://developer.yahoo.net/forum/index.php?showtopic=6943

Thank you for writing to Yahoo! Finance. I understand you're reporting that you cannot download CSV data for ^DJI. I can certainly give you more information about this. The limitation you are encountering is due to restrictions by the Dow Jones Index. Yahoo! is no longer able to provide Dow Jones Index data in this manner. I apologize for any inconvenience caused. Please let me know if I can be of further assistance. Thank you again for contacting Yahoo! Finance. Regards, Brett Yahoo! Finance Customer Care

The other post that suggests using INDU does seem to work!... Wonder if Yahoo (or Dow Jones) just missed this one and it will eventually go away...


I know this question has been answered some time ago but I've recently run into this ^DJI and Yahoo! quotes issue again due to another change at Yahoo! and have come up with a solution that might help the OP and anyone else who reaches this page as a result of a search.

As a bit of background please note that there's several URL's that may conceivably be used to download historical quote data from Yahoo. They are:

1) http://download.finance.yahoo.com/d/quotes.csv

2) http://ichart.finance.yahoo.com/table.csv

3) http://finance.yahoo.com/q/hp

1) is the one the OP listed, 2) is effectively the "download" link that you get below the web page display of quotes and 3) is the normal historical price quote webpage URL.

It turns out that while 1) has been blocked for ^DJI and some others since Aug 2011 as metioned by Mario Fernandez, 2) was actually still working until just the other day. I know this because I've been using it and it stopped working (as it turned out) about a week ago. As an aside, 2) had the benefit that it would in fact allow you to retrieve more data than was apparently available via either 1) or 3), for example, you could retrieve data all the way back to 1928 using method 2), but I digress. Anyway, as I say, 2) also stopped working recently which left me with the frustration of not being able to keep my datasets/models updated automatically.

Given that I actually use the ^DJI data for some of my models etc, I eventually spent an hour or 2 today writing a page scraper for the normal quotes page (e.g. no. 3) which will now directly fetch quotes from the HTML quotes web page. This is in the context of an open source command line downloader application written in Python that I've done some minor work on over the last couple of months. It is what I currently use to refresh my datasets on a routine basis. With the latest patch, the OP and anyone else that want to download ^DJI has another possible solution to download ^DJI as required.

If you'd like to try this out then you'll need to download and install Python first (on Windows. Linux and Mac has Python built in.) I suggest ActiveState's Python distribution, available here:

http://www.activestate.com/activepython/downloads

Note they ask for registration details but it's not obligatory. You can just ignore the registration page you get after clicking on one of the download links.

Then you need the pyQ program source. You can get this from the project page here:

http://bazaar.launchpad.net/~wprins/python-pyq/trunk/view/head:/pyq.py

Edit 2016-10-20: Code is now available on github and will run under Python 3 as well: https://github.com/ByteJuggler/pyq

Click the "download" link, and save the script somewhere suitable. Then open up a command prompt, "cd" to the folder you've downloaded the script to, and try to run the script with "pyq". Assuming Python has been installed, you should be presented with a summary of usage. In it's simplest form, a command like:

pyq IBM

will fetch a live quote line for IBM.

Something like:

pyq 20120601 20120701 IBM

... will fetch quotes for IBM from 20120601 to 20120701 date. Etc. Output is effectively CSV. If you want to save the output to a file, then redirect the output as per normal:

pyq 20120601 20120701 IBM >ibm.csv

Anyway, hope that helps someone. (I stumbled over this page earlier today while trying to figure out why my ^DJI dataset was out of date since about a week ago and decided to post back here if/when I came up with a solution.)

Edit: Please note for ^DJI you should quote the ticker, for example:

pyq 20120601 20120701 "^DJI" >"^DJI.csv"


I think that you are better off contacting Yahoo! Finance. As they know their system and will most likely be able to help.