tq_get_wide: Yahoo Data Wide

Description Usage Arguments Value See Also Examples

View source: R/returns.R

Description

Get yahoo price data in wide form for a vector of stocks.

Usage

1
tq_get_wide(x, what = "close", ...)

Arguments

x

A single character string, a character vector or data frame representing a single or multiple stock index, stock symbol, metal symbol, currency combination

...

Additional parameters passed to the appropriate quantmod function. Common optional parameters include:

  • from A character string representing a start date in YYYY-MM-DD format

  • to A character string representing a end date in YYYY-MM-DD format.

type

a single character element from the following options "open", "close", "high", "low", "volume", "adjusted". Defaults to "close".

Value

A data frame with the first column as the date and each other column representing a stock and each cell its price.

See Also

tq_get, tq_spread

Examples

1
2
tq_get_wide(c("SPY", "SHV"))
tq_get_wide(c("SPY", "SHV"), what = "volume", from = "2015-12-31")

optimist/inhouse documentation built on May 24, 2019, 3:56 p.m.