tq_spread: Spread tq_get prices

Description Usage Arguments Details Value See Also

View source: R/returns.R

Description

A method to use with tq_get from the tidyquant package.

Usage

1
tq_spread(tbl, as_xts = FALSE, what = "close", ...)

Arguments

tbl

The results from using tq_get with the option get = "stock.prices"

what

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

...

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.

Details

To use only after tq_get.

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_get_wide


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