WebCab Portfolio for .NET v5.0 Demo

CapitalMarket.SetConstraints Method 

Sets upper and lower bounds on the weights of the assets from which the optimal portfolios can be constructed.

public void SetConstraints(
   double[] lowerBounds,
   double[] upperBounds
);

Parameters

lowerBounds
An array where the i-th term is the lower bound on the weight 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 is the upper bound on the weights 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.

Remarks

Note that the range and shape of the Efficient Frontier (constructed using CalculateEfficientFrontier) may be effected by any constraints set. Moreover, the Market Portfolio on the Efficient Frontier evaluated using MarketPortfolio may also be effected.

Setting upper and lower bound asset weight constraints

If an optimal portfolio selected from n assets has the additional requirement that all of the assets must have a weight between 0.05 and 0.1 (i.e. between 5 and 10 percent), then you will need to pass the parameters:

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 n terms.

Constraints Default Values

If the constraints are not set then they take there default values of 0 and 1 respectively, for the lower and upper bound for each asset weight.

Performance Issues

The introduction of constraints on the weights of the portfolios which form the Efficient Frontier will have the following consequences with regards to overall performance:

Remarks:

Motivation and Definition of Consistent Asset Weight Constraints

Say that we wish to place the following constraints on the weights of 3 assets from which a portfolio can be constructed:

  1. lower bounds = {0.4, 0.4, 0.4}
  2. upper bounds = {0.5, 0.5, 0.5}
because the sum of the weights of a portfolio must be 1, there is no `consistent' portfolio which can be constructed which satisfies these constraints and satisfies the requirement that the weights must sum to 1. Since even if we take the lower bounds for each of the three assets the sum of the weights is greater than 1 (i.e. 0.4 + 0.4 + 0.4 = 1.2 > 1).

Similarly, say we wish to use the following set of constraints:

  1. lower bounds = {0.2, 0.2, 0.2}
  2. upper bounds = {0.3, 0.3, 0.3}
as mentioned above since the sum of the weights of a portfolio must equal one, there are no portfolios which can be constructed which are `consistent' the definition that the weights must sum to 1. Since even if we take the upper bounds for each of the three assets the sum of the weights is less than 1 (i.e. 0.3 + 0.3 + 0.3 = 0.9 < 1).

For these reasons we introduce the following property of `consistent constraints':

A set of upper and lower bound asset constraints of a portfolio are said to be consistent if the sum of the lower bounds is less than or equal to 1, and the sum of the upper bounds is greater than or equal to 1.

Without the `consistent constraint' condition there will not exist any possible selections of the asset weights which satisfy the constraints and the definition of the asset weights, i.e. the domain of possible portfolios will be empty. Therefore this condition of consistency of the constraints is mandatory for any set of constraints used within the construction of the Efficient Frontier.

Constraints on the Asset Weights effect on the range of the Expected Returns for which the Efficient Frontier exists

The placing of constraints on the weights of the assets effects the range of expected returns for which the resulting portfolios can be constructed. Since the (constrained) Efficient Frontier is just a collection of portfolios subject to the constraints which minimize the risk for a given level of the expected return. The range of values over which the Efficient Frontier exists must correspond to the range of expected returns of the possible constructed portfolios.

The methods MaxFrontierReturn, and MinFrontierReturn allow the maximum and minimum values of the expected return over which the Efficient Frontier exists when the asset weights have upper and lower bounds. In this case we also provide two associated methods MaxFrontierReturnWeights and MinFrontierReturnWeights, which evaluate the asset weights of the portfolios at the upper and lower bound of the Efficient Frontier.

See Also

CapitalMarket Class | WebCab.Libraries.Finance.Portfolio Namespace