Main Content


Portfolio holdings into weights


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

Weights = holdings2weights(___,Budget) converts portfolio holdings into portfolio weights using an optional argument for Budget.

Input Arguments

collapse all

Holdings value, returned as an NPORTS-by-NASSETS matrix that contains the holdings of NPORTS portfolios that contain 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.)

Data Types: double

Asset prices, specified as an NASSETS vector.

Data Types: double

(Optional) Budget constraints, specified as a scalar or an NPORTS vector of nonzero budget constraints.

Data Types: double

Output Arguments

collapse all

Portfolio weights, returned as an NPORTS-by-NASSETS matrix containing the normalized weights of NPORTS portfolios containing NASSETS assets.

Data Types: double

Version History

Introduced before R2006a