yahooSeries(symbols, from = NULL, to = Sys.timeDate(),
nDaysBack = 366, ...)
yahooImport(query, file = "tempfile", source = NULL,
frequency = c("daily", "weekly", "monthly"),
from = NULL, to = Sys.timeDate(), nDaysBack = 366,
save = FALSE, sep = ";", try = TRUE)file. By default FALSE.NULL, then the URL will be set automatically to its
default value.yahooImport returns an S4 object of class
fWEBDATA with the following slots:yahooSeries returns an S4 object of
class timeSeries or alternatively an object specified by
the function argument returnClass.
The function keystatsImport returns a data frame with
key statistics downloaded from yahoo's web site.s=SYMBOL&a=DD&b=MM&c=CCYY&g=d&q=q&z=SYMBOL&x=.csv
where SYMBOL has to replaced by the symbol name of the
instrument, and DD, MM, and CCYY by the
day, month-1 and century/year when the time series should start.Here are some examples of symbols:
[query] Description:
^DJI Dow Jones 30 Industrial Averages
^NYA New York Stock Exchange Composite
^NDX Nasdaq 100 Index
^IXIC Nasdaq Composite Index
^TYX US 30Y Treasury Bond Index
IBM BM DJIA Stock
KO Coca-Cola DJIA Stock }
The meaning of the tokens in the query string are the following:
s Selected Ticker-Symbol
a First Quote starts with Month (mm)
b First Quote starts with Day (dd)
c First Quote starts with Year (ccyy)
d Last Quote ends with Month (mm)
e Last Quote ends with Day (dd)
f Last Quote ends with Year (ccyy)
z Selected Ticker-Symbol }
## yahooImport -
yahooSeries("IBM")Run the code above in your browser using DataLab