Skip to contents

Calculate the total return of a strategy.

Usage

calc_total_return(returns)

Arguments

returns

Numeric vector of returns

Value

Numeric value representing total return as a decimal (e.g., 0.25 = 25%)

Examples

if (FALSE) { # \dontrun{
returns <- c(0.01, 0.02, -0.01, 0.03)
calc_total_return(returns)
} # }