Before revision:  We also consider a variant of the problem with size and magnitude constraints which we formulate using binary variables. In this case, only numerical solutions are possible .
After revision:  For the general case of an arbitrary joint distribution for the asset returns, under certain conditions, we characterize the optimal portfolio as the optimal Lagrange multiplier associated to an equality-constrained dual problem. Then, we consider the special case of Gaussian returns for which it is possible to identify all cases where an optimal solution exists and to give an explicit formula for the optimal portfolio whenever it exists .