WebCab Portfolio Web Services for .NET v5.0 Demo

Markowitz Class

Applies the Markowitz Model to analyze the construction and qualitative nature of a portfolio's risk-return characteristics.

For a list of all members of this type, see Markowitz Members.

System.Object
   Markowitz

public class Markowitz

Remarks

In particular, we offer methods by which the continuum (in risk and expected return) of portfolios (known as the Efficient Frontier) which consists of the portfolios with the minimum risk for a given value of the expected return which can be constructed from a given collection of assets. Moreover, from this collection of Portfolios a unique optimal portfolio can be selected with respect to a given value of the expected return, risk (see SolveFrontier) or an investors risk - return profile given in terms of a utility function.

Overview of Functionality Offered

The Efficient Frontier is the collection of portfolios constructed from the given set of assets which have the lowest possible risk for a given level of the expected return. Note that the weights of the assets making up the portfolio may themselves be subject to constraints (for example, no one asset can have a weighting more than 20 percent or less the 5 percent).

Once the Efficient Frontier is known, we are able to select from this continuum a unique portfolio which represent the optimal portfolio with respect to an investors risk - return profile. The return profile of the investor may be given in three distinct ways and the correspond optimal portfolio can them be constructed. The by one of the following means:

  1. With respect to the investors risk - reward utility function, see SetUtilityFunctionInterp, or setUtilityFunctionInterp.
  2. Maximum Risk - the investor gives the (maximum) risk which they are prepared to accept and then the corresponding portfolio with the highest expected return for that given level of risk is constructed.
  3. Expected Return - the investor gives the expected return which they desire and the portfolio with the least risk for that given level of expected return is constructed.

Construction of the Efficient Frontier

The Efficient Frontier is constructed by the following steps:

  1. Evaluated the Efficient Frontier at a finite number of points. That is find the portfolio which exhibit the lowest risk for a given expected return.
  2. Interpolate about these points using cubic spline (or some other method) in order to construct the Efficient Frontier.

The points on the Efficient Frontier are portfolios constructed from the set of assets considered which exhibit the lowest risk for a given expected return. These portfolio are characterized by the following three characteristics:

  1. Expected Return - The expected return of the portfolio which is estimated from the historical returns of the assets within the portfolio.
  2. Total Risk - The total risk of the portfolio which is estimated from the historical returns of the assets within the portfolio.
  3. Asset Weights - the weights of the collection of assets from which the portfolio can be constructed.

It is important to point out that the Efficient Frontier in monotonically increasing function in risk and expected return. This means that if we are given a value of the expected return then there will correspond a unique portfolio on the Efficient Frontier with a given total risk. Conversely, if we are given the total risk of the portfolio then there will exist a unique portfolio on the Efficient Frontier with a corresponding value its expected return.

The three means of Selecting the Optimal Portfolio

  1. Of the above three means of describing the investors risk - reward profile which are all sufficient for determining a unique optimal portfolio, the first method involving the utility function allows to most detailed information concerning the investors risk - reward profile to be taken into account. However, in defining an investors utility function you will need to know detailing information concerning the investors preferences. For this reason you may wish to determine the optimal portfolio from either the maximum risk or the required expect return of the investor. In each of the three approaches you will need to discover as least aspects of the investors risk - reward profile, with regard to this matter we refer the reader to the PDF documentation for more details and practical suggestions as to how this can be achieved.
  2. The utility function may determine one, many or zero optimal portfolios. Please see the PDF documentation for further explanation.
  3. The Efficient Frontier is a monotonically increasing function for the expected return against the (total) risk of the portfolio on the Efficient Frontier. Therefore, if the optimal portfolio is selected by the maximum risk or expected return then a unique portfolio on the Efficient Frontier will be selected.

Effects of using Absolute of Relative Historical Values

Within the application of portfolio theory the following two quantities will need to use the corresponding units of measurement throughout the computation:

  1. Historical Values: This is the source data which is given in absolute or relative terms.
  2. Expected Returns: The expected return of the investment over the period considered which should be given and will be returned in the units used (i.e. absolute or relative) by the historical values.

The units used within these two quantities will effect the following objects:

  1. Utility Function: The values of the expected returns provided within the definition of the utility function should be in accordance with the units used to describe the historical values.
  2. Efficient Frontier: The values of the expected return which are either evaluated or given will be or will need to be in accordance with the units used within the historical values.

Therefore, whenever wishing to apply our portfolio component you should decide for the beginning whether you wish to use absolute or relative values for these three instances.

Assumptions underlying Markowitz Theory

Portfolio theory in the shape of Markowitz Theory makes the following assumptions concerning the investment market and investors behavior within those markets. We summaries these assumptions below:

  1. Investors seek to maximize the expected return of total wealth.
  2. All investors have the same expected single period investment horizon.
  3. All investors are risk-adverse, that is they will only accept greater risk if they are compensated with a higher expected return.
  4. Investors base their investment decisions on the expected return and risk (i.e. the standard deviation of an assets historical returns).
  5. All markets are perfectly efficient (e.g. no taxes and no transaction costs).

Types of functionality provided

With this XML Web service we offer Markowitz Theory related procedures which enable the evaluation of the Efficient Frontier and the optimal portfolio to be selected from the Efficient Frontier from knowledge of its expected return or the investors risk - reward utility function. That is, within this XML Web service we offer the following:

  1. Efficient Frontier Stateful Methods - The method CalculateEfficientFrontier first evaluates the Efficient Frontier and sets it within private fields of the class. Note that if applicable the constraints on the weights of the assets within the portfolios on the Efficient Frontier should be set using SetConstraints. Once the (possibly constrained) Efficient Frontier has been set the method EfficientFrontier, can read of the portfolios with almost no additional computational overhead.
  2. Exposing the Efficient Frontier - The components which make up points of the Efficient Frontier namely: expected return, asset weights and total risk of portfolios on the Efficient Frontier are exposed at the finite set of points at which they are evaluated using the methods: GetEfficientFrontierExpectedReturns, GetEfficientFrontierAssetWeights, GetEfficientFrontierPortfolioRisks. We also provide within this class a general cubic spline interpolation procedure CubicSplinePointwise, which allows you to interpolate the Efficient Frontier from the known values of the expected return and total risk of the finite set of known points of the Efficient Frontier.
  3. Efficient Frontier Stateless Methods - The method EfficientFrontier returns the weights of the optimal portfolio (i.e. lowest risk) for a given expected return and does not require prior evaluation of any other methods.
  4. Set Utility Function - The investors (risk-return) utility function can be set, using: SetUtilityFunctionInterp, or SetUtilityFunctionPoly.
  5. Optimal Portfolio Stateful - The unique optimal portfolio is accordance with the investors (risk - reward) utility function can be selected using one of: OptimalPortfolio, OptimalPortfolioMaxExpected. Please, note that before either of these methods is called you are required to set the investors utility function and evaluate the Efficient Frontier.

Notes on the Evaluation of the Efficient Frontier

To calculate the Efficient Frontier, Rosen's gradient projection optimization algorithm is used. If you directly try to evaluate the optimal portfolio with respect to an investors utility function then you will need numerous applications of Rosen's algorithm which will become computationally intensive. Therefore, we designed this XML Web service so that this would not be necessary by allowing the computation at the beginning a number of points on the Efficient Frontier, from which the other points will be deduced (in fact, estimated) through the use of cubic spline interpolation. These interpolation points are determined by CalculateEfficientFrontier, which must be called prior to any subsequent method which depends on the Efficient Frontier being known.

Estimation/evaluation of non-observable parameters

A number of the parameters which are required by this classes methods such as the covariance matrix are not directly observable from the market. However, the evaluation may be evaluated or estimated directly from market driven information such as historical asset prices. All methods related to the evaluation of such parameters have been collected or are referenced within the AssetParameters XML Web service.

In particular, the AssetParameters XML Web service contains the following procedures:

  1. Evaluation of the Covariance Matrix - CovarianceMatrix, CovarianceMatrix
  2. Estimation of the Expected Return - ExpectedReturns, ExpectedReturns
  3. Estimation of the Volatility - Not directly used within this XML Web service but its estimated value can act of a reference point when judging the effects of diversification of risk.
Which can be used for the evaluation of utility statistical and risk metrics which will be used in the application of the main portfolio analysis methods.

Requirements

Namespace: Portfolio

Assembly: WebCab.PortfolioDemo (in WebCab.PortfolioDemo.dll)

See Also

Markowitz Members | Portfolio Namespace