0

I'm running a Global Minimum Variance Portfolio in Matlab in order to evaluate different kind of estimated covariance matrix through Sharpe Ratio of portfolio return. The problems arise when I run the code:

`

`Ri_Rf=Routsample;
mu=mean(Ri_Rf);
p_CC = Portfolio('AssetCovar',CC,'AssetMean',mu); 
p_CC = setDefaultConstraints(p_CC);
w_CC = p_CC.estimateFrontierLimits('min'); 
R_port_CC=estimatePortReturn(p_CC,w_CC); 
Risk_port_CC=estimatePortRisk(p_CC,w_CC); 
SharpeRatio_CC=R_port_CC/Risk_port_CC;`

` I get this output:

Error using Portfolio/parsearguments
AssetCovar must be a symmetric matrix.

Error in Portfolio (line 183)
            obj = parsearguments(obj, parameters, values);

I'm sure that the matrix is symmetrix because the code used to generate it assure that property. CC stands for "Constant Correlation matrix" built by Ledoit and Wolf and I took the code to implement that matrix from Wolf's website.

I'm sure that the matrix is symmetrix because the code used to generate it assure that property. CC stands for "Constant Correlation matrix" built by Ledoit and Wolf and I took the code to implement that matrix from Wolf's website.

0 Answers0