I am turning in my thesis tomorow and I'm getting a very bizzare error message with quantmod which I never had during the last weeks while working with this package. I can't manage to import data specificly of Dow Jones index (^DJI). I get the following error message:
getSymbols("^DJI",src="yahoo", from='2005-6-01', to='2012-6-21')
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
impossible to open the URL 'http://chart.yahoo.com/table.csv?s=^DJI&a=5&b=01&c=2005&d=5&e=21&f=2012&g=d&q=q&y=0&z=^DJI&x=.csv'
Also : Message d'avis :
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
impossible to open : the status HTTP was '404 Not Found'
I almost feel embarased to ask such a simple question. I really don't understand where the problem is.. these for example work just fine
getSymbols("AAPL",src="yahoo", from='2005-6-01', to='2012-6-21')
getSymbols("^NDX",src="yahoo", from='2005-6-01', to='2012-6-21')
So where is the problem? thank you very much for your help I really appreciate it !
For some reason, yahoo does not currently provide that data. You can see on the yahoo website that it currently says "Historical quote data is unavailable for the specified date range."
I do not know ifthis is temporary or permanent, but I would guess that it is temparary because as you noted, "^NDX" still works. Since today is a holiday in the United States, it is possible that Yahoo is doing maintenance.
If it becomes available before it is too late for you, I would suggest saving the data either with
save
or withFinancialInstrument:::saveSymbols.common
so that you could load it back usinggetSymbols(*, src='FI')
If it's not up by the time you need it, you have a couple alternatives that may or may not suit your needs. You could use
getSymbols.FRED
to get the closing values of the index since 1886Or, you could use the DIA ETF which is actually tradeable and is a decent proxy for the index