# Computing $\gamma$ and $\mu$ at the efficient frontier

Consider the condition which the weights of any portfolio belonging to the efficient frontier satisfy:

\begin{equation} \gamma\boldsymbol{wC} = \boldsymbol{m} - \mu\boldsymbol{u}\end{equation}

Assuming we have three securities $\boldsymbol{w}= [w_1,w_2,w_3],m=[\mu_1,\mu_2,\mu_3],u =[1,1,1], \gamma =\dfrac{u_V-\mu}{\sigma^2_v}$.$\boldsymbol{C}$ is the covariance matrix,$\mu_V$ is the expected return of this portfolio, $w_i$ is the weight and $\mu_i$ is the expected return on security $i$.

What I need to do is to compute the values of $\gamma$ and $\mu$ such that the weights $\boldsymbol{w}$ satisfy $\gamma\boldsymbol{wC} = \boldsymbol{m} - \mu\boldsymbol{u}$

Assume that we have all values except $\mu$ and $\gamma$ The way to do this,according to my book, is by first multiply this condition(equality) by $\boldsymbol{C}^{-1}\boldsymbol{u}^T$ and, respectively, $\boldsymbol{C}^{-1}\boldsymbol{m}^t$ so that we get: \begin{equation}\mu_V(\boldsymbol{m} - \mu\boldsymbol{u})\boldsymbol{C}^{-1}\boldsymbol{u}^T = (\boldsymbol{m}-\mu \boldsymbol{u})\boldsymbol{C}^{-1}m^T \end{equation}

(since $\boldsymbol{w}\boldsymbol{u}^{T}$ = 1 and $\boldsymbol{w}\boldsymbol{m}^T = \mu_V$ , also if it is of any use $\sigma^2_V = \boldsymbol{w}\boldsymbol{C}\boldsymbol{w}^T$ )

However I don't see how to obtain this equality the way the book describes:

$\gamma\boldsymbol{wC} (\boldsymbol{C}^{-1}\boldsymbol{u}^T)(\boldsymbol{C}^{-1}\boldsymbol{m}^T) = (\boldsymbol{m} - \mu\boldsymbol{u}) (\boldsymbol{C}^{-1}\boldsymbol{u}^T)(\boldsymbol{C}^{-1}\boldsymbol{m}^T)$

On the left hand side I get $\gamma (\boldsymbol{C}^{-1}\boldsymbol{m}^T)$.Anyhow I don't see how to get this to the equation above(how the book did it).Could someone show me how they did it or what Iam missing.

...The next step would be to solve for $\mu$ and this is as follows \begin{equation} \mu= \dfrac{\boldsymbol{m} \boldsymbol{C}^{-1}( \boldsymbol{m}^T - \mu_V \boldsymbol{u}^T) }{\boldsymbol{u} \boldsymbol{C}^{-1}( \boldsymbol{m}^T - \mu_V \boldsymbol{u}^T)} \end{equation}

This is obtained from:

\begin{equation}\mu_V(\boldsymbol{m} - \mu\boldsymbol{u})\boldsymbol{C}^{-1}\boldsymbol{u}^T = (\boldsymbol{m}-\mu \boldsymbol{u})\boldsymbol{C}^{-1}m^T \end{equation}

Once again I don't know how they did it. Could someone show the steps in more detail??

First of all I’ll work with column vectors because I find it easier than with row vectors as you did. I guess it’s a little bit easier if we modify your first equation a little bit. Notice that is really the first order condition of the following lagrangian: $$L(w, \lambda, \delta)= \frac{1}{2}{\bf w^TCw} - \lambda({\bf w^Tm} - \mu_v) - \delta({\bf w^Tu} - 1)$$ that you use to minimize variance ${\bf w^TCw}$ s.t. to the portfolio having a specific return (${\bf w^Tm}=\mu_v$) and portfolio weights summing to one (${\bf w^Tu}=1$). The first order condition w.r.t. portfolio weights is: $${\bf Cw}=\lambda {\bf m} - \delta {\bf u}$$ which is exactly your first equation when $\lambda=1/\gamma$ and $\delta=\mu/\gamma$. Every mean-variance efficient portfolio must satisfy this relationship. Now you can premultiply by ${\bf C^{-1}}$ both sides to obtain

$${\bf (Eqn. 1)} \text{ }{\bf w}=\lambda {\bf C^{-1}m} + \delta {\bf C^{-1}u}$$

Finally you realise that your constraints were ${ \bf u^Tw}=1$ and ${\bf m^T w}=\mu_v$ therefore if you premultiply (Eqn. 1) once by ${\bf u^T}$ and once by ${ \bf m^T}$ you’ll get the following two equations:

$${\bf u^Tw}=\lambda {\bf u^TC^{-1}m} + \delta {\bf u^TC^{-1}u} = 1$$ $${\bf m^Tw} = \lambda {\bf m^TC^{-1}m} + \delta {\bf m^TC^{-1}u} = \mu_v$$

Notice that $a={\bf u^TC^{-1}m}={\bf m^TC^{-1}u}$ , $b={\bf u^TC^{-1}u}$ and $c={\bf m^TC^{-1}m}$ are all scalars, hence you can find $\lambda$ and $\delta$ (and therefore your desired $\gamma=1/\lambda$ and $\mu=\delta/\gamma$) as the solutions of the following linear system in two unknowns: $$a\lambda + b\delta = 1$$ $$c\lambda + a\delta = \mu_V$$

A Bonus:

Just to give you a little bit of intuition: if you normalise the first addend on the right hand side of (Eqn. 1) by ${\bf u^TC^{-1}m}$ and the second addend by ${\bf u^TC^{-1}u}$ you have: $${\bf (Eqn. 2 ) } {\bf w}=\lambda {\bf u^TC^{-1}m} \frac{{\bf C^{-1}m}}{{\bf u^TC^{-1}m}} + \delta {\bf u^TC^{-1}u \frac{C^{-1}u}{u^TC^{-1}u}} =$$$$= k^* {\bf w^*} + k^{MV} {\bf w^{MV}}$$

where $k^*=\lambda {\bf u^TC^{-1}m}$ and $k^{MV}=\delta {\bf u^TC^{-1}u}$ are two scalars that sum up to one, that is $k^*+k^{MV} = \lambda {\bf u^TC^{-1}m} + \delta {\bf u^TC^{-1}u} = {\bf u^T}(\lambda {\bf C^{-1}m} + \delta {\bf C^{-1}u}) = {\bf u^Tw} = 1$.

${\bf w^*=\frac{C^{-1}m}{u^TC^{-1}m}}$ and ${\bf w^{MV}\frac{C^{-1}u}{u^TC^{-1}u}}$ are two portfolios on the frontier; in particular it can be shown that ${\bf w^{MV}}$ is the portfolio with the global minimum variance. From here you can see that two funds are enough to span the whole frontier.

What the book actually meant was multiplying both sides of the condition equation by $C^{-1}u^T$ first, which would give you $(1)$ $\gamma=(m-\mu u)C^{-1}u^T$. Then multiply both sides of the SAME ORIGINAL condition by $C^{-1}m^T$, which would give you $(2)$ $\gamma\mu_V=(m-\mu u)C^{-1}m^T$. Now, using $(1)$ and $(2)$ you get $\mu_V(m-\mu u)C^{-1}u^T=(m-\mu u)C^{-1}m^T$. After that you will only need to open the braces, rearrange the $\mu$ terms and get the solution for $\mu$. I would highly recommend to also read this part from Zastawniak's "Mathematics for Finance - An Introduction to Financial Engineering" book, chapter 5. The authors have used a maximization approach there, which is quite informative.