문제

I have a matrix of returns for x assets.

I can plot the cumulative performance like this:

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

or

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

But the graphs are subtly different (highs/lows etc) . Is there reason why?

도움이 되었습니까?

해결책

chart.CumReturns uses geometric chaining (a product) by default, not arithmetic chaining (a sum). Just set geometric=FALSE:

chart.CumReturns(pnls.allin[,1], geometric=FALSE)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top