r - why is chart.CumReturns diff to cumsum? -


i have matrix of returns x assets.

i can plot cumulative performance this:

pnls.cum<-apply(pnls.allin , 2 , cumsum) plot(pnls.cum[,1],type="l") 

or

chart.cumreturns(pnls.allin[,1]) 

but graphs subtly different (highs/lows etc) . there reason why?

chart.cumreturns uses geometric chaining (a product) default, not arithmetic chaining (a sum). set geometric=false:

chart.cumreturns(pnls.allin[,1], geometric=false) 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -