| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
[PortRisk, PortReturn, PortWts] = portrand(Asset, Return, Points, Method) portrand(Asset, Return, Points, Method)
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 in Asset. By default, Return is computed by taking the average value of each column of Asset. |
Points | (Optional) Scalar that specifies how many random points should be generated. Default = 1000. |
Method | (Optional) A string that specifies how to generate random portfolios from the set of portfolios with two possible methods:
|
[PortRisk, PortReturn, PortWts] = portrand(Asset, Return, Points, Method) returns the risks, rates of return, and weights of random portfolio configurations.
PortRisk | Points-by-1 vector of standard deviations. |
PortReturn | Points-by-1 vector of expected rates of return. |
PortWts | 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.
Note Portfolios are selected at random from a set of portfolios such that portfolio weights are non-negative 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.
![]() | portopt | portror | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |