calc_log_return: Compute logarithmic net returns for a vector

View source: R/calculations.R

calc_log_returnR Documentation

Compute logarithmic net returns for a vector

Description

calc_log_return helper function for compute_return. Takes every element of x except the first and divides by every element of x excep the last and takes the log.

Usage

calc_log_return(x)

Arguments

x

numeric vector

Details

Used in scripts: Robust function: TRUE

Value

Vector of same length as x


AndreSjuve/dretools documentation built on Dec. 4, 2024, 3:12 a.m.