Outputs the average daily return of the inputted cryptocurrency price.

avg_daily_return(prices)

Arguments

prices

A numeric vector representing the inputted cryptocurrency price.

Value

A numeric value representing the average daily return of the cryptocurrency.

Examples

price_df = data.frame('Date'=c('2022-01-15', '2022-01-16'), 'Close'=c(1.5, 2.5))
avg_daily_return(price_df$Close)
#> [1] 1