Geomean on returns with negative values?

9 次查看(过去 30 天)
Hi, i need to calculate the geometric mean of financial returns (for a Markowtiz example), but obviously it won't work cause my data contains negative numbers. How can i do? Is there another function or i have to do it manually? Thanks

采纳的回答

dpb
dpb 2020-1-22
Use
GR=100*(prod(1+R/100)^(1/numel(R))-1);
where R is the rate of return for the period.
Example:
>> R=[9 1 2 3 -1]; % sample rate of returns, %
>> GR=100*(prod(1+R/100)^(1/numel(R))-1) % geometric rate of return
GR =
2.7458
  3 个评论
dpb
dpb 2020-1-23
编辑:dpb 2020-1-23
That's the definition for economic returns..."you can look it up" :)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Portfolio Optimization and Asset Allocation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by