Learn R Programming

FinancialInstrument (version 1.3.1)

update_instruments.yahoo: updates instrument metadata with data from yahoo

Description

Adds/updates information in instrument with data downloaded from yahoo

Usage

update_instruments.yahoo(Symbols = c("stocks", "all"), verbose = FALSE)

update_instruments.TTR(Symbols = c("stocks", "all"), exchange = c("AMEX", "NASDAQ", "NYSE"), silent = FALSE)

Arguments

Symbols

can be a vector of instrument names, or, can be ‘all’ or ‘stocks’ or, for update_instruments.TTR, can be NULL in which case all stocks found with stockSymbols will be defined

verbose

be verbose?

exchange

character vector of names of exchanges. Used in ‘TTR’ method. Can be “AMEX”, “NASDAQ”, or “NYSE”

silent

silence warnings?

Value

called for side-effect

Details

Although these functions are intended to update the metadata of previously defined instruments, update_instruments.TTR will define the stocks if they do not already exist.

update_instruments.TTR is only to be used on U.S. stocks denominated in USD.

References

Yahoo! Finance finance.yahoo.com YahooQuote http://dirk.eddelbuettel.com/code/yahooquote.html gummy-stuff.org www.gummy-stuff.org/Yahoo-data.htm

See Also

update_instruments.instrument, update_instruments.morningstar, update_instruments.masterDATA, stockSymbols, stock

Examples

Run this code
# NOT RUN {
	stock('GS',currency('USD'))
 update_instruments.yahoo('GS')
	getInstrument('GS')
 update_instruments.TTR('GS')
 getInstrument('GS')
# }

Run the code above in your browser using DataLab