The result, derived after a bit of algebra, is that: Ofc *(m -r)-Ge,b *(M-fc-0 ^E "--------- 1 ,^2 > s---------- ------------------------- (4.10) and o;.(|ib-r)-oeb.(|ie-r) /l.(o,Ofc-o,0 (4.n; Notice that in these formulas the expected returns show up with the risk-free rate subtracted off. The risk-free rate is the natural reference point for expected returns, and in general, we will find it more convenient to focus on expected excess returns above the risk-free rate. From this point forward we will use the notation E{r) and |i to refer to the expected excess return, and the subtraction of the risk-free rate will be implicit. The equations shown above for the two risky asset case are quite complicated. The nature of the solution is more obvious when we use matrix notation. More generally, we can write down the optimization problem for n risky assets as follows: max(overW)U = E[\Lp (";)] - .5 . X. oj (w) (4.12) where w is an ?z-dimensional vector of proportions of portfolio weights in each of the risky assets. Let |i be the K-dimensional vector of expected excess returns of assets and £ be the nxn matrix of variances and covariances of the risky assets. We have: E[iip(iv)] = ii'u; (4.13) and <5\{w) = w'Ym! (4.14) Thus, the optimal portfolio problem is to choose w such that we maximize U=\l'w-.5 -X-w'lw (4.15) Taking the derivative with respect to w and setting it equal to zero leads to the optimal portfolio condition: "/ = ff|.S-V (4.16)