Skip to content
Prev 14494 / 15274 Next

Minimizing tracking error with restricted number of stocks

Alec,

I do not believe that there is a closed form optimization solution for
what you are trying to do.  In other words, I am agreeing with Coleman
et. al.

That is not the same thing as saying that you can't solve it with
PortfolioAnalytics.

First, add a position_limit constraint setting the number of non-zero
positions that you want in the portfolio

Second, add a tracking error objective as described in Ross'
presentation. 

(along with adding any other objectives or constraints you need in your
portfolio specification)

Third, utilize one of the global numerical solvers, e.g. DEoptim,
random portfolios, genSA, or pso.

The numerical solvers will not search the entire feasible space, but
rather search a subset of the feasible space stochastically.  You
should get acceptably close to the global optimum portfolio using these
methods in finite time.

Regards,

- Brian
On Thu, 2018-03-08 at 16:04 +0000, Alec Schmidt wrote: