使用后处理结果设置可交易投资组合
获得有效的投资组合或对预期投资组合风险和收益的估计后,请使用您的结果设置交易,以实现有效的投资组合。有关使用 Portfolio
对象时的工作流的信息,请参阅 Portfolio 对象工作流。
设置可交易投资组合
假设您设置了一个投资组合优化问题并获得了有效边界上的投资组合。使用 Statistics and Machine Learning Toolbox™ 中的 dataset
对象形成一个交易记事本,列出您的投资组合以及每项资产的名称。例如,假设您想获得有效边界上的五种投资组合。您可以设置一个交易记事本,将权重乘以 100,以此来查看每种投资组合的配置:
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 ]; p = Portfolio('InitPort', pwgt0); p = setAssetList(p, 'Bonds','Large-Cap Equities','Small-Cap Equities','Emerging Equities'); p = setAssetMoments(p, m, C); p = setDefaultConstraints(p); pwgt = estimateFrontier(p, 5); pnames = cell(1,5); for i = 1:5 pnames{i} = sprintf('Port%d',i); end Blotter = dataset([{100*pwgt},pnames],'obsnames',p.AssetList); display(Blotter)
Blotter = Port1 Port2 Port3 Port4 Port5 Bonds 88.906 51.216 13.525 0 0 Large-Cap Equities 3.6875 24.387 45.086 27.479 0 Small-Cap Equities 4.0425 7.7088 11.375 13.759 0 Emerging Equities 3.364 16.689 30.014 58.762 100
Port1
) 主要投资债券,在有效边界的最大风险/最大收益端 (Port5
) 则完全投资在新兴股票。您还可以选择一个特定的有效投资组合,例如,假设您想要一个风险为 15% 的投资组合,可加上从 “estimateFrontier” 函数得到的买入和卖出权重输出来建立交易记事本: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 ]; p = Portfolio('InitPort', pwgt0); p = setAssetList(p, 'Bonds','Large-Cap Equities','Small-Cap Equities','Emerging Equities'); p = setAssetMoments(p, m, C); p = setDefaultConstraints(p); [pwgt, pbuy, psell] = estimateFrontierByRisk(p, 0.15); Blotter = dataset([{100*[pwgt0, pwgt, pbuy, psell]}, ... {'Initial','Weight', 'Purchases','Sales'}],'obsnames',p.AssetList); display(Blotter)
Blotter = Initial Weight Purchases Sales Bonds 30 20.299 0 9.7007 Large-Cap Equities 30 41.366 11.366 0 Small-Cap Equities 20 10.716 0 9.2838 Emerging Equities 10 27.619 17.619 0
dataset
对象的工具得到份额和待交易的份额。有关示例,请参阅Asset Allocation Case Study。另请参阅
Portfolio
| estimateAssetMoments
| checkFeasibility
相关示例
- Troubleshooting Portfolio Optimization Results
- 创建 Portfolio 对象
- Working with Portfolio Constraints Using Defaults
- 估计 Portfolio 对象整个有效边界上的有效投资组合
- Estimate Efficient Frontiers for Portfolio Object
- Asset Allocation Case Study
- 使用 Financial Toolbox 的投资组合优化示例
- Portfolio Optimization with Semicontinuous and Cardinality Constraints
- Black-Litterman Portfolio Optimization Using Financial Toolbox
- Portfolio Optimization Using Factor Models
- Portfolio Optimization Using Social Performance Measure
- Diversify Portfolios Using Custom Objective