Evaluates the set of (possibly constrained) portfolios on the Efficient Frontier which are optimal with respect to the investors utility function.
The optimal portfolio(s) on the Efficient Frontier with respect to the Investors Utility function. If no optimal portfolio was found (i.e. no portfolio was selected from the Efficient Frontier by the investors utility function intersecting) then this method will return an empty array of dimension 2.
Utility Function
Recall that the utility function represents the investors preferred risk-return profile which is in accordance with the investors expressed preferences. The utility function must be set before called this methods by using one of the methods SetUtilityFunctionPoly, or SetUtilityFunctionInterp.
Returned set of Portfolios
This method returns a array of dimension 2, which represents these optimal portfolios
which where selected from the Efficient Frontier by the investors utility function.
The array of dimension 2, has the following form: the first term in the array of dimension
2 (i.e. result[0]
) is an array which contains the weights of the assets of the
first optimal portfolio selected from the Efficient Frontier, the second term in the array
of dimension 2 (i.e. result[1]
) is an array which contains the weights of the
assets of the second optimal portfolio and so on. The number of optimal portfolios found
will correspond to the length of the 2 dimensional array returned.
Methods which should be called Prior to this method
Prior to calling this method you must calculate the Efficient Frontier with CalculateEfficientFrontier and set the investors utility function using one of SetUtilityFunctionPoly or SetUtilityFunctionInterp.
Remark: Care should be taken to ensure that the range over which the Efficient Frontier is evaluated and the investors utility function are given covers the range of the expected returns over which the optimal portfolios are sort.
Setting Constraints on Asset Weights
By default the weights of the assets can take any values within the range [0,1]
,
however you are able to set upper and lower constraints on each on the weights by called
the method SetConstraints before the Efficient Frontier is constructed using
CalculateEfficientFrontier.
When the Investors Utility Function does not cross the Efficient Frontier
This methods find the set of optimal portfolio by finding the points at which the Efficient Frontier and the investor's utility function cross. If over the considered range of the expected returns the two curves do not cross then either the investors utility function is above or below the Efficient Frontier over the range of expected returns considered. In these two cases one of the following two exceptions will be thrown:
In the case when the AboveException is thrown the follow two modifications of the problem are equally justified:
Suitable values of the Expected Return Parameter
For a given set of assets with possibly constrained asset weights there will correspond a range of values of the expected return over which the (constrained) Efficient Frontier exists. Naturally the range of the expected return about which the optimal portfolios are sort since these optimal portfolios lie on the Efficient Frontier must lie within this range in which the Efficient Frontier exists. You are able to evaluate this continuous range of expected returns for which the Efficient Frontier exists by calling the methods MinFrontierReturn and MaxFrontierReturn, in order to evaluate the upper and lower bounds respectively. If you are considering the constrained case then before evaluating the range of the expected returns for which the Efficient Frontier exists you should have set the constraints on the asset weights by scaling SetConstraints.
Exception Type | Condition |
---|---|
EfficientFrontierNotCalculatedException | Thrown if the Efficient Frontier is not been constructed. That is, the method CalculateEfficientFrontier has not been called. In order remedy the situation please evaluated the Efficient Frontier using the method CalculateEfficientFrontier over a range of expected returns equal to or larger than the range considered her over which the optimal portfolio is sort. Once this process is complete you may re-apply this method. |
UtilityFunctionNotInitializedException | Thrown if Investors Utility function is not set. In order to set the Investors Utility function you will need to call one of the methods: SetUtilityFunctionInterp or SetUtilityFunctionPoly. Note that the range of the expected returns over which the Investors Utility function is given should be equal to or larger than the range of expected return used here over which the optimal portfolio is sort. Once the Investors Utility function has been set of a suitable range you will be able to re-apply this method. |
AboveException | Thrown if the investors utility function is above the Efficient Frontier for all values of the expected return (see above remarks for further explanation). |
BelowException | Thrown if the investors utility function is below the Efficient Frontier for all values of the expected return (see above remarks for further explanation). |
PortfolioException | Thrown if the number of optimal portfolios found is more than 100. In this instance the investors utility function is probably very close if not identical to the Efficient Frontier over at least a section of the range of the expected returns considered. To address this issue to utility function should be refined so that it is more clearly distinguishable from the Efficient Frontier. Since it is very likely that modulo interpolation errors the utility function is identical to the Efficient Frontier over a section of the expected returns considered which causes the method at present in principal to fail. Anyway, once the Investors Utility function has been refined you will be able to re-apply this method. |
Markowitz Class | WebCab.Libraries.Finance.Portfolio Namespace | Markowitz.OptimalPortfolio Overload List