Optimization Problem about Optimal Portfolio with Aversion Index
이전 댓글 표시
Hello everyone, I'm trying to due with following optimization problem:

I have done some of the coding but cannot finish the double summation part.

Does anyone have any ideas that could help??? Thanks in advance.
답변 (1개)
Alan Weiss
2019년 2월 4일
0 개 추천
I don't see your rho and sigma variables, but you could try
sumexpr = optimexpr;
for i = 1:n
for j = 1:n
sumexpr = sumexpr + w(i)*w(j)*rho(i,j)*sigma(i)*sigma(j);
end
end
It would undoubtedly be more efficient to write this double summation as a standard MATLAB matrix multiplication, something like
sumexpr = w'*M*w;
where M has an appripriate definition, but the double sum should work, too.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 2
KA HEI LAM
2019년 2월 4일
Alan Weiss
2019년 2월 4일
I suggest that you use the debugger to find out what sizes the variables have just before the times operation executes.
Alan Weiss
MATLAB mathematical toolbox documentation
카테고리
도움말 센터 및 File 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!