Geomean on returns with negative values?

조회 수: 11 (최근 30일)
riccardo manfredi
riccardo manfredi 2020년 1월 22일
댓글: riccardo manfredi 2020년 1월 23일
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" :)
riccardo manfredi
riccardo manfredi 2020년 1월 23일
perfect, thanks again

댓글을 달려면 로그인하십시오.

추가 답변 (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