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 with FinancialInstrument:::saveSymbols.common
so that
you could load it back using getSymbols(*, 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 1886
getSymbols("DJIA", src='FRED')
Or, you could use the DIA ETF which is actually tradeable and is a decent proxy for the index
getSymbols("DIA", src='yahoo')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With