Learn R Programming

FinancialInstrument (version 1.3.1)

update_instruments.morningstar: Update instrument metadata for ETFs

Description

Currently, this only updates ETFs. It will add “msName” and “msCategory” attributes to the instruments. (ms for morningstar)

Usage

update_instruments.morningstar(Symbols, silent = FALSE)

update_instruments.ms(Symbols, silent = FALSE)

Arguments

Symbols

character vector of Symbols of ETFs

silent

silence warnings?

Value

called for side-effect.

References

http://www.morningstar.com

See Also

update_instruments.yahoo, update_instruments.TTR update_instruments.iShares

Examples

Run this code
# NOT RUN {
## backup .instrument environment
ibak <- as.list(FinancialInstrument:::.instrument) 
rm_instruments()
stock(s <- c("SPY", "USO", "LQD"), currency("USD"))
update_instruments.morningstar(s)
instrument.table(s)
## cleanup and restore instrument environment
rm_instruments(keep.currencies=FALSE)
loadInstruments(ibak)
# }

Run the code above in your browser using DataLab