Learn R Programming

partialCI (version 1.2.0)

multigetYahooPrices: Fetches closing prices of multiple stock tickers

Description

Fetches a zoo data.frame of daily closing prices of multiple stock tickers.

Usage

multigetYahooPrices(components, start, end, quiet = FALSE, adjust = TRUE)

Arguments

components

Character vector of Yahoo ticker symbols

start

First date of desired data in YYYYMMDD format. Default is earliest date of all series

end

Last date of desired data in YYYYMMDD format. Default is the last date for which data is available

quiet

If FALSE, then information is printed about the progress of the fetch operation

adjust

If TRUE, then adjusted closing prices are returned. Otherwise, unadjusted prices are returned.

Value

Returns a zoo data.frame containing the closing prices of the series listed in the components parameter, one column per price series.

See Also

getYahooData

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

### Note: you must have a working internet
### connection for these examples to work!
spy.voo <- multigetYahooPrices(c("SPY","VOO"))
# }

Run the code above in your browser using DataLab