Calculates the interpolation points used in order to construct the Efficient Frontier with a given range of expected returns for a collection of assets from which the optimal portfolio can be constructed.
n X n
, where n
is the number of assets from which the (optimal) portfolio can be constructed.1E-8
and 1E-12
. 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 a number of the magnitude 1E-12
will result in high precision and a number of the magnitude 1E-8
will result in rapid execution and acceptable precision for most purposes. Further details are provided within the Programmer's guide chapter of the PDF documentation.Overview
A constrained optimization algorithm is used each time to find the portfolios which have the least risk for a given set of expected returns. In fact, an optimization algorithm which is computational intensive will need to be called for each evaluation of an interpolation point. These interpolation points will then be interpolated in order to the construct the Efficient Frontier over the range of expected returns considered.
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 the method SetConstraints. We illustrate the use constraints with the following example.
Say an investor requires a portfolio selected from n
asset 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, they will remain as weights in the usual sense.
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:
In short, the minimum and maximum of the expected return give a range over which the (possibly constrained) Efficient Frontier is evaluated. Once the range is set, the interpolation points (i.e. the set of expected returns) is used to equally divide up the range and the Efficient Frontier's interpolation points are evaluated (only) within this range. By excluding sections of the Efficient Frontier will allow more interpolation points to be evaluated within the range of expected returns of interest for a given computation effort.
Remark: For a given range the more interpolation points are evaluated the more accurately the Efficient Frontier will be represented which will result in to greater accuracy of the construction of the optimal portfolio.
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 the 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 returned 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 rational 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.
Methods which directly depend on this method
The result of this method is stored in one of this classes private fields. The setting of this private field (that is, the calling of this method) is required in order to use the following methods:
Remark: If any of these four methods are called without calculating the interpolation points first an exception will be thrown.
Evaluation of the Covariance matrix and Expected Returns
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 a historical or scenario approach.
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. |
Markowitz Class | WebCab.Libraries.Finance.Portfolio Namespace | Markowitz.CalculateEfficientFrontier Overload List