[R-SIG-Finance] How to get chart.CumReturns to return dataframe of cumulative returns

George Kumar grgkumar4 at gmail.com
Thu Sep 4 21:38:04 CEST 2014


Hi all,

I am using performanceanalytics
<http://stackoverflow.com/questions/tagged/performanceanalytics> package
and specifically the function

chart.CumReturns. This works fine. But my question
is suppose instead of plotting the data I would like
chart.CumReturns to return me a table/data frame of values.

I realize that I can use cumsum function

df.cumsum = apply(df,2,cumsum)

but this only gives me arithmatic sum, whereas I would prefer geometric

cumulative return and chart.CumReturns seem to do a good job
in returning that information.

Thanks.

George

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list