WebCab Portfolio for .NET v5.0 Demo

CapitalMarket.MarketPortfolio Method (Double, Double, Double[][], Double)

Constructs the Market Portfolio and returns the portfolios asset weights.

public double[] MarketPortfolio(
   double minimumExpectedReturn,
   double maximumExpectedReturn,
   double[][] covarianceMatrix,
   double marketRate
);

Parameters

minimumExpectedReturn
The minimum expected return of the portfolios on the Efficient Frontier over which the Market Portfolio will be sort. Note that, the minimum used here must be larger than or equal to the minimum used in the evaluation of the Efficient Frontier in CalculateEfficientFrontier.
maximumExpectedReturn
The maximum expected return of the portfolios on the Efficient Frontier over which the Market Portfolio will be sort. Note that, the minimum used here must be less than or equal to the maximum used in the evaluation of the Efficient Frontier is CalculateEfficientFrontier.
covarianceMatrix
The covariance matrix of the assets which can be used to construct the Market Portfolio (and all the other portfolios on the Efficient Frontier). Note that within applications when applying this method the covariance matrix will most likely already be evaluated in the construction of the Efficient Frontier using the method CalculateEfficientFrontier.
marketRate
The fixed rate at which the investor can borrow or lend money from the market given in decimal format (i.e. 1 percent = 0.01). Recall, that the CAPM assumes that the investor can borrow or lend cash at some prevailing market rate. Though in practice the lending and borrowing costs in general will differ, for large market players such as investment banks these two rates will be approximately the same and be approximately equal to the overnight rate offered between investment banks (i.e. LIBOR or similar). Smaller players can also obtain similar lending and borrow rates through the use of structured products such as REPOs and similar, offered by investments banks. Therefore, for most market participants this assumption is reasonable and does not lead to significant errors. Please note, that this rate refers to the rate the investor will receive on any cash held within the portfolio as well as the rate at which they are able to borrow cash from the market.

Return Value

An array of weights of the assets from which the Market Portfolio can be constructed.

Remarks

Note that here you are required to provide the range of expected returns in which the market portfolio lies. We return an array of weights where the first term corresponds to the weight of the first asset from the collection of assets, the second term to the weight of the second asset and so on.

Dependency of this Construction

The Market Portfolio is found by searching along the (possibly constrained) Efficient Frontier and therefore before this methods is called and the Market Portfolio sort; the constraints on the assets should be set and the corresponding the Efficient Frontier should be constructed. You are able to set the constraints on the asset weights by calling SetConstraints, and then the (possibly constrained) Efficient Frontier can be constructed by calling the following two methods: CalculateEfficientFrontier over an interval, or CalculateEfficientFrontier over entire range. Please note that if the Efficient Frontier is only constructed over an interval then the interval over which it is constructed must be at least as big as the interval over which the Market Portfolio is sort using this method.

Selection of the Minimum and Maximum Expected Returns

By carefully selecting the parameters for the minimum and maximum expected returns over which the Market Portfolio will be selected from the Efficient Frontier you will be able to increase efficient of this method. However, unless you have a good idea as to the likely range in which the Market Portfolio is likely lie we suggest that you take these parameters to define with widest possible range. The largest range is achieved by considering the same range over which the Efficient Frontier was evaluated.

Exceptions

Exception TypeCondition
EfficientFrontierNotCalculatedExceptionThrown if the Efficient Frontier has not been evaluated using CalculateEfficientFrontier.

See Also

CapitalMarket Class | WebCab.Libraries.Finance.Portfolio Namespace | CapitalMarket.MarketPortfolio Overload List