Working with Other Portfolio Objects
This example shows how to examine portfolio optimization problems according to different combinations of return and risk proxies.The PortfolioMAD
object is for MAD portfolio optimization. The Portfolio
object is for mean-variance portfolio optimization. Sometimes, you might want to examine portfolio optimization problems according to different combinations of return and risk proxies. A common example is that you want to do a MAD portfolio optimization and then want to work primarily with moments of portfolio returns. Suppose that you set up a MAD portfolio optimization problem with:
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 ]; pwgt0 = [ 0.3; 0.3; 0.2; 0.1 ]; rng('default') p = PortfolioMAD; p = setAssetList(p, 'Bonds','Large-Cap Equities','Small-Cap Equities','Emerging Equities'); p = setInitPort(p, pwgt0); p = simulateNormalScenariosByMoments(p, m, C, 20000); p = setDefaultConstraints(p);
To work with the same problem in a mean-variance framework, you can use the scenarios from the PortfolioMAD
object to set up a Portfolio
object so that p
contains a MAD optimization problem and q
contains a mean-variance optimization problem based on the same data.
q = Portfolio('AssetList', p.AssetList);
q = estimateAssetMoments(q, p.getScenarios);
q = setDefaultConstraints(q);
pwgt = estimateFrontier(p);
qwgt = estimateFrontier(q);
Since each object has a different risk proxy, it is not possible to compare results side by side. To obtain means and standard deviations of portfolio returns, you can use the functions associated with each object to obtain:
pret = estimatePortReturn(p, pwgt); pstd = estimatePortStd(p, pwgt); qret = estimatePortReturn(q, qwgt); qstd = estimatePortStd(q, qwgt); [pret, qret]
ans = 10×2
0.0594 0.0591
0.0727 0.0724
0.0860 0.0857
0.0993 0.0991
0.1126 0.1124
0.1259 0.1257
0.1391 0.1390
0.1524 0.1524
0.1657 0.1657
0.1790 0.1790
[pstd, qstd]
ans = 10×2
0.0761 0.0761
0.0825 0.0823
0.0988 0.0984
0.1210 0.1206
0.1465 0.1462
0.1739 0.1736
0.2054 0.2051
0.2469 0.2466
0.2945 0.2944
0.3462 0.3462
To produce comparable results, you can use the returns or risks from one portfolio optimization as target returns or risks for the other portfolio optimization.
qwgt = estimateFrontierByReturn(q, pret); qret = estimatePortReturn(q, qwgt); qstd = estimatePortStd(q, qwgt); [pret, qret]
ans = 10×2
0.0594 0.0594
0.0727 0.0727
0.0860 0.0860
0.0993 0.0993
0.1126 0.1126
0.1259 0.1259
0.1391 0.1391
0.1524 0.1524
0.1657 0.1657
0.1790 0.1790
[pstd, qstd]
ans = 10×2
0.0761 0.0761
0.0825 0.0825
0.0988 0.0988
0.1210 0.1210
0.1465 0.1465
0.1739 0.1739
0.2054 0.2054
0.2469 0.2469
0.2945 0.2945
0.3462 0.3462
Now it is possible to compare standard deviations of portfolio returns from either type of portfolio optimization.
See Also
Topics
- Creating the Portfolio Object
- Creating the PortfolioMAD Object
- Working with MAD Portfolio Constraints Using Defaults
- Estimate Efficient Portfolios Along the Entire Frontier for PortfolioMAD Object
- Estimate Efficient Frontiers for PortfolioMAD Object
- Asset Returns and Scenarios Using PortfolioMAD Object
- PortfolioMAD Object
- Portfolio Optimization Theory
- PortfolioMAD Object Workflow