I\'m trying to calculate the stock returns for my portfolio which requires "geometrically averaging" the percentages by year.
For simplicity, I have a dataf