I am trying to convert quarterly returns to yearly returns. Given a vector of quarterly returns, how can this be done?
I am fairly new to R-programming, so I haven\'t r
An idea via base R,
sapply(split(a, rep(c(FALSE, TRUE), each = length(a) / 2)), function(i)((1 + i[1]) * (1 + i[2]) * (1 + i[3]) * (1 + i[4])) - 1) # FALSE TRUE #0.2578742 0.1800339