Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

estimatePortStd

Estimate standard deviation of portfolio returns

Use the estimatePortStd function with a PortfolioCVaR or PortfolioMAD objects to estimate standard deviation of portfolio returns.

For details on the workflows, see PortfolioCVaR Object Workflow and PortfolioMAD Object Workflow.

Syntax

pstd = estimatePortStd(obj,pwgt)

Description

example

pstd = estimatePortStd(obj,pwgt) estimate standard deviation of portfolio returns for PortfolioCVaR or PortfolioMAD objects.

Examples

collapse all

Given a portfolio pwgt, use the estimatePortStd function to show the standard deviation of portfolio returns.

m = [ 0.05; 0.1; 0.12; 0.18 ];
C = [ 0.0064 0.00408 0.00192 0; 
    0.00408 0.0289 0.0204 0.0119;
    0.00192 0.0204 0.0576 0.0336;
    0 0.0119 0.0336 0.1225 ];
m = m/12;
C = C/12;

rng(11);

AssetScenarios = mvnrnd(m, C, 20000);

p = PortfolioCVaR;
p = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);
p = setProbabilityLevel(p, 0.95);

pwgt = estimateFrontierLimits(p);

pstd = estimatePortStd(p, pwgt);
disp(pstd)
    0.0223
    0.1010

The function rng() resets the random number generator to produce the documented results. It is not necessary to reset the random number generator to simulate scenarios.

Given a portfolio pwgt, use the estimatePortStd function to show the standard deviation of portfolio returns.

m = [ 0.05; 0.1; 0.12; 0.18 ];
C = [ 0.0064 0.00408 0.00192 0; 
    0.00408 0.0289 0.0204 0.0119;
    0.00192 0.0204 0.0576 0.0336;
    0 0.0119 0.0336 0.1225 ];
m = m/12;
C = C/12;

rng(11);

AssetScenarios = mvnrnd(m, C, 20000);

p = PortfolioMAD;
p = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);

pwgt = estimateFrontierLimits(p);

pstd = estimatePortStd(p, pwgt);
disp(pstd)
    0.0222
    0.1010

The function rng() resets the random number generator to produce the documented results. It is not necessary to reset the random number generator to simulate scenarios.

Input Arguments

collapse all

Object for portfolio, specified using a PortfolioCVaR or PortfolioMADobject.

For more information on creating a PortfolioCVaR or PortfolioMAD object, see

Collection of portfolios, specified as a NumAssets-by-NumPorts matrix, where NumAssets is the number of assets in the universe and NumPorts is the number of portfolios in the collection of portfolios.

Data Types: double

Output Arguments

collapse all

Estimates for standard deviations of portfolio returns for each portfolio in pwgt, returned as a NumPorts vector.

Tips

You can also use dot notation to estimate the standard deviation of portfolio returns.

pstd = obj.estimatePortStd(pwgt);

Introduced in R2012b

Was this topic helpful?