Thank you very much! I've now changed the code to a SOCP. Anyhow, this time I
get the error, that "Sigmonial SOCP not supported". What does that
mean?
My code now is as follows:
% test data
mu_t = [0.05; 0.11; 0.16; 0.16];
Cor_t = [1.0 0.1 0.7 -0.1;
0.1 1.0 -0.2 0.4;
0.7 -0.2 1.0 0.3;
-0.1 0.4 0.3 1.0];
Sigma_t = [ 0.025 0.00055 0.0056 0.00125;
0.00055 0.0121 -0.00352 0.011;
0.0056 -0.00352 0.0256 0.012;
0.00125 0.011 0.012 0.027];
ab = 0.05;
R = mean(mu_t);
% upper and lower bounds for mu
mu_l = mu_t - ab*mu_t;
mu_u = mu_t + ab*mu_t;
mu_l(3) = 0.08;
% upper and lower bounds for Sigma
Sigma_l = Sigma_t - ab*Sigma_t;
Sigma_u = Sigma_t + ab*Sigma_t;
% upper and lower bounds for the corelation matrix
Cor_l = Cor_t - ab*Cor_t;
Cor_u = Cor_t + ab*Cor_t;
% definition of the variables
n = length(mu_t);
mu = sdpvar(n,1); %mu, later to be uncertain
w = sdpvar(n,1);
Sigma = sdpvar(n,n); %Sigma, later to be uncertain
sdpvar z; % additional variable
% constraints on the portfolio
W = [sum(w) == 1, w >= 0];
% Uncertainty of mu
M = [mu_l <= mu <= mu_u, mu'*w >= R, uncertain(mu)];
%Uncertainty of Sigma, now it depends on the corelation matrix
C = [];
for k = 1:n
for j = 1:n
C = [C, norm([2*z;Sigma(k,k) - Sigma(j,j)],2) <= Sigma(k,k) + Sigma(j,j),
Cor_l(k,j)*z >= Sigma(k,j) >= Cor_u(k,j)*z];
end
end
for k = 1:n
for j = 1:n
C = [C, uncertain(Sigma(k,j))];
end
end
%here I think lies the problem: I want to add a constraint on the risk
Sigma, it shouldn't be any larger than a fixed value
sdpvar y;
y = Sigma.^(1/2)*w;
C = [C, norm(y,2)<= 0.015];
% Zielfunktion
sdpvar t
solvesdp([W + M + C,w'*Sigma*w<=t] , t)
Thany you very much in advance!