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
Post a Comment