0
votes

I am very new to matlab and trying to solve portfolio optimization problem (minimizing the variance) using quadprog:

minW = quadprog(t_covar, v0, [], [], e, ub, lb, [], []);

where t_covar is the covariance matrix, v0 is a zero vector, e is the identity vector, ub = 1 and lb is a zero vector.

It seems to work fine but I get this warning:

Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-set algorithm. You could also try the interior-point-convex algorithm: set the Algorithm option to interior-point-convex and rerun.

Am I doing something wrong ? Should I worry about this warning ?

Hope I was clear thanks

1

1 Answers

0
votes

You seem to be using this form of quadprog

x = quadprog(H,f,A,b,Aeq,beq,lb,ub,x0)

since you specify 9 input arguments. However, your call has several issues:

  • The order of lb and ub should be reversed.
  • You don't have inequality constraints: A=[], b=[] (which is fine). But following that, you have invalid equality constraints, where you essentially have Aeq=e, beq=ub.

You call should be similar to

minW = quadprog(t_covar, v0, [], [], e, ?, lb, ub);

where "?" stands for the right hand side of your equality constraint.