> R 3.4.1
> OS X
> I am just learning to use the quantmod package and I have encountered something that I don’t understand.
> This works:
> This does not work:
> It returns only NAs:
> Trade Time Last Change % Change Open High Low Volume
> ^DJI <NA> N/A N/A N/A N/A N/A N/A N/A
It returns NAs because that's what is in the file returned by the
Yahoo server. Also note that getSymbols() and getQuote() use
getQuote("SPY") works, however. The Dow Jones Industrial index might
not work due to restrictions on real-time data distribution by the
> Two questions:
> 1. Is there some way to obtain the current DJI using quantmod?
No. See above.
> 2. If not, can someone suggest alternatives?
I don't know of any free alternatives that provide real-time data...
and I wouldn't trust them (or the Yahoo data you can download) for
anything I would risk my (or others') money on.