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.

portstats

Portfolio expected return and risk

Syntax

[PortRisk,PortReturn] = portstats(ExpReturn,ExpCovariance)
[PortRisk,PortReturn] = portstats(___,Wts)

Description

example

[PortRisk,PortReturn] = portstats(ExpReturn,ExpCovariance) computes the expected rate of return and risk for a portfolio of assets.

example

[PortRisk,PortReturn] = portstats(___,Wts) specifies options using one or more optional arguments in addition to the input arguments in the previous syntax.

Examples

collapse all

This example shows how to calculate the expected rate of return and risk for a portfolio of assets.

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 = 2×1

    0.0560
    0.0550

PortReturn = 2×1

    0.1400
    0.1300

Input Arguments

collapse all

Expected (mean) return of each asset, specified as a 1-by-NASSETS vector.

Data Types: double

Asset return covariances, specified as an NASSETS-by-NASSETS matrix.

Data Types: double

(Optional) Weights allocated to each asset, specified as an NPORTS-by-NASSETS matrix. Each row represents a different weighting combination of the assets in the portfolio. If Wts is not entered, weights of 1/NASSETS are assigned to each security.

Data Types: double

Output Arguments

collapse all

Standard deviation of each portfolio, returned as an NPORTS-by-1 vector.

Expected return of each portfolio, returned an NPORTS-by-1 vector.

Introduced before R2006a