WebCab Portfolio for COM v5.0 Demo

Markowitz.EfficientFrontierWithCovarianceMatrixAndReturnsKnown Method 

Returns the (possibly constrained) weights of the assets within the portfolio which offers the least risk for a given expected return.

public double[] EfficientFrontierWithCovarianceMatrixAndReturnsKnown(
   double expectedReturn,
   double[,] covarianceMatrix,
   double[] expectedReturns,
   double precision
);

Parameters

expectedReturn
The expected return of the portfolio (on the Efficient Frontier) which will be returned. The expected return should be given in relative or absolute terms in accordance with the units used for the given expected returns of the assets from which the portfolio can be constructed.
covarianceMatrix
The covariance matrix of all assets from which the (optimal) portfolio can be constructed. We provide methods within the AssetParameters class methods which estimates the expected returns by a historical or scenario based approach.
expectedReturns
The array of the expected returns of the assets in absolute or relative terms from which the portfolios can be constructed. Where the k-th term corresponds to the expected return of the k-th asset. Note that the units used for the expected return will determine the units of the returned result. It is also important to point out that within any application the units for the expected returns should be used consistently throughout.
precision
This parameters allow the precision required to be set. The higher the precision the more computationally intensive the algorithm will become. The precision must be set to a positive number less than 1; where a number of the magnitude 1E-6 will result in high precision and a number of the magnitude 1E-3 will result in rapid execution. Further details are provided within the Programmer's guide chapter of the PDF documentation.

Return Value

An array of the weights of the assets of the optimal portfolio at an arbitrary point of the Efficient Frontier via interpolation. Where the i-th member of the array is the weight of the i-th asset.

Remarks

By default the weights of the assets can take any value within the closed interval [0,1], but you are able to set constraints for the asset weights by first calling the method SetConstraints.

Unique Features of this Method

Note that though this method is stateless, it is not just a stateless version on the method EfficientFrontier. In fact this method significantly differs in that it directly applies minimization algorithms at the desired point and so though it can be slower than EfficientFrontier, it has the following two distinct advantages:

  1. Not begin affected by interpolation errors since the portfolio with the require expected return is constructed rather than deduced from the Efficient Frontier known at a finite number of points which is then interpolated.
  2. Begin stateless, that is it does not require a previous call of the method CalculateEfficientFrontier.

Suitable values of the Expected Return Parameter

For a given set of assets with possibly constrained asset weights there will correspond to a range of values of the expected return over which the (constrained) Efficient Frontier exists. Naturally the value of the expected return about which the Efficient Frontier is evaluated must lie within this range. 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 the constraints should be set (by calling SetConstraints) before the range of the expected returns are evaluated.

Evaluation of the Covariance matrix and Expected Returns

You are required to provide as parameters for this method the covariance matrix and the expected returns of the collection of assets from which the portfolio's on the Efficient Frontier are constructed. We provide within the AssetParameters class offers procedures which assist in the evaluation of the covariance matrix or the expected returns using either a historical or scenario based approach.

Exceptions

Exception TypeCondition
NoSolutionExceptionThrown if there are no portfolios with the desired value of the expected return within the Efficient Frontier constructed. Since this method is direct this means that there does not exists a portfolio which can be constructed from the given collection of assets for the given desired expected return. Which means that there does not exist an asset within the collection of assets from which the portfolios can be constructed which has an expected return which is greater than or equal to the expected return of the portfolio desired. In order to be able to construct a portfolio with the desired level of expected return you will need additional assets to be included within the collection of assets from which the portfolio can be constructed which have an expected return which is greater than or equal to the expected return desired. When these asset(s) have been made available you will be able to construct the required on the (new) Efficient Frontier by reapplying this method.

See Also

Markowitz Class | WebCab.COM.Finance.Portfolio Namespace