I have a portfolio which is a subset of a benchmark. I want to minimise the tracking error between my portfolio and the benchmark.
Currently I use APT's risk model to do this. I set it to run for 10 iterations. Each iteration reduces the number of trades by approx 10% of the previous iteration and minimises the tracking error.
I wish to use my own risk model rather than APT for various reasons.
I can minimise the tracking error using my own risk model. However I am not sure how to minimise the tracking error and constraining the number of trades like APT does.
One approach which is very crude is to minimise the tracking error and calculate the marginal contribution of each stock to the tracking error and to tell the optimiser that those stocks cannot be traded. What is a better way?
I am using matlab and the tomlab optimiser, with the documentation below. So yes the objective function is non linear and we have linear constraints. I have seen that tomlab provides a mixed integer programming function however not sure how to incorporate it into my current problem?
% ----------------------------------------------------- % % QP minimization problem: % % % min 0.5 * x' * F * x + c' * x. x in R^n % x % s/t x_L <= x <= x_U % b_L <= A x <= b_U % % Equality equations: Set b_L==b_U % Fixed variables: Set x_L==x_U % % ----------------------------------------------------- % % Syntax of qpAssign: % % function Prob = qpAssign(F, c, A, b_L, b_U, x_L, x_U, x_0, Name,... % setupFile, nProblem, fLowBnd, x_min, x_max, f_opt, x_opt); % % INPUT (One parameter F must always be given. Empty gives default) % % F The matrix F in 0.5 x' F x in the objective function % c The vector c in c'x in the objective function % A The linear constraint matrix % b_L The lower bounds for the linear constraints % b_U The upper bounds for the linear constraints % x_L Lower bounds on x % x_U Upper bounds on x % % b_L, b_U, x_L, x_U must either be empty or of full length % % x_0 Starting point x (may be empty) % Name The name of the problem (string) % setupFile The (unique) name as a TOMLAB Init File. If nonempty qpAssign % will create a executable m-file with this name and the given % problem defined as the first problem in this file. % See qp_prob.m, the TOMLAB predefined QP Init File. % If empty, no Init File is created. Also see nProblem. % nProblem Number of problems, or problem number, to define in the setupFile % Not used if setupFile is empty. % % nProblem = 1 ==> File is created to make it easy to edit new % problems into the file. Text are included on how to add new % problems. The given problem is set as number 1. % If isempty(nProblem) same as nProblem=1. % % length(nProblem) > 1 ==> A file suitable for large test sets % are setup, where the problem definition is read from mat-files. % Statements for problems nProblem(1) to nProblem(2) are defined. % The given input is assumed to be nProblem(1), and the % corresponding mat-file is created. % % If nProblem > 1. Additional problems are assumed, and the only % thing done is to create a mat-file with the problem. % % If isempty(setupFile), nProblem is not used % % fLowBnd A lower bound on the function value at optimum. Default -1E300 % A good estimate is not critical. Use  if not known at all. % Only used running some nonlinear TOMLAB solvers with line search % x_min Lower bounds on each x-variable, used for plotting % x_max Upper bounds on each x-variable, used for plotting % f_opt Optimal function value(s), if known (Stationary points) % x_opt The x-values corresponding to the given f_opt, if known. % If only one f_opt, give x_opt as a 1 by n vector % If several f_opt values, give x_opt as a length(f_opt) x n matrix % If adding one extra column n+1 in x_opt, % 0 indicates min, 1 saddle, 2 indicates max. % x_opt and f_opt is used in printouts and plots.