Optimal Portfolio Allocation and Economic Utility
Steven R. Dunbar and Shengjie Guo
Department of Mathematics
University of Nebraska-Lincoln
Lincoln, NE 68588, USA
http://www.math.unl.edu/~sdunbar
Application Information
Mathematics Content
Visualization and mathematical analysis of the risk and rewards for portfolios of two and three risky securities, visualization of the efficient frontier of the portfolios, and selection of an optimal portfolio using economic utility.
Keywords
Securities, portfolios, feasible set, efficient frontier, utility, random variable, normal distribution, jointly normally distributed random variables, expected value, mean, variance, covariance, correlation, parametric curves, Markowitz mean-variance analysis, utility.
Objectives
Show how the risk and reward set of a portfolio of two or three securities whose returns are jointly normally distributed is calculated from standard theorems about the mean and variance of linear combinations of the random variables. Use ideas from multivariable calculus to show how the feasible set is derived. Visualize the efficient frontier of the risk and reward set. Visualize the economic utility of the portfolio. Show how the concept of economic utility selects a unique optimal portfolio on the efficient frontier.
Audience
Instructors and students in classes on mathematical finance, economics, finance, statistics, actuarial science and multivariable calculus.
Time
Approximately 30 minutes.
Prerequisite
Understanding of random variables, normally distributed random variables, jointly normally distributed random variables including correlation and covariance, parametric curves, and multivariable calculus in general.
References
Any good book on mathematical statistics using multivariable calculus, for instance:
Introduction to Mathematical Statistics, (6th edition) by R. Hogg, A. Craig, J. McKean, Prentice Hall, 2005, ISBN-13: 9780130085078.
Any good book on finance, especially those with a mathematical slant. An easy introduction would be:
Investment Science, D. Luenberger, Oxford University Press, USA, 1997, ISBN-13: 978-0195108095.
An advanced view would be:
Mean-Variance Analysis in Portfolio Choice and Capital Markets, Harry M. Markowitz, G. Peter Todd, William F. Sharpe, Wiley, 2000, ISBN-13: 978-1883249755.
Some definitions of economic and financial terms are adapted from http://www.investorwords.com.
Background Information and General Theory on Portfolios of Securities
Returns and Portfolios
Any item of economic value owned by a business or an individual is an asset. Examples of such assets are cash, common stocks, bonds, real estate, certificates of deposit, options and derivatives, and in fact anything that can generate a present or future value. In this worksheet, for simplicity our primary interest is in investments in common stocks. We begin with some basic concepts concerning assets.
If
is the value of an asset at the end of an initial period (for instance, at the close of a stock trading day) and
is the value at the end of the next period, then the return is
rate of return on an asset is defined as
Now consider an investor holding
different assets. Such a set of several different assets forms what we call a portfolio. One common example of a portfolio is a mutual fund, where stocks are mixed in some particular way to achieve some particular goal, for instance to maximize investors' return while reducing risk.
Now suppose an investor has purchased
assets at time zero with a total of
amount of money. The amount invested in stock
is
where
. The weight of each asset
in the portfolio is then
where

where
so
Suppose after one period of time, the value of the whole portfolio becomes
, and the value of each asset becomes
. Therefore, if we let
denote the rate of return of the entire portfolio, we can obtain the following
= 
=
=
Thus, we see that the weighted sum of the individual asset returns is the portfolio return.
Modeling Returns and Rates of Returns as Random Variables
Most of the time when people invest in assets, especially in stocks, the return on assets is uncertain. This means that there exists a range of possible outcomes for the return, with some kind of relative frequency or distribution. The return
, defined in this way before its value is actually known, is called a
random variable
. In order to describe and understand the behavior of stock returns, we assume that the return on a stock is a
normal
random variable. The following are four reasons for this assumption.
- First of all, by observing historical data on stock returns, we notice that the returns tend to form a bell-shaped normal distribution.
Example: Returns on Pepsi
Consider the following set of returns on Pepsi, from September 16, 2003 to September 13, 2006. (Specifically, the returns are daily close-to-close returns on the Pepsi Bottling Group, symbol NYSE:PBG. The first return is the close-to-close difference from September 16, 2003 to September 15, 2003, and the last return is the close-to-close difference from September 13, 2006 to September 12, 2006.
Pepsi Returns
 |
(2.1.1) |
 |
(2.1.2) |
Plot Histogram
However, the match is not as close as one might hope. By making a chi-squared goodness-of-fit test against the normal distribution, we see that the hypothesis that the sample of returns was drawn from a normal distribution with corresponding mean and standard deviation is not supported.
![`assign`(infolevel[Statistics], 1); -1; Statistics[ChiSquareSuitableModelTest](pepsi_returns, Normal(mean_pepsi_returns, stddev_pepsi_returns), bins = 14)](/view.aspx?SI=4860/175954/images/optimal_portfolios__35.gif)
![`assign`(infolevel[Statistics], 1); -1; Statistics[ChiSquareSuitableModelTest](pepsi_returns, Normal(mean_pepsi_returns, stddev_pepsi_returns), bins = 14)](/view.aspx?SI=4860/175954/images/optimal_portfolios__36.gif)
Chi-Square Test for Suitable Probability Model
----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Bins: 14 |
Distribution: ChiSquare(13)
Computed statistic: 45.7447
Computed pvalue: 1.57111e-05
Critical value: 22.36203243
Result: [Rejected]
There exists statistical evidence against the null hypothesis |

 |
(2.1.3) |
- The second reason is that a normal distribution can be completely defined by two numbers, the
expected value
and
variance
. Therefore, if returns are assumed to be normally distributed, these are the only two numbers an investor needs to consider. This simplifies analysis enormously.
- Third, normal distributions are easy to work with mathematically. Suppose
is
normally distributed
, its probability density function is defined as
for
In this formula,
is the expected value, or mean, of
,
is the variance, and
is known as the variance.
- Fourth, the normal random variable is most commonly accepted random variable for modeling security returns. . Some experts believe that there are other, better choices of random variable model for security returns, but the simplicity of the normal random variable outweighs those concerns for the purposes of this discussion.
- One more assumption we need to make is that when dealing with a number of stocks in a portfolio, the returns are jointly normally distributed. In other words, all the stock returns in a portfolio are jointly distributed normal random variables. There are two measures associated with the joint normal distribution between stock returns: the
covariance
and the
correlation coefficient
,
, . A positive
indicates a direct relationship between the two stocks, meaning that when the one of the two stocks goes up, the other one also goes up. A negative ρ, in contrast, indicates an inverse relationship, that is, when one of the returns goes up, the other one goes down. In addition, there exists a covariance, usually denoted
or
, defined by
. It is a well-known fact that the correlation coefficient
is always between
and 1.
Based on the assumptions made above, in 1952 Harry Markowitz developed a mathematical model which describes and quantifies the trade-off between risk and return in portfolio construction. This method is called Mean-Variance analysis.
Suppose that there are
assets in a portfolio with random rates of return
,
and that they have expected values
. Then the mean, or expected return of the entire portfolio can be expressed as a linear combination according to the weights of the individual stocks held in the portfolio.
The variance of a portfolio measures how much the portfolio return varies from its expected return. We denote the variance of the return of stock
by 
. The larger the variance, the more volatile the stock is.
We also need to be aware that stocks in the portfolio are related. We can measure this relationship numerically on pairs of stocks by
, the correlation coefficient. It is defined by
Mean-Variance Analysis of Portfolios
The practice of combining a few assets into one portfolio is referred to as diversification. Diversification is helpful in reducing risks and creating a more stable investment return for investors. Portfolios with only a few assets may be subject to a high degree of risk, represented by having a relatively large variance
Let us take a simple first look at how diversification can reduce our investment risk. We first look at a very simple portfolio where the assets are uncorrelated, that is, let
.
Assume for simplicity we have assets each with equal weight
. Let
denote the return for asset
, and assume
and
are the expected return and variance for all stocks in the portfolio. Then the overall expected return of this portfolio is
. The corresponding variance is
Therefore, as
gets larger, the variance of our simple portfolio return decreases while the mean remains the same. We have reduced risk while maintaining reward..
A more typical situation is when assets are correlated. Continue to assume
and
are the expected return and variance for all stocks in the portfolio. Suppose again for extreme simplicity each return pair has a correlation of
. Then
where
Our portfolio variance then becomes



As
gets larger, the first part of the result decreases very quickly. However, no matter how large
is, the total variance is not going to go away as in the first case where the correlation coefficient is zero. In fact, this result indicates that diversification is able to diversify away firm-specific risks but it cannot eliminate the market risk . Market risk is the risk common to an entire class of assets. For example, the value of investments may decline over a given time period simply because of economic changes or other events that impact large portions of the market. Here the market risk is represented by the constant correlation between individual assets
Efficient Frontier
Suppose that we have a set of
securities. We can weight the proportions of the securities in any way up to the total wealth we have available to invest into a portfolio. Each portfolio will have a return which is the weighted sum of the returns and also a risk, which is the combination of the risks as above, based on the variances and covariances. Then the portfolio is characterized by it risk and returns. Let be the set of all possible mean-variance portfolio profiles, also called the feasible set. That is, no matter what combination of stocks an investor decides on, one can find the corresponding risk-return pair in this feasible set. The feasible set has two important properties.
- First of all, when there are just two assets in a portfolio, the feasible set of linear combinations of the two assets subject to the total wealth being a constant forms a curve, as demonstrated below. When there are three or more assets in a portfolio, the feasible set becomes a solid two-dimensional region (See below). The reason is that the set of linear combinations of asset 1 and 2 subject to the total wealth forms a curve between them, as well as with asset 2 and 3, and 1 and 3. Connecting all combinations of points on all three curves gives us the solid two-dimensional region.
- When two portfolios have the same mean, the one with lower variance is said to dominate the one with the higher variance. Similarly, when two portfolios have the same variance, the one with higher mean is said to dominate the
one with the lower mean. We assume that all investors are rational, that is, given a choice they will always invest in a dominating portfolio.
Now the efficient frontier of set is defined to be the set of all mean-variance pairs in which are not dominated by any other portfolios in the feasible set. Given a fixed variance or risk, the corresponding portfolio on the efficient frontier always provides the highest return. Or, given a fixed mean or reward, the corresponding portfolio on the efficient frontier always provides the lowest risk. This sounds very reasonable even intuitively because the goal of all rational investors is to maximize their return while taking the lowest possible amount of risk. We call a point on the efficient frontier a mean-variance efficient point.
Utility
In many investments, the consequences correspond to the investor receiving a certain amount of money. The
utility function
simultaneously measures investors' satisfaction of receiving that amount of money and the risk-aversion associated with that amount. Generally speaking, the utility function is a increasing, concave down function.
Some commonly used utility functions are:
- Log utility function:

- Linear utility function:

- Exponential utility function

- Quadratic utility function:

The Quadratic utility function is really meaningful only in the range
Quadratic Utility
Suppose that a portfolio has a random wealth value of y. Using the
expected utility criterion
, on the quadratic utility function we can get:
Many people believe that a rational investor's goal is to maximize his expected utility of wealth. The optimal portfolio maximizes this value with respect to all mean-variance pairs of the random wealth variable
. Therefore, the relationship between the efficient frontier and the utility function becomes an interesting question to look at.
Because we need to minimize the variance and to maximize the expected value in the following expression:
the optimal utility corresponds with the definition of the efficient frontier. Therefore, the optimal utility must correspond to a mean-variance efficient point.
Since
is concave down, by
Jensen's inequality
,
in words, the utility of expected wealth is greater than the expected utility.
Optimal Exponential Utility
Using the expected utility criterion on the exponential utility function we can get:
To achieve maximum expected utility, we need to minimize the variance and to maximize the expected value. Again, the optimal utility must correspond to a mean-variance efficient point.
We see that the expected utility approach is more specific than a traditional mean-variance approach since it specifies a unique optimal point out of the entire efficient frontier.
Efficient Frontier and Optimal Utility for a Portfolio of Two Securities
Consider securities in Pepsi and Wal-Mart. Specifically,
is the average return and
is the variance on close-to-close returns on the Pepsi Bottling Group, symbol NYSE:PBG.from June 14, 2006 to September 13, 2006.
is the average return and
is the variance on close-to-close returns on Wal-Mart Stores, symbol NYSE:WMT.from June 14, 2006 to September 13, 2006.
is the correlation between the two sets of returns from June 14, 2006 to September 13, 2006.
Pepsi and Walmart Returns
); 1; `assign`(variance_pepsi_returns, Statistics[Variance](pepsi_returns))](/view.aspx?SI=4860/175954/images/optimal_portfolios__107.gif)
 |
 |
(3.1) |
); 1; `assign`(variance_walmart_returns, Statistics[Variance](walmart_returns))](/view.aspx?SI=4860/175954/images/optimal_portfolios__111.gif)
 |
 |
(3.2) |
 |
(3.3) |
Now we take a combination of these two assets to make a simple two-stock portfolio. We will let a fraction or weight α of our total wealth purchase shares of Pepsi, and the remaining fraction
of our wealth purchase shares of Wal-Mart. Our wealth initially is
and after one period the expected value of the wealth is
In fact, we can even allow
to be negative or greater than 1, which is called short-selling. Short-selling is borrowing a security from a broker and selling it, with the understanding that it must later be bought back (hopefully at a lower price) and returned to the broker. Mathematically, this amounts to owning a negative amount of the security.


The goal is to plot the reward versus the risk to visualize the results of owning a portfolio of these two securities. Since both risk and reward are functions of α, this is easily done as a parametric plot in α. From the parametric form of risk as quadratic in α and reward as linear in α, it is clear that the parametric curve will be a parabola. To plot the curve effectively, it helps to know the where the minimum in the risk-reward space occurs.
One way to find the minimum is to solve the parametric expression for the parameter as a function of risk, substitute that expression in the expression for risk, differentiate and set the derivative equal to 0, and solve, and then back-solve to obtain the parameter where this occurs:
Solve for alpha at min
As common in finance and economics, we plot the feasible set of risk-reward points on Cartesian axes with the risk on the horizontal axis, and the reward on the vertical axis. Note that the axes are scaled in order to make the features of the feasible set visible. The feasible set is the curve illustrated below. The efficient frontier is the thicker line with higher reward. Looking at the portfolio return and variance, we see that if an investor seeks low variances, the investor will sacrifice return.
Plot
Optimal Quadratic Utility
The coefficients of the quadratic utility function below are chosen to illustrate the maximization of quadratic utility at a point on the efficient frontier.
Choose coefficients
 |
(3.1.1) |
![`assign`(expected_utility_star, subs(alpha = alpha_star, [sigma_squared, mu, expected_utility])); -1; `assign`(risk_reward_star, subs(alpha = alpha_star, [sigma_squared, mu, 0])); -1](/view.aspx?SI=4860/175954/images/optimal_portfolios__146.gif)
Plots
This is a parametric plot of expected utility of the portfolio, and the risk and reward in terms of the parameter α. The efficient frontier is the thicker line, and the expected utility on the efficient frontier is also plotted with a thicker line. The red box contains the point where the expected utility is maximized. The blue box contains the risk-reward point where the maximum expected utility is contained. The light gray spacecurve is the utility of expected wealth to illustrate that it is always greater than the expected utility.
Optimal Exponential Utility


Choose coefficients
 |
(3.2.1) |
![`assign`(alpha_star, solve(diff(expected_utility, alpha) = 0, alpha)); -1; `assign`(expected_utility_star, subs(alpha = alpha_star, [sigma_squared, mu, expected_utility])); -1; `assign`(risk_reward_st...](/view.aspx?SI=4860/175954/images/optimal_portfolios__159.gif)
![`assign`(alpha_star, solve(diff(expected_utility, alpha) = 0, alpha)); -1; `assign`(expected_utility_star, subs(alpha = alpha_star, [sigma_squared, mu, expected_utility])); -1; `assign`(risk_reward_st...](/view.aspx?SI=4860/175954/images/optimal_portfolios__160.gif)
Plots

Case of Three Securities
Consider securities in Pepsi, Wal-Mart and Honda. Specifically,
is the average return and
is the variance on close-to-close returns on the Pepsi Bottling Group, symbol NYSE:PBG.from June 14, 2006 to September 13, 2006.
is the average return and
is the variance on close-to-close returns on Wal-Mart Stores, symbol NYSE:WMT.from June 14, 2006 to September 13, 2006.
is the average return and
is the variance on close-to-close returns on Honda, symbol NYSE: HMC.from June 14, 2006 to September 13, 2006.
is the correlation between Pepsi returns and Wal-Mart returns from June 14, 2006 to September 13, 2006.
is the correlation between Pepsi returns and Honda returns from June 14, 2006 to September 13, 2006.
is the correlation between Wal-Mart returns and Honda returns from June 14, 2006 to September 13, 2006.
Example: Returns on Wal-Mart and Honda
Honda Returns
); 1; `assign`(variance_honda_returns, Statistics[Variance](honda_returns))](/view.aspx?SI=4860/175954/images/optimal_portfolios__175.gif)
 |
 |
(4.1.1) |
); 1; `assign`(correl_pepsi_honda, Statistics[Correlation](pepsi_returns, honda_returns))](/view.aspx?SI=4860/175954/images/optimal_portfolios__179.gif)
 |
 |
(4.1.2) |








Now we take a combination of these assets to make a three-stock portfolio. We will let a fraction or weight α of our total wealth purchase shares of Pepsi, a fraction β of our total wealth purchase shares of Wal-Mart and the remaining fraction
of our wealth purchase shares of Honda. Our wealth initially is
and after one period the expected value of the wealth is
In fact, we can even allow
to be negative or greater than 1, which amounts to short-selling one or another of the securities. Short-selling is borrowing a security from a broker and selling it, with the understanding that it must later be bought back (hopefully at a lower price) and returned to the broker. Mathematically, this amounts to owning a negative amount of the security.
First we look at combinations of just two of the three securities alone, setting the proportion devoted to the third to be zero. This gives a set of three two-stock portfolio curves.
Portfolio Curves
Next we take a combination of all three securities, again allowing short selling. For a given return, we find the minimum risk in this combination. The minimum risk for given reward will be on the efficient frontier. We plot the efficient frontier, which will be be a parabola. All feasible risk-reward pairs using the three securities will be on the interior of this parabolic region defined by the efficient frontier. In particular the three curves of risk and reward defined by creating portfolios which omit one of the securities will lie in the feasible region. All of this is in the diagram below.
Efficient Frontier
Some comments are in order about this graph. The feasible set is the region inside the black curve. The blue curve is the set of feasible points using only Pepsi and Wal-Mart, but no Honda shares. The red curve is the set of feasible points using only Wal-Mart and Honda, but no Pepsi. The green curve is the set of feasible points using only Pepsi and Honda, but no Wal-Mart shares. The feasible set using all three securities is slightly larger than any of these curves, because it allows spreading the risk and reward among all three securities. Thus the black curve is slightly outside the green curve, although it is close for this particular set of returns and correlations. The heavy black curve is the efficient frontier. Close inspection shows that the heavy black curve, the efficient frontier, intersects the vertex of the blue curve and the green curve, indicating special combinations of just two of the three securities can be mean-variance efficient pairs.
Optimal Quadratic Utility
The coefficients of the quadratic utility function below are chosen to illustrate the maximization of quadratic utility at a point on the efficient frontier.

Coefficients
Plot
This is a parametric plot of expected utility of the portfolio, and the risk and reward in terms of the parameters α. and β. The efficient frontier is the thicker line, and the expected utility on the efficient frontier is also plotted with a thicker line. The red box contains the point where the expected quadratic utility is maximized. The blue box contains the risk-reward point, i. e. the mean-variance efficient point, where the maximum expected quadratic utility is attained.
Optimal Exponential Utility
Plot Expected Exponential Util



This is a parametric plot of expected exponential utility of the portfolio, and the risk and reward in terms of the parameters α and β. The efficient frontier is the thicker line, and the expected exponential utility on the efficient frontier is also plotted with a thicker line. The red box contains the point where the expected utility is maximized. The blue box contains the risk-reward point where the maximum expected utility is attained.
Legal Notice: The copyright for this application is owned by the authors. Neither Maplesoft nor the authors are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact the authors for permission if you wish to use this application in for-profit activities.