### Efficient Frontier With Risk Free Assets

We now introduce a risk free asset into the framework. Let \( r_{f}\) and \(w_{f} \) represent the return and weight of the risk free asset, respectively. Let Z represent the vector of excess return over the risk free rate.

$$ r_{p}= R^{'}W + (1-\mathbf{1}^{'}W)r_{f} =r_{f} + \left( R^{'}-r_{f} \mathbf{1}^{'}\right)W = r_{f} + Z^{'}W$$ $$ {\sigma_{p}}^2=W^{'}\Sigma W $$

The portfolio optimisation problem is then again to minimise the variance of the portfolio for a given level of return but there is no budget constraints as the presence of risk free asset allows unlimited borrowing and lending:

$$ L \left( W, \lambda \right)=\frac{1}{2} W^{'}\Sigma W + \lambda \left( r_{p} - r_{f} - Z^{'}W \right)$$

Differentiating and setting the derivatives equal to zero, we get

$$ \frac{\partial L \left( W, \lambda \right)}{\partial W}=\Sigma W - \lambda Z=0 $$ $$ \frac{\partial L \left( W, \lambda \right)}{\partial \lambda}=r_{p} - r_{f} - Z^{'}W=0 $$

We need to solve the two equations for the two unknowns, with W being the ultimate prize. Solving the first equation for W, we get

$$ \Sigma W - \lambda Z=0 $$ $$ W=\lambda \Sigma^{-1}Z $$

And substituting into the second equation,

$$ r_{p} - r_{f} - Z^{'}W=0 $$ $$ r_{p} - r_{f}- \lambda Z^{'} \Sigma^{-1}Z =0 $$ $$ \lambda = \frac{r_{p} - r_{f}}{Z^{'} \Sigma^{-1}Z} $$

Thus:

$$ W=\lambda \Sigma^{-1}Z $$ $$ W=\frac{r_{p} - r_{f}}{Z^{'} \Sigma^{-1}Z}\Sigma^{-1}Z $$