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.


Randomized portfolio risks, returns, and weights


[PortRisk,PortReturn,PortWts] = portrand(Asset,Return,Points,Method)



Matrix of time series data. Each row is an observation and each column represents a single security.


(Optional) Row vector where each column represents the rate of return for the corresponding security in Asset. By default, Return is computed by taking the average value of each column of Asset.


(Optional) Scalar that specifies how many random points should be generated. Default = 1000.


(Optional) A character vector that specifies how to generate random portfolios from the set of portfolios with two possible methods:

  • 'uniform' – Uniformly distributed portfolio weights (default method). The 'uniform' method generates portfolio weights that are uniformly distributed on the set of portfolio weights.

  • 'geometric' – Concentrated portfolio weights around the geometric center of the set of portfolios. The 'geometric' method generates portfolio weights that are concentrated around the geometric center of the set of portfolio weights.


The 'uniform' and 'geometric' methods generate weights that are distributed symmetrically around the geometric center of the set of weights.


[PortRisk,PortReturn,PortWts] = portrand(Asset,Return,Points,Method) returns the risks, rates of return, and weights of random portfolio configurations.


Points-by-1 vector of standard deviations.


Points-by-1 vector of expected rates of return.


Points by number of securities matrix of asset weights. Each row of PortWts is a different portfolio configuration.

portrand(Asset, Return, Points, Method) plots the points representing each portfolio configuration. It does not return any data to the MATLAB® workspace.


Portfolios are selected at random from a set of portfolios such that portfolio weights are nonnegative and sum to 1. The sample mean and covariance of asset returns are used to compute portfolio returns for each random portfolio.


Bodie, Kane, and Marcus. Investments. Chapter 7.

Introduced before R2006a