Which Maximum Diversification Approach in MATLAB is correct?

I am currently trying to find the portfolio weights of the Maximum Diversification Portfolio and found two approaches which result in different outcomes.

The first one is based on this paper:

Here I first calculate the assets weights in of synthetic assets and then covert them to an portfolio of real assets. According to the paper there is the possibility of being long or short in cash, but since I want to be fully invested in the risky assets I scale the weights to 1. My question is if this would be “allowed” without changing the optimization problem?

This is the objective function that I minimize:

function fval = md(corMat,w_md)

fval = w_md'*corMat*w_md;


And this is the optimization:

T = readtable('Data_test.xlsx');

  mon_ret= tick2ret(T{:,3:end});

  numReturns = size(mon_ret,1);

  covMat  = cov(mon_ret) ;  
  [corMat, std] = corrcov(covMat);

  port_size = length(covMat) ; 

  Aeq = ones(1,port_size);
  Beq = 1;

  lbnds = zeros(1,port_size);
  ubnds = ones (1,port_size);

  n1 = 1.0/port_size;
  w0 = repmat(n1, port_size, 1) ;

  mdfunction = @(w_md) md(corMat, w_md);
  w_md = fmincon(mdfunction, w0, ...
                                     [], [], Aeq, Beq, lbnds,       ubnds, []) ;

  w_md = w_md./std;
  w_md = w_md/sum(w_md);

The second approach is from this paper(p.21):

I think I solved it accordingly with this approach:

Objective Function:

function fval = md2(covMat, w_md2)

fval = w_md2'*covMat*w_md2;


Non Linear Constraint:

function [c,ceq] = nlcon(w_md2,std)

c =[];
ceq = sum(w_md2'.*std)-1;


and the optimization:

md2function = @(w_md2) md(corMat, w_md2);

w_md2 = fmincon(md2function, w0, ...
                                     [], [], Aeq, Beq, lbnds, ubnds, []) ;

w_md2 = w_md2/sum(w_md2);

Does anybody know which approach is correct or where my mistake is?

I`d appreciate every help!

Best regards

Quantitative Finance Asked by Dirty Dan on November 17, 2021

1 Answers

One Answer

Is the formula for code #1 $max D(S)=frac{S^{top}Sigma_S}{sqrt{S^{top}V_S S}}$?

or is it $max D(S)=frac{1}{sqrt{S^{top}V_S S}}$ s.t. constraints $Gamma$? Both appear on the same page, 41, in paper #1.

and is formula for code #2 $min frac{1}{2}mathbf{w}^{top}Sigmamathbf{w}$ s.t. $w_igeq 0$, $mathbf{w^{top}}boldsymbol{sigma}=1$ from paper #2's appendix?

If so, the 2nd formula has a non-negativity constraint, making it the short-sale constrained MDP, which might be why it doesn't correspond to the 1st, if the 1st is the unconstrained MDP.

Answered by develarist on November 17, 2021

Add your own answers!

Related Questions

Ask a Question

Get help from others!

© 2021 All rights reserved.