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.

PortfolioMAD

PortfolioMAD object for mean-absolute deviation portfolio optimization and analysis

Description

The PortfolioMAD object implements mean-absolute deviation portfolio optimization, where MAD stands for “mean-absolute deviation.” PortfolioMAD objects support functions that are specific to MAD portfolio optimization.

The main workflow for MAD portfolio optimization is to create an instance of a PortfolioMAD object that completely specifies a portfolio optimization problem and to operate on the PortfolioMAD object to obtain and analyze efficient portfolios. A MAD optimization problem is completely specified with these three elements:

  • A universe of assets with scenarios of asset total returns for a period of interest, where scenarios comprise a collection of samples from the underlying probability distribution for asset total returns. This collection must be sufficiently large for asymptotic convergence of sample statistics. Asset return moments and related statistics are derived exclusively from the scenarios.

  • A portfolio set that specifies the set of portfolio choices in terms of a collection of constraints.

  • A model for portfolio return and risk proxies, which, for MAD optimization, is either the gross or net mean of portfolio returns and the mean-absolute deviation of portfolio returns.

After these three elements have been specified unambiguously, it is possible to solve and analyze MAD portfolio optimization problems.

The simplest MAD portfolio optimization problem has:

  • Scenarios of asset total returns

  • A requirement that all portfolios have nonnegative weights that sum to 1 (the summation constraint is known as a budget constraint)

  • Built-in models for portfolio return and risk proxies that use scenarios of asset total returns

Given scenarios of asset returns in the variable AssetScenarios, this problem is completely specified by:

p = PortfolioMAD('Scenarios', AssetScenarios, 'LowerBound', 0, 'Budget', 1);
or equivalently by:
p = PortfolioMAD;
p = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);

To confirm that this is a valid portfolio optimization problem, the following function determines whether the set of PortfolioMAD choices is bounded (a necessary condition for portfolio optimization).

[lb, ub, isbounded] = estimateBounds(p);

Given the problem specified in the PortfolioMAD object p, the efficient frontier for this problem can be displayed with:

plotFrontier(p);
and efficient portfolios can be obtained with:
pwgt = estimateFrontier(p);

For more information on the workflow when using PortfolioMAD objects, seePortfolioMAD Object Workflow and for more detailed information on the theoretical basis for mean-absolute deviation optimization, see Portfolio Optimization Theory.

Properties

PortfolioMAD PropertiesManage PortfolioMAD object for mean-absolute deviation portfolio optimization and analysis

Object Functions

setAssetListSet up list of identifiers for assets
setInitPortSet up initial or current portfolio
setDefaultConstraintsSet up portfolio constraints with nonnegative weights that sum to 1
estimateAssetMomentsEstimate mean and covariance of asset returns from data
setCostsSet up proportional transaction costs
addEqualityAdd linear equality constraints for portfolio weights to existing constraints
addGroupRatioAdd group ratio constraints for portfolio weights to existing group ratio constraints
addGroupsAdd group constraints for portfolio weights to existing group constraints
addInequalityAdd linear inequality constraints for portfolio weights to existing constraints
getBoundsObtain bounds for portfolio weights from portfolio object
getBudgetObtain budget constraint bounds from portfolio object
getCostsObtain buy and sell transaction costs from portfolio object
getEqualityObtain equality constraint arrays from portfolio object
getGroupRatioObtain group ratio constraint arrays from portfolio object
getGroupsObtain group constraint arrays from portfolio object
getInequalityObtain inequality constraint arrays from portfolio object
getOneWayTurnoverObtain one-way turnover constraints from portfolio object
setGroupsSet up group constraints for portfolio weights
setInequalitySet up linear inequality constraints for portfolio weights
setBoundsSet up bounds for portfolio weights
setBudgetSet up budget constraints
setCostsSet up proportional transaction costs
setDefaultConstraintsSet up portfolio constraints with nonnegative weights that sum to 1
setEqualitySet up linear equality constraints for portfolio weights
setGroupRatioSet up group ratio constraints for portfolio weights
setInitPortSet up initial or current portfolio
setOneWayTurnoverSet up one-way portfolio turnover constraints
setTurnoverSet up maximum portfolio turnover constraint
checkFeasibilityCheck feasibility of input portfolios against portfolio object
estimateBoundsEstimate global lower and upper bounds for set of portfolios
estimateFrontierEstimate specified number of optimal portfolios on the efficient frontier
estimateFrontierByReturnEstimate optimal portfolios with targeted portfolio returns
estimateFrontierByRiskEstimate optimal portfolios with targeted portfolio risks
estimateFrontierLimitsEstimate optimal portfolios at endpoints of efficient frontier
plotFrontierPlot efficient frontier
estimatePortReturnEstimate mean of portfolio returns
estimatePortRiskEstimate portfolio risk according to risk proxy associated with corresponding object
setSolverChoose main solver and specify associated solver options for portfolio optimization
setProbabilityLevelSet probability level for VaR and CVaR calculations
setScenariosSet asset returns scenarios by direct matrix
getScenariosObtain scenarios from portfolio object
simulateNormalScenariosByDataSimulate multivariate normal asset return scenarios from data
simulateNormalScenariosByMomentsSimulate multivariate normal asset return scenarios from mean and covariance of asset returns
estimateScenarioMomentsEstimate mean and covariance of asset return scenarios
estimatePortStdEstimate standard deviation of portfolio returns

Examples

expand all

Create efficient portfolios:

load CAPMuniverse

p = PortfolioMAD('AssetList',Assets(1:12));
p = simulateNormalScenariosByData(p, Data(:,1:12), 20000 ,'missingdata',true);
p = setDefaultConstraints(p);

plotFrontier(p);

pwgt = estimateFrontier(p, 5);

pnames = cell(1,5);
for i = 1:5
	pnames{i} = sprintf('Port%d',i);
end

Blotter = dataset([{pwgt},pnames],'obsnames',p.AssetList);

disp(Blotter);
            Port1         Port2         Port3         Port4          Port5     
    AAPL      0.030236      0.075387       0.11278        0.13456    1.5092e-14
    AMZN    1.6541e-21    1.8269e-22    1.1341e-22     1.1658e-33    2.8997e-14
    CSCO    1.5007e-22    3.6088e-23    5.7857e-24    -5.0613e-34    4.1869e-14
    DELL     0.0089659             0             0     3.6065e-18    3.9048e-14
    EBAY    2.0446e-22     3.838e-23    2.5657e-24     6.3019e-17    1.3394e-15
    GOOG       0.16117       0.35201       0.54486        0.74888             1
    HPQ       0.056551      0.024037    4.3354e-24     2.4041e-33    3.8894e-14
    IBM        0.45905       0.37891       0.29383        0.11656    3.7902e-14
    INTC             0    1.0096e-21             0     1.9259e-34    3.8264e-14
    MSFT       0.28403       0.16966      0.048527              0    4.0873e-14
    ORCL    5.3466e-21    9.3937e-23    3.3353e-22    -1.3404e-34    3.7811e-14
    YHOO             0    2.8818e-23    2.8929e-24     1.7548e-34     3.535e-14

References

[1] For a complete list of references for the PortfolioMAD object, see Portfolio Optimization.

Introduced in R2013b

Was this topic helpful?