February 6th, 2011, 3:14 pm
Hello,I have set up my optimization problem to minimize variance, but I keep on getting the "wrong" weights, in the sense that they don't add up to 1. The assumption I am taking here is that there is no short -selling. The error message I get in Matlab is: The system of equality constraints is consistent.Removing the following dependent constraints before continuing: 2 3 4The equality constraints are dependent.Exiting: the constraints are overly stringent;Can someone please explain to me what I might be doing?I have attached my code. Note on the code: I have thought about making ub = zeros(4,1). However, then, that just allocates the weights to some number (28.9017)- all allocation is the same. I don't think this is correct. Thanks for your feedback!
-
Attachments
-
code2.zip
- (420 Bytes) Downloaded 74 times