WebCab Portfolio for COM v5.0 Demo

EasyOptimal.MarkowitzUtility Method 

Finds the weights of the (risky) assets of the portfolio(s) which are selected in accordance with the investors utility functions with the highest expected return.

public double[] MarkowitzUtility(
   double[] utilityExpectedReturns,
   double[] utilityRisks,
   double[] lowerBounds,
   double[] upperBounds,
   double[,] historicalReturns,
   int interpolationPoints,
   double precision
);

Parameters

utilityExpectedReturns
An array of doubles where to i-th term is the value of the expected return at the i-th interpolation points around which the Investors Utility function is given. The expected returns may be given in absolite (i.e. market price) or relative (i.e. percentage) terms. However it is important that the units used here for the expected returns are in accordance with the units used within other methods calls for example calls to calculateEfficientFronrtier, which a given client application.
utilityRisks
An array of doubles where the i-th term is the value of the total risk at the i-th interpolation point around which the Investors Utility function is given.
lowerBounds
An array where the i-th term corresponds to the lower bound on the weights (i.e. lies in the closed interval [0,1]) of the i-th asset from the collection of assets from which the portfolios can be constructed. Note that the length of this array must equal the number of assets from which the portfolios can be constructed.
upperBounds
An array where the i-th term corresponds to the upper bound on the weights (i.e. lies in the closed interval [0,1]) of the i-th asset from the collection of assets from which the portfolios can be constructed. Note that the length of this array must equal the number of assets from which the portfolios can be constructed.
historicalReturns
This array of dimension two is the historical returns in absolute (i.e. market price) or relative (i.e. percentage change) terms of the assets from which the optimal portfolio can be constructed. The n-th element of the 2-dimensional array is an array, where the k-th term on this array is the historical return of the n-th assets in the k-th period before the present periods return.
interpolationPoints
The number of tabulation point which are used to represent the Efficient Frontier.
precision
This parameters allow the level of the precision required to be set, where the small the parameters the (generally) higher the precision.

Remarks

Utility Function

The utility function is generated by interpolating a tabulated function which is provided by two array utilityExpectedReturns and utilityRisk. The array utilityRisk, corresponds to an ordered sequence of the various total risk levels of the portfolio and is denote by x[0..,n - 1] (with x[0] < x[1] < ... < x[n - 1]). The first term of the array utilityExpectedReturns corresponds to the expected return for the total risk x[0]. The second term of the second array corresponds to the expected return for the total risk x[1]. The third term is defined in a similar fashion and so on. This provides n coordinate points or equivalently a tabulated function which we can interpolate in order to provide a unique utility function which expresses the investors risk-reward profile.

For further details concerning the nature of the utility function and how it can be discovered from the investors risk/reward preferences we refer the reader to SetUtilityFunctionInterp, or the accompanying PDF documentation.

Asset Weight Constraints

The parameters lowerBounds, and upperBounds allow constraints to be placed on the weights of the assets from which the optimal portfolio can be constructed. For example, if we set:

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 the same number of terms of the number of assets. Then the weights of each of the assets from which the optimal portfolio is constructed must lie within the interval [0.1, 0.5]. Note that the sum of the weights of all portfolio (included the optimal portfolio) musy sum to 1.

If you not wish to place explicit constraints of the weights of the assets then you should set:

lowerBounds = {0, 0, 0,...., 0}
upperBounds = {1, 1, 1, ..., 1}

where each of the arrays above has the same number of terms of the number of assets.

For further details concerning the use and purpose of the asset weights constraints we refer the reader to SetConstraints, or the accompanying PDF documentation.

Expected Returns

The expected returns of the assets from which the optimal portfolio can be constructed will need to be supplied in absolute (i.e. expected final market price) or relative terms (i.e. expected returns as a percentage). Which ever convension is used for the expected returns the weights of the optimal portfolio returned will be unchanged.

Remark: The reason why the weights of the assets of the optimal portfolio are invariant to the units used for the expected returns is that the weights are unit-less and hence during the computation of the assets weights the units used for the expected returns will (in a sense) be `canceled out'.

The nature of the utility Function

The investors risk-reward utility function is the locus of points at which the investor gets a particular level of satisfaction or utility from a combination of expected return and risk. The k-th term of the each of this methods parameters represent such a point within the risk reward space. By providing a set of such pairs we are able to represent the risk - reward profile of the investor.

For further details including examples of the investors utility function we refer the reder to SetUtilityFunctionInterp, and the accompanying PDF documentation.

See Also

EasyOptimal Class | WebCab.COM.Finance.Portfolio Namespace