Description Usage Arguments Value Examples
Takes a character list of tickers and returns an xts object of the variables. Useful for creating objects after a call to dMisc::getData(). For example, typically after calling dMisc::getData() (a wrapper for quantmod::getSymbols()) you will end up with OHLC objects in .GlobalEnv. This function grabs all the variables and uses zoo::merge.zoo to bind them together in a single object. Return type is set to xts via as.xts().
1 | tickersToXTS(tickers, na.omit = TRUE)
|
tickers |
a character vector of symbols. |
na.omit |
a flag indicating whether NAs should be removed. |
a single xts object containing all of the prices in tickers
.
1 2 3 | tickers <- c("IBM","JPM")
quantmod::getSymbols(tickers)
data <- Cl(tickersToXTS(tickers)) # just closing prices
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.