The formula for the portfolio variance is
V ¼
X
k
X
j
p
k
s
kj
p
j
This formula sometimes appears in statistics books in a different but equivalent form.
From this form, however, it is not difficult to make the calculation in Excel. The value
of p
k
s
kj
p
j
is computed as the (k, j)th element of the array in cells B18:F22. (For this
purpose, it is convenient to replicate the proportions from row 15 in cells G8:G12.)
Then the elements of this array are summed in cell C24. As a result, the risk measure
V appears in cell C24, and the return measure R appears in C26.
The portfolio optimization problem is to choose the investment proportions to
minimize risk subject to a floor (lower bound) on the return. That is, we want to mini-
mize V subject to a minimum value of R, with the p-values as the decision variables. A
value for the lower bound appears in cell F26. We specify the model as follows.
Objective: C24 (minimize)
Variables: B15:F15
Constraints: C26 F26
G15 ¼ 1
For a return floor of 1.5 percent, Solver returns the solution shown in Figure 8.14.
All five stocks appear in the optimal portfolio, with allocations ranging from 30 per-
cent of the portfolio in National Chemical to 13 percent of the portfolio in National
Computer.
For this model, the spreadsheet layout is a little different from the others we have
examined, mainly due to the close relationship between the historical data and the
elements of the analysis. The spreadsheet, as constructed, could easily be adapted
to the optimization of any five-stock portfolio. All that is needed is the set of returns
data, to be placed in the data section of the spreadsheet. For a data collection period of
longer than 24 periods, the formulas for average, standard deviation, and covariance
would have to be adjusted. The Calculations section separates the decision variables
from the objective function, but the logic of the computations flows from
Proportions to Calculations to Risk and Return.
In principle, two modeling approaches are possible in portfolio optimization.
Minimize portfolio risk, subject to a floor on the return
or
Maximize portfolio return, subject to a ceiling on the level of risk
The former structure is usually adopted, because it involves a convex objective and
linear constraints, a case for which the GRG algorithm is reliable.
Beyond a single optimization of the portfolio model, investors are usually inter-
ested in the tradeoff between risk and return. If we minimize risk subject to a floor on
the return, we can repeat the optimization for several values of the floor. This process
traces out points along the so-called efficient frontier, which plots the best risk achiev-
able for any desired level of return. A complementary approach is available if we maxi-
mize return subject to a ceiling on risk. Results from the Optimization Sensitivity tool
8.4. Nonlinear Models with Constraints 319