I have the formula for the variance of a portfolio
variance = transpose(weight)* covariance * weights
where the covariance(covR) is a 10*10 matrix and the weights(w) are a 10*1 matrix
I am trying to minimize the weights while having the constraints that the weights fall between 0 and 0.1
var = @ (w) w'*corR*w
I have tried to use the quadprog function, but I still can't seem to get the right answer.
Could anyone help ?
Best Answer