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 option:
c(by(a, rep(1:(length(a)/4), each = 4), FUN = function(x) (1 + x[1]) * (1 + x[2]) * (1 + x[3]) * (1 + x[4])-1 ) )) 1 2 0.2578742 0.1800339