Hi there, I have a matrix of size 1000x 40. The 1000 represent weeks and 40 represent the number of assets. For each entry is a percentage of money made or lost.
I want to do the cum prod horizontally (all assets for one week), then cumprod going doing. So I have a full return for all assets.
Any help would be appreciated.

 채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 6일

0 개 추천

cumprod(cumprod(YourMatrix,2))

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Time Series에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by