## Feature Archives

*Trends in the computing industry and issues to consider before purchasing a new computer or upgrading your current system.*

*Analyzing, selecting and trading exchange-traded funds*

*Using investor sentiment to indentify tops and bottoms in the market.*

*Market breadth and momentum indicators to gauge the market's overall direction.*

**Mutual Fund Screening & Analysis**

*Screening for and analyzing mutual funds.*

*Constructing a portfolio of investments and the issues involved, including risk management.*

*In-depth reviews of some of the most popular investment-related software.*

*Using quantitative stock screening filters to identify possible investment and analyzing individual stocks.*

*Determining the "true worth" of a company.*

*Using technical indicators and charts to help time your buy and sell decisions.*

*Using computerized tools and resources to prepare and file your personal income taxes.*

# Portfolio Optimization Program Finds Efficient Frontier

## by Joe Lan, CFA

Modern portfolio theory (MPT) attempts to use relationships between securities to maximize the return obtainable for a given amount of risk. The theory is based on the premise that through diversification, it is possible to achieve a combination of assets that has a lower risk than any of the individual assets. The theory states that for each portfolio of stocks, an efficient frontier exists that contains combinations of stocks within the portfolio that provide the highest return for a given level of risk, or the lowest risk for a given return.

It is fairly simple to conceptualize how a collection of holdings can have lower risk than any individual holding. Consider an overly simplified example of two assets that are perfectly negatively correlated (e.g., as one variable increases, the other decreases by the same amount). In this case, the two assets when held together provide some weighted return but their collective risk, measured by volatility, is zero. Due to their perfectly negative correlation, when one asset appreciates, the other will depreciate by the same amount.

Although the concept is fairly simple, the question that remains is how an individual investor would implement such a strategy. In this Feature article, I use the Portfolio Optimization (PO) program developed by AAII member David Herron, which is available free of charge to AAII members in the Download Library, in order to create “efficient portfolios.” The program uses MPT to identity efficient combinations of stocks and mutual funds with the lowest possible level of risk for a specified annual portfolio return. Currently, the program only runs on 32-bit operating systems. The tests performed in this article were done using a Windows 7 Ultimate 64-bit computer while running Windows XP Mode utility, which can be downloaded in full from the Microsoft website.

## Performing Backtests

The Portfolio Optimization program is available to AAII members through the Download Library at www.aaii.com/download-library, in both the Financial Planning and Portfolio Management sections. After downloading the program, the installation process creates a “PO” folder on your local disk drive (usually the C: drive). The program and all its functions are performed, and results are saved, directly in this folder.

The main program window provides seven options for running the program. The first step to creating an efficient portfolio is to create a sample file. At the main menu, press 2, which allows you to “Prepare/Modify/Recall SAMPLE FILE” to calculate efficient portfolios. A sample file is the portfolio of stocks the program uses to calculate the efficient frontier. To keep this example simple, press 1 for “Display/Modify an EXISTING SAMPLE FILE.” You may also press 2 to CREATE A NEW SAMPLE FILE. The PO database has annual returns for the past 10 years for all stocks from AAII’s Stock Investor Pro and all mutual funds from AAII’s Quarterly Mutual Fund Update. At the next screen, type in djia2012 to select the sample file that comes with the program. The next screen shows the stocks contained in the sample file (which in this case is the stocks of the DJIA) and their yearly returns for the past 10 years. (The annual returns provided by PO are all calculated based on company closing prices in the *Stock Investor Pro* database.) Figure 1 shows the resulting document for the sample file with yearly returns for each DJIA stock along with geometric (compound) average returns and standard deviations.

After answering yes or no, PO provides five choices—Find EM’s, Change yrs, Main Menu, Delete security and Add security. To calculate the efficient portfolio for the sample file of stocks, first select the years by pressing 2. To calculate the 2011 efficient portfolio for our test, we use the years 2007–2010. After the years are specified, press 1 to find the efficient portfolio.

On the next screen, the program asks whether you want to specify a minimum required return. Answering no to this question will prompt the program to provide several portfolios on the efficient frontier, including the efficient portfolio with the highest return. The program then asks you to provide the maximum fraction for any one security (maximum percentage that any one security can be of the total portfolio). This is to ensure diversification. The problem with this type of optimization normally occurs because a few securities have very high returns relative to their volatility and they would dominate the portfolio without constraints. If you do not specify a fraction, the program will show the highest return portfolio as consisting of the single security that achieved the greatest return over your specified period. For our sample backtest, I chose to limit the maximum fraction of any one security to 20%. The efficient portfolios for 2011 can be seen in Figure 2.

The results show the stocks along with the percent of each that make up each of the efficient portfolios along the efficient frontier. As you can see in Figure 2, the efficient portfolio that was able to generate 6.0% annualized return had a standard deviation of 3.17%. As the return increases, so does the standard deviation. Each of these efficient portfolios along the efficient frontier offers the lowest standard deviation for the level of return.

## Looking at the Numbers

The results gathered using the Portfolio Optimization program are impressive, but keep in mind these portfolios were constructed with the historical data. Figure 2 shows four efficient portfolios calculated by the Portfolio Optimization program. Keep in mind that as a parameter, no single stock can be more than 20% of the entire portfolio. The results shown in Figure 2 provide the portfolio mix of stocks with the lowest standard deviation at 6%, 8%, 10% and 12% returns.

Annual Return (%) |
Avg Annual Return (%) |
Annual | ||||||

St Dev | ||||||||

2011 | 2010 | 2009 | 2008 | 2007 | 2006 | (%) | ||

DJIA Selections | 16.40 | 28.54 | 2.02 | –20.12 | 21.06 | 17.56 | 9.62 | 17.49 |

DJIA | 8.40 | 14.10 | 22.70 | –31.90 | 8.90 | 19.00 | 4.99 | 19.80 |

VMCIX Selections | 25.58 | 70.70 | 35.03 | –28.56 | 3.52 | 16.66 | 16.48 | 33.07 |

VMCIX | –1.96 | 25.67 | 40.51 | –41.76 | 6.22 | 13.78 | 3.35 | 28.20 |

VMCIX 2nd-Highest Selections | 36.50 | 51.00 | 46.22 | –26.22 | 26.32 | 28.15 | 23.80 | 27.82 |

VMCIX | –1.96 | 25.67 | 40.51 | –41.76 | 6.22 | 13.78 | 3.35 | 28.20 |

As shown in Figure 2, the allocation for the efficient portfolio with the highest return is 19.5% in Caterpillar Inc. (CAT), 0.5% in Chevron Corp. (CVX), and 20% each in Coca-Cola Co. (KO), International Business Machines (IBM), McDonald’s Corp. (MCD) and Wal-Mart Stores, Inc. (WMT). Holding these stocks in 2011 resulted in a return of 16.4%, as shown in Table 1. A graphical representation of the efficient frontier can be seen in Figure 3.

This process is continued in order to find the efficient portfolio for years 2006 through 2010. For example, the efficient portfolio for 2010 is calculated using the historical return, standard deviation and correlation data from 2006–2009, the efficient portfolio for 2009 is calculated using the data from 2005–2008, and so forth. Using this method, the returns for the companies making up the efficient portfolio for the past six years are shown in Table 1. Compared to the DJIA, the selections chosen using the Portfolio Optimization software resulted in higher returns and lower annual standard deviation. Furthermore, the results are based on an annual rebalance holding only five to six stocks, which is very little work for the individual investor.

In our second backtest, we used the program to attempt to “optimize” a holding of a mutual fund—the Vanguard Mid-Cap Index (VMCIX). The results are equally impressive. We used the data supplied by Morningstar.com to find a sample of the fund. Morningstar.com provides the top 25 holdings for mutual funds. Out of these holdings, we used the stocks that have price data going back to 2002 as a representation of the entire fund—a total of 16 stocks.

Figure 4 shows the 16 stocks used as a representation of VMCIX. As with the DJIA backtest, we used the Portfolio Optimization program to find the efficient portfolio for 2011 based on 2007–2010 returns, standard deviation and correlation. The efficient portfolio with the highest return was then used to calculate the return of the portfolio for 2011. The same methodology was used for each prior year (2006–2009 data was used to calculate the efficient portfolio for 2010, 2005–2008 data was used for 2009, etc.). The efficient portfolios for 2011 are shown in Figure 5 and the results of the backtest are shown in Table 1. As you can see, using the methodology, the returns generated holding the stocks selected by the Portfolio Optimization program are significantly higher than the fund’s return. In this case, the standard deviation of the portfolio is higher as well. Only five or six stocks are being held at one time, compared to 40+ for a mutual fund. Each year the efficient portfolio with the highest return was selected; therefore, it had the highest level of volatility. Selecting portfolios with lower return and volatility should alleviate the high standard deviation recorded by the portfolio.

To test this theory, we performed one final backtest using the Portfolio Optimization program, tweaking one small detail. Instead of using the efficient portfolio with the highest return, we used the efficient portfolio the second-highest return. When the data was scanned, there was a significant jump in volatility from the efficient portfolio with the second-highest return to the efficient portfolio with the highest return. The results are reported in Table 1.

Surprisingly, the average annual return generated by the second-highest selection is actually much higher than that of the highest-returning efficient portfolio. On top of that, the standard deviation is now lower than the VMCIX mutual fund.

## How to Implement

Implementing MPT using the Portfolio Optimization program involves a few easy steps. When year-end data is available (usually a day or two after the last trading day of the year), select a portfolio of stocks for which you want to find the efficient frontier, whether it is a stock screen, mutual fund or an index. It is prudent to select this portfolio based on your personal risk-tolerance. If you are a conservative investor, it is probably not a good idea to select emerging markets or micro-cap mutual funds from which to build your portfolio. If you choose to use mutual funds, be sure to select ones that have performed well over the long run against other comparable funds.

After choosing a portfolio of stocks, create a sample file of the portfolio. The sample file should contain at least 20 representative stocks. For instance, if you select a mutual fund, use the top 20 or 25 holdings as a representative sample of the entire mutual fund. After preparing the efficient frontier of the sample file using the program, choose the efficient portfolio that is in line with your personal risk-preference and invest in those stocks in the given allocations.

## Conclusion

Using the Portfolio Optimization program in the manner described is entirely quantitative. Investors make no “qualitative” judgment as to the health or future profitability for a specific company. In addition, creating a portfolio in this manner assumes transactions annually with very few stocks. There will be times of volatility and the annual portfolio rebalance may be too infrequent for some investors. On the plus side, transaction fees and commissions will be negligible for this portfolio.

Building portfolios using the Portfolio Optimization program was not tested in a “real-world” portfolio over time, but the results from these three specific backtests show that the strategy is promising. However, there are issues that need to be addressed. As we all know, company risk cannot be adequately diversified away by investing in five or six stocks and it is not recommended that you hold so few for an entire portfolio. In addition, the efficient frontier generated by the program uses past returns and correlations as a basis for choosing stocks going forward. Over the test period, it is easy to see that several stocks dominated the results. Choosing these high-performing stocks is difficult going forward and stocks that have performed well over the past several years may not perform well in future periods. Investment theory always looks good in theory. The difficulty lies in its implementation and whether the theory is predictive of future results.

One suggestion is to use this program and strategy for a portion of your investment holdings. Separately, investors can utilize this investment strategy with several portfolios. While it goes against MPT theory, using a separate “efficient portfolio” for each market sector or industry allows investors to build a well-diversified total market portfolio based on underlying fundamentals of modern portfolio theory.

H Bendetfrom NY posted over 3 years ago:James Slackfrom TX posted over 3 years ago:Gale Hamiltonfrom VT posted over 3 years ago:David Volkmanfrom NE posted over 3 years ago:J Sidingerfrom CO posted over 3 years ago:GW Bushfrom SC posted over 3 years ago:Michael Handyfrom OR posted over 2 years ago:Joe Lanfrom IL posted over 2 years ago:R Stevensfrom TX posted over 2 years ago: