CSI 779 / STAT 789

Example of Portfolio Optimization

The example in Michaud that begins on page 13 is for 8 different asset classes: the Morgan Stanley indices for the equity markets in Canada, France, Germany, Japan, and the United Kindom, U.S. stocks, as represented by the S&P 500, U.S. bonds, as represented by the Lehman Brothers index, and Eurobonds (Lehman Brothers). The premiums over the U.S. 30-day T-bills on the monthly returns are
0.39 0.88 0.53 0.88 0.79 0.71 0.25 0.27
and their standard deviations are
5.50 7.03 6.22 7.04 6.01 4.30 2.01 1.56
The correlation matrix is
1.00 0.41 0.30 0.25 0.58 0.71 0.26 0.33
0.41 1.00 0.62 0.42 0.54 0.44 0.22 0.26
0.30 0.62 1.00 0.35 0.48 0.34 0.27 0.28
0.25 0.42 0.35 1.00 0.40 0.22 0.14 0.16
0.58 0.54 0.48 0.40 1.00 0.56 0.25 0.29
0.71 0.44 0.34 0.22 0.56 1.00 0.36 0.42
0.26 0.22 0.27 0.14 0.25 0.36 1.00 0.92
0.33 0.26 0.28 0.16 0.29 0.42 0.92 1.00
The quadratic programming problem to determine the portfolio with minimum variance, given a minimum level of return can be solved using various software packages. Yaru Li found Splus codes named "quadratic" at this URL and a quadratic program in R language, named "portfolio.optim".

The Matlab Optimization Toolbox has a program called "quadprog" for quadratic programming.
This is available on the science cluster.

SAS has PROC NLP in SAS/OR that has a quadratic programming option.
A problem with using SAS is that it is not clear how to use it to build the efficient frontier.
Sample SAS program for a single point in the Michaud example.
SAS is available in most of teh PC labs on campus, but not on the science cluster.

IMSL has a Fortran routine QPROG or DQPROQ, and a C routine quadratic_prog to solve quadratic programming problems. With this it is easy to build the efficient frontier by looping over a grid of minimum returns.
It is often easier to make plots in S-Plus and other interactive software, using a file of points on the efficient frontier written by a Fortran or C program.
Sample Fortran program to build the efficient frontier for the Michaud example, and to write the points to a file.
An S-Plus program can read the points on the efficient frontier and plot them.
Both the Fortran and the C libraries are available on the science cluster.

More general programs can easily be constructed using the IMSL Librairies.
A sample Windows (DOS) executable.
This program expects the data to be stored in files, and allows some choices as to what kinds of computations will be performed.