How to allow for weights between -1 and 1 using constraints in Aeq x <= beq
问题 I am using quadprog to find a portfolio of optimal weights. So far, I have managed to implement long-only and short-only constraints as follows: FirstDegree = zeros(NumAssets,1); SecondDegree = Covariance; Long only Aeq = ones(1,NumAssets); beq = 1; A = -eye(NumAssets); b = zeros(NumAssets,1); x0 = 1/NumAssets*ones(NumAssets,1); MinVol_Weights = quadprog(SecondDegree,FirstDegree,A,b,Aeq,beq,[],[],x0, options); Short-only Aeq = ones(1,NumAssets); beq = -1; A = eye(NumAssets); b = zeros