calc_returns: Calculate individual daily returns of a dataframe containing...

Description Usage Arguments Value Examples

Description

Calculate individual daily returns of a dataframe containing multiple assets

Usage

1

Arguments

df

dataframe containing asset prices, 'date' column is optional

Value

dataframe containing returns

Examples

1
2
df <- data.frame(spx = c(2850, 2820, 2890), ukx = c(7004, 7010, 7080))
calc_returns(df)

yunching/tidymas documentation built on Nov. 17, 2019, 6:03 a.m.