Suppose you currently own a portfolio of eight stocks. Using the Markowitz model, you computed the optimal mean/variance portfolio. The weights of these two portfolios are shown in the following table:
You would like to rebalance your portfolio in order to be closer to the M/V portfolio. To avoid excessively high transaction costs, you decide to rebalance only three stocks from your portfolio. Let $x_i$ denote the weight of stock $i$ in your rebalanced portfolio. The objective is to minimize the quantity:
$|x_1-0.02|+|x_2-0.05|+|x_3-0.25|+...+|x_8-0.12|$
which measures how closely the rebalanced portfolio matches the M/V portfolio. Now I want to formulate this problem as a mixed integer linear program but I am only familiar with index tracking problems based on characteristic similarities and when transaction costs are neglected, hence this problem is pretty confusing for me.
Progress: I have figured how to write the objective function in a linear form. $$min\sum_{i=1}^8 t_i$$ $$st \quad t_1\geq x_1-0.02$$ $$t_1\geq 0.02-x_1$$ $$...$$ $$t_8\geq x_8-0.12$$ $$t_8\geq 0.12-x_8$$ $$\sum_{i=1}^8x_i=1$$
What are the further constraints? I I need new binary variables in order to impose the constraint that only three stocks are traded but I don't know how to write that.
I would appreciate any helps!