Constructs the Efficient Fonrtier over a given range of the expected return.
n X n
, where n
is the number of assets from which the (optimal) portfolio can be constructed.1E-1
and 1E-6
. Note as with most numerical procedures the higher the precision the more computationally intensive the algorithm will become. The precision must be set to be a positive number less than 1; where the smaller the number the greater the precision by also the longer the evaluation of the Efficient Frontier will take.Overview
For each interpolation point an optimization algorithm is called in order to construct the optimal portfolio which has the least risk for a given expected return. The optimization algorithm can be computational intensive particularly when linear constraints are required and the portfolios can be constructed from a large number of assets. These interpolation points will then be interpolated in order to construct the Efficient Frontier over the range of expected returns considered. Hence, the computational demands will increase in relation to the number of interpolation points used. However, the more interpolation points used the more precisely the Efficient Frnotier can be constructed.
Constraining the Weights of the Assets of the Efficient Frontier's Portfolios
With our implementation we offer the possibility to constrain the weights of the assets from which the portfolios on the Efficient Frontier are constructed. The constraints on the weights on the portfolios are set by using either:
Below we illustrate how upper and lower bound constraints can be set on the assets weights using SetConstraints. For details concerning how an example using the alternative type of constraints the setting of linear equality and inequality constraints we refer the reader to the documentation accompanying SetAssetWeightsInequalityConstraints and SetAssetWeightsEqualityConstraints.
Assume an investor requires a portfolio selected from n
assets which has the
lowest risk for a given expected return but also has the requirement that all of the assets
must have a weight between 0.05
and 0.1
(i.e. between 5 and 10
percent). In this instance we would need to set the constraints on the assets to be:
lowerBounds = {0.05, 0.05, 0.05,...., 0.05}
upperBounds = {0.1, 0.1, 0.1, ......, 0.1}
where each of the arrays above has n
terms, using the method SetConstraints.
Remark: If the constraints are not set then they will take there default values which are
0
and 1
, for the lower bound respectively upper bound of each asset. That
is, each asset can have a weighting between 0 percent and 100 percent of the entire portfolio.
Selecting the range of the Expected Returns
We allow the user to restrict the range of expected returns over which the Efficient Frontier is evaluated since:
The range over which the Efficient Frontier is constructed in specified by providing as parameters the minimum and maximum of the expected return. Once the range is set, the portfolios on the Efficient Frontier are evaluated at equally dispersed intervals.
Evaluating the Range of the expected returns on the Efficient Frontier
As mentioned before the points on the (constrained) Efficient Frontier correspond to portfolios which
can be constructed from a given set of available assets where the sum of the weightings of the assets
sum to 1
. Therefore, (since the expected return is additive) the range of expected returns
will lie within the range of expected returns of the assets. Below we consider the exact range of the
value of the expected return for which the (constrained) Efficient Frontier exists.
Within this class we offer two methods MinFrontierReturn and MaxFrontierReturn which evaluate the upper bounds and lower bounds respectively of the range of the expected returns over which the Efficient Frontier exists for the given set of asset considered. If you set the range of expected returns considered to lie outside this range then an exception will be thrown.
Remarks on the Range of expected returns of the Unconstrained Efficient Frontier
If the weights of the assets are not constrained then the range of expected returns (i.e. all possible optimal portfolios) will lie in the continuous range given by:
=
the expected return of the asset with the lowest expected
return.
=
the expected return of the asset with the highest expected
return.
Remarks on the Range of expected returns of the Constrained Efficient Frontier
In the case where the weights of the assets from which the portfolios on the Efficient Frontier
can be constructed are constrained. The range of the expected return for which the constrained Efficient
Frontier may exist may not cover the full range of values of expected returns of the assets. The reason
being that the asset with the highest (resp. lowest) expected return may have an upper bound in which
case you are not able to construct the portfolio solely of this asset because at all time the weights
of the assets must sum to 1
.
The Range of the Expected Returns and Performance considerations
The way in which you set the range of expected returns considered will depend on the nature of the
problem you are considering. If you are considering a portfolio optimization problem in which the
portfolio is constructed from a relatively few number of assets (for example, less than 30
) then each
evaluation of another interpolation points will be very rapid and hence as long as the total number of
interpolation points which you wish to use over the total range is reasonable (i.e. less than 30
)
then the evaluation of the Efficient Frontier will take a few seconds. However, if you are considering
a larger number of assets (for example, more than 80
) then you may wish to considered only a proportion
of the Efficient Frontier (i.e. a smaller range of expected values) so that you will need to evaluate of
fewer number of interpolation points in order to construct the Efficient Frontier over that range to the
desired level of accuracy.
Remark: The computational time increase in proportion to the number interpolation points returned.
Number of Interpolation Points used to represent the Efficient Frontier
The Efficient Frontier is persisted (i.e. stored) as the collection of points around which it is interpolated. Therefore, the more interpolation points used within this method the more accurately it will be stored. However, within the construction of the Efficient Frontier the main optimization algorithm is called when each interpolation point is evaluated. Therefore, in terms of performance the computational time required for the construction of the Efficient Frontier will increase in proportion to the number of points used.
As a rule of thumb I would suggest that the number of interpolation points used is chosen within the
range [5,20]
. The rationale being that if less than five interpolation points are used then unreasonable
amounts of qualitative information concerning the Efficient Frontier will be lost. Also, if more than
twenty interpolation points are used then (generally speaking) no significant improvement in the accuracy
will result.
Effect of this method on the CapitalMarket class
All methods within the CapitalMarket class are either directly or indirectly effected by the evaluation of the Efficient Frontier. The reason for this is that the returned values by all methods depend on the Efficient Frontier, moreover the Market Portfolio and then the optimal portfolios accordance to the CAMP require that the Efficient Frontier is constructed.
The methods within this class which are directly effected (in fact, require) the construction and setting of the private fields which make up the Efficient Frontier are:
The other methods (and the CAPM in general) of this class rely on the Market Portfolio and therefore are also effected (however indirectly) by the construction of the Efficient Frontier.
You are required to provide to this method the covariance matrix and the expected returns of the collection of asset from which the portfolio's on the Efficient Frontier are constructed. We provide within the AssetParameters class procedures which assist in there evaluation of the covariance matrix and the expected returns via either an historical or scenario approach.
If you happen to evaluate a set of points (i.e. portfolios) on the Efficient Frontier and after displaying the results found using GetEfficientFrontierExpectedReturns and GetEfficientFrontierPortfolioRisks, the Efficient Frontier is not a smooth convex curve then we advise that the first course of action is to increase the precision used and repeat of the evaluation of the Efficient Frontier.
Exception Type | Condition |
---|---|
NoSolutionException | Thrown if this method attempts to construct a portfolio on the Efficient Frontier for an expected return for which there does not exist such a portfolio. In such instances the range of expected returns over which the Efficient Frontier is constructed should be reduced. Please see the remarks above on the selection of a suitable range of expected returns. |
CapitalMarket Class | WebCab.Libraries.Finance.Portfolio Namespace | CapitalMarket.CalculateEfficientFrontier Overload List