WebCab Portfolio Web Services for .NET v5.0 Demo

AssetParameters.PortfolioVariance Method 

Evaluates the variance of the portfolio's value.

public double PortfolioVariance(
   double[] weight,
   double[][] covarianceMatrix
);

Parameters

weight
weight[i] is the weight for asset i. Note that, x[0] + x[1] + ... + x[N - 1]=1.
covarianceMatrix
The covariance matrix of the portfolio's assets.

Remarks

Evaluating the Asset Weights and Covariance Matrix

When applying this method you will need to provide:

  1. The weights of the assets within the portfolio.
  2. The covariance matrix of those assets.

The weights of the assets can be evaluated by dividing the market value of an asset within the portfolio by the total market value of the entire portfolio. For example, if a given asset within the portfolio has a market value of $200,000; and the total portfolio (including the asset being considered) has a market value of $1,000,000; then the market weighting of the asset is 0.2.

In order to evaluate the covariance matrix of the assets we suggest that you use one of the following methods from this XML Web service, namely:

  1. Historical Approach: CovarianceMatrix
  2. Scenario Approach: CovarianceMatrix

See Also

AssetParameters Class | Portfolio Namespace