This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Portfolio holdings into weights


Weights = holdings2weights(Holdings,Prices,Budget)



Number of portfolios (NPORTS) by number of assets (NASSETS) matrix with the holdings of NPORTS portfolios containing NASSETS assets.


NASSETS vector of asset prices.


(Optional) Scalar or NPORTS vector of nonzero budget constraints. Default = 1.


Weights = holdings2weights(Holdings,Prices,Budget) converts portfolio holdings into portfolio weights. The weights must satisfy a budget constraint such that the weights sum to Budget for each portfolio.

Weights is a NPORTS by NASSETS matrix containing the normalized weights of NPORTS portfolios containing NASSETS assets.


  • Holdings may be negative to indicate a short position, but the overall portfolio weights must satisfy a nonzero budget constraint.

  • The weights in each portfolio sum to the Budget value (which is 1 if Budget is unspecified.)

Introduced before R2006a