Exercise

An efficient portfolio

You need to construct an efficient portfolio that uses the maximum average return as the target return.

Consider two different scenarios: a scenario where short selling is allowed, and a scenario where short selling is forbidden. The minimization problem if short selling is allowed is:

$$\underset{m}{\text{min}} \ \sigma^2_p = x' \sum x \text{, subject to}$$ $$x' \mu = \mu_0,$$ $$x'1 = 1,$$

with \(\mu_0\) the target return and other symbols as defined before.

If you do not allow for short sales, the following constraint is added:

$$x_i \geq 0 \text{ for all } i.$$

Instructions

100 XP

Run the code that calculates your efficient portfolio characteristics for both cases, that is, one where short sales is allowed and one where short sales is not allowed. The results are assigned to efficient_porfolio_short and efficient_porfolio_no_short. Afterwards, the weights of the stocks in both portfolios are plotted.