please check papers on optimal models for portfolio management.
ituitionly, it actually a quadratic programming question
given the level of return, you should minimize the variation of porfolio.
by solving this programming ,you will get the answer you needed