Main Content

portrand

Randomized portfolio risks, returns, and weights

Syntax

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

Arguments

Asset

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

Return

(Optional) Row vector where each column represents the rate of return for the corresponding security inAsset. By default,Returnis computed by taking the average value of each column ofAsset.

Points

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

Method

(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.

Note

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

Description

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

PortRisk

Points-by-1vector of standard deviations.

PortReturn

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

PortWts

Pointsby number of securities matrix of asset weights. Each row ofPortWtsis 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.

Note

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.

References

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

Version History

Introduced before R2006a