| 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] = portstats(ExpReturn, ExpCovariance, PortWts)
ExpReturn | 1-by-number of assets (NASSETS) vector specifying the expected (mean) return of each asset. |
ExpCovariance | NASSETS-by-NASSETS matrix specifying the covariance of the asset returns. |
PortWts | (Optional) Number of portfolios (NPORTS) by NASSETS matrix of weights allocated to each asset. Each row represents a different weighting combination. Default = 1/NASSETS (equally weighted). |
[PortRisk, PortReturn] = portstats(ExpReturn, ExpCovariance, PortWts) computes the expected rate of return and risk for a portfolio of assets.
PortRisk is an NPORTS-by-1 vector of the standard deviation of each portfolio.
PortReturn is an NPORTS-by-1 vector of the expected return of each portfolio.
ExpReturn = [0.1 0.2 0.15];
ExpCovariance = [0.0100 -0.0061 0.0042
-0.0061 0.0400 -0.0252
0.0042 -0.0252 0.0225 ];
PortWts=[0.4 0.2 0.4; 0.2 0.4 0.2];
[PortRisk, PortReturn] = portstats(ExpReturn, ExpCovariance,...
PortWts)
PortRisk =
0.0560
0.0550
PortReturn =
0.1400
0.1300
![]() | portsim | portvar | ![]() |
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 |