I am trying to formulate this simple MVO utility function with a linear transaction cost penalty added using Quadprog in MATLAB
tcost = 0.001; lambda = 4; mu = vector of expected returns (say 4x1) S = covariance matrix (4x4)
max w'*mu - lambda *w'Sw - lambda_TC * tcost *sum(abs(w(i) - w0(i))
I understand in order to be linear we can replace w(i) - w0(i) with a variable y(i) replacing the above equation to be
max w'*mu - lambda *w'Sw - lambda_TC * tcost *sum(y(i))
and we add the constraints y(i)>= w(i) - w0(i) and y(i)>= - (w(i) - w0(i))
I additionally have a long only constraint and the sum of the weights should sum to 1
I am unsure how to formulate this in quadprog in MATLAB. Any help will be appreciate.
Thanks very much!