When finding the optimal allocation using markovitz, the model will return '0' weights for assets that are "inefficient". What is the standard way for dealing with these weights if all assets have to be included in the portfolio and a simple minimum is not an option? Also when introducing the CML the textbook says one should add a risk free asset to produce the optimal portfolio but i cant seem to find a formula to calculate the weight of the risk free asset. I understand the optimal portfolio should be a point on the CML but how can i find it?


1 Answer 1


You want the CML to be as steep as possible (greater reward for lesser risk), so find the corresponding point, $T$, from all of those on the frontier that satisfies:

$$ \max_{T} \quad \nabla = \frac{R_T - R_f}{\sigma_T} $$

If you impose constraints on your weights then you, typically, have a quadratic optimisation problem with constraints, and will need some form of numerical solver. The docs for cvxopt in python have this sort of problem as an example.

  • $\begingroup$ I am at the point where I get the max sharpe portfolio on the efficient frontier and the allocation for the risky assets, I know that the CML should be the line between (0,rf) and the max sharpe portfolio. How do I find the weights of risky portfolio:risk free asset? Or should I include the risk free asset in the beginning when doing the covariance matrix etc $\endgroup$
    – Joan Arau
    Oct 2, 2018 at 16:55
  • $\begingroup$ The point about it being a line is that if your investment decision is solely Sharpe Ratio based then you are indifferent at any point on the line. So weights of $(R_T, R_f) = (1,0) = (0,1) = (0.5, 0.5) $ are all equivalent, but each comes with a different risk and different return so further criteria is required to sub-select. Leverage can even be obtained if you can borrow at risk free rate, i.e. $(2,-1)$ $\endgroup$
    – Attack68
    Oct 3, 2018 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.