Geomean on returns with negative values?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
riccardo manfredi
am 22 Jan. 2020
Kommentiert: riccardo manfredi
am 23 Jan. 2020
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
0 Kommentare
Akzeptierte Antwort
dpb
am 22 Jan. 2020
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Portfolio Optimization and Asset Allocation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!