I have a basic portfolio optimization problem that I need to get the optimal portfolio weights for a target volatility by optimizing the constituent weights. This portfolio sit on efficient frontier.
I would to like to use the quadprog function to find the solution. If I set the constrains so that the Beq=targetVol; the solution is not optiomal as the constituent weights dont sum to 1;
wght = quadprog(CovarianceMatrix,repmat(1/Ndim,Ndim,1),Aineq,bineq,Aeq,Beq, lbnds, ubnds,[]);
Could you please kindly give me some ideas how to set up the constrains or what should be the optimization function that I need to determine?
I can find the solution using Portfolio object in the Financial Toolbox but I would like to use the quadprog.
Thanks
I would to like to use the quadprog function to find the solution. If I set the constrains so that the Beq=targetVol; the solution is not optiomal as the constituent weights dont sum to 1;
wght = quadprog(CovarianceMatrix,repmat(1/Ndim,Ndim,1),Aineq,bineq,Aeq,Beq, lbnds, ubnds,[]);
Could you please kindly give me some ideas how to set up the constrains or what should be the optimization function that I need to determine?
I can find the solution using Portfolio object in the Financial Toolbox but I would like to use the quadprog.
Thanks