Mean-Variance Optimization, constraint as matrix operation

조회 수: 14 (최근 30일)
Jovos
Jovos 2017년 2월 19일
댓글: Jovos 2017년 2월 19일
Hi, I am trying to use the linprog function to solve the mean-variance problem. I am confused with the input of constraint format. Basically, the objective function is
min W' * cov * W
subject to
W' * u = targetMean
W' * vectorOne = 1
I checked out the syntax
x = linprog(f,A,b,Aeq,beq)
I wonder how would I put the x-transpose into the constraint. Thanks.

답변 (1개)

John D'Errico
John D'Errico 2017년 2월 19일
Strictly impossible using linprog. PERIOD. EVER.
Your objective function is a quadratic form. It is NOT linear.
However, nothing stops you from employing quadprog, which is designed to solve for a minimum of a quadratic form. You will have two equality constraints, so Aeq will be an array with two rows.
  댓글 수: 1
Jovos
Jovos 2017년 2월 19일
Hey, thanks for that. I read through the documentation of quadprog. So I just set H as the co-variance matrix, set f empty. However, I am still confused how to set Aeq and beq. The constraint is
W' * u = targetMean
W' * vectorOne = 1
I tried to move u to the right hand side of the equation, putting 1 into Aeq and targetMean.* (u.^-1) into eb, but that does not work at all. May you elaborate a bit more? Thanks again.

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

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by