dly_ret: Daily returns for wide-form price data

Description Usage Arguments Value Examples

View source: R/returns.R

Description

Daily returns for wide-form price data

Usage

1
dly_ret(df, roll = 1, accumulate = FALSE, date_col = NULL)

Arguments

df

A data frame or xts with price data. If a data frame is given then the first column of date type will as the index unless it is manually set in date_col

roll

Rolling returns, "1 = no rolling"

date_col

To be implemented

type

To be implemented

Value

An object of the same class of df with the returns.

Examples

1
tq_get_wide(c("SPY", "SHV")) %>% dly_ret()

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