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