Table 1. Solutions of the Problem 1
Table 2. Solutions of the Problem 3
Figure 1. Efficient Frontier for Problem 1
Figure 2. Efficient Frontier for Problem 3
This section explains how to build the so called "efficient frontier" (return vs. risk plot) (see Formal Problem Statement):
• | Problem 1 (CS.1) - (CS.4) is implemented with riskparam in the file CS_Beyond_Black_Litterman_riskparam.m . |
• | Problem 3 (CS.9) - (CS.12) is implemented with riskconstrparam in the file CS_Beyond_Black_Litterman_riskconstrparam.m . |
Data are saved in file ThisData.mat.
Let us describe the main operations. To run case study you need to do the following main steps:
In file CS_Beyond_Black_Litterman_riskparam.m.
Load data from mat file:
load('ThisData', 'Hmatr', 'dmatr', 'Aeqmatr', 'beqvec', 'lbvec');
Set options:
options.PlotGraph = 'On';
options.PlotType = 2;
options.ScaleParam = -1;
Optimize problem:
[Objectives, Parameters, Points, GraphHandle]= riskparam ('cvar_risk', 0.95, Hmatr, [], [], [], dmatr', -0.00105, Aeqmatr, beqvec, lbvec, [], 'b', [],[],N_Par, [], [], [],[],options); |
Describe input and output arguments of PSG subroutine riskparam:
Input arguments |
Meaning |
'cvar_risk' |
Name of Risk function. |
0.95 |
Confidence level in CVaR Risk. |
Hmatr |
Matrix of Scenarios (matrix_prior_scenarios). |
dmatr' |
Matrix for Linear function in constraint on expected return (constraint_return). |
-0.00105 |
Lower bound of constraint return. |
Aeqmatr |
Matrix for linear function in the budget constraint (constraint_budget). |
beqvec |
Lower bound of budget constraint. |
lbvec |
Lower bound for variables. |
'b' |
Name of vector containing the parameter. |
N_Par |
Number of parameters. |
options |
Solution process options. |
Output argument |
Meaning |
Objectives |
Row vector of the optimal values of the objective found by optimizing the problem for each parameter value. |
Parameters |
Row vector parameter values. |
Points |
Matrix of optimal points found by optimizing the problem for each parameter value. |
GraphHandle |
Handle of the graphical object (if option.PlotGraph = ‘On’). |
Solution of optimization problem is in Table 1. Graph with the efficient frontier is on Figure 1.
Further we describe the main operations in file CS_Beyond_Black_Litterman_riskconstrparam.m.
Load data from mat file:
load('ThisData', 'Hmatr', 'dmatr', 'Aeqmatr', 'beqvec', 'lbvec');
Set options:
options.PlotGraph = 'On';
options.PlotType = 1;
options.ScaleParam = 1;
Optimize problem:
[Objectives, Parameters, Points, GraphHandle]=riskconstrparam ([],'cvar_risk', [], [], [], [], ... 0.95, Hmatr, [], [], -dmatr, 0.075, [], [], Aeqmatr, beqvec, lbvec, [], 'r', [],[],N_Par,... [], [], [], [], options); |
Describe input and output arguments of PSG subroutine riskconstrparam:
Input arguments |
Meaning |
'cvar_risk' |
Name of Risk 2 function. |
0.95 |
Confidence level in CVaR Risk. |
Hmatr |
Matrix of Scenarios (matrix_prior_scenarios). |
-dmatr' |
Matrix for Linear function specifying portfolio mean return. |
0.075 |
Parameter (lower bound of CVaR constraint). |
Aeqmatr |
Matrix for linear function in the budget constraint (matrix_budget). |
beqvec |
Lower bound of budget constraint. |
lbvec |
Lower bound for variables. |
'r' |
Points out that the right hand side, r, in the constraint on risk is selected as a parameter. |
N_Par |
Number of parameters. |
options |
Solution process options. |
Output argument |
Meaning |
Objectives |
Row vector of the optimal values of the objective found by optimizing the problem for each parameter value. |
Parameters |
Row vector parameter values. |
Points |
Matrix of optimal points found by optimizing the problem for each parameter value. |
GraphHandle |
Handle of the graphical object (if option.PlotGraph = ‘On’). |
Solution of optimization problem is in Table 2. Graph with the efficient frontier is on Figure 2.
Table 1. Solution of Problem 1
Parameters Objectives:
0.000914 0.048190
0.000936 0.048713
0.000958 0.049634
0.000979 0.050673
0.001001 0.051820
0.001023 0.053095
0.001044 0.054479
0.001066 0.055929
0.001088 0.057451
0.001109 0.059042
0.001131 0.060698
0.001153 0.062415
0.001174 0.064190
0.001196 0.066014
0.001218 0.067875
0.001239 0.069778
0.001261 0.071742
0.001283 0.073766
0.001305 0.075861
0.001326 0.078182
Optimal Points:
0.484532853464393 0.515467146535607 0 0
0.483607745419318 0.458501748831425 0.047139094565434 0.010751411183823
0.455617732077999 0.429875392135586 0.054014242886499 0.060492632899915
0.438129597124740 0.385379025623419 0.073693522724800 0.102797854527041
0.407789093614783 0.362747583078185 0.072498970834395 0.156964352472637
0.394684151433045 0.305903895589119 0.110297473606280 0.189114479371556
0.376692088510354 0.265701693109694 0.121389509375229 0.236216709004722
0.347251999099780 0.228340150837460 0.150934070818598 0.273473779244161
0.328392530260857 0.188698905398948 0.162649296652162 0.320259267688033
0.299575376435156 0.169091280305392 0.151047796182017 0.380285547077436
0.272149786111647 0.137987264342184 0.162198543922677 0.427664405623493
0.246439560556944 0.104440971549929 0.175648587306810 0.473470880586317
0.230617151608223 0.071010798585257 0.166857164100082 0.531514885706438
0.199653846063165 0.050450907829186 0.162043134549400 0.587852111558249
0.188396485244883 0.001231118133590 0.178746979903247 0.631625416718280
0.144039442486654 0 0.159645673677762 0.696314883835584
0.089199185338438 0 0.160512931050625 0.750287883610937
0.036071403905475 0 0.157667457247565 0.806261138846960
0 0 0.118386834983678 0.881613165016322
0 0 0.000357730442427 0.999642269557573
Table 2. Solution of Problem 3
Parameters Objectives:
0.048193 0.000921
0.049772 0.000961
0.051350 0.000992
0.052929 0.001020
0.054508 0.001045
0.056086 0.001068
0.057665 0.001091
0.059243 0.001112
0.060822 0.001133
0.062400 0.001153
0.063979 0.001172
0.065558 0.001191
0.067136 0.001209
0.068715 0.001227
0.070293 0.001245
0.071872 0.001263
0.073451 0.001280
0.075029 0.001296
0.076608 0.001312
0.078186 0.001326
Optimal Points:
0.496916866253144 0.502934701059129 0.000148432687728 0
0.454804431856344 0.422961347826496 0.054932191147588 0.067302029169573
0.420356446117484 0.369543764407835 0.076964120908575 0.133135668566106
0.394839719260449 0.313663125744075 0.107279433167935 0.184217721827541
0.376585698555765 0.264496327852634 0.121879271567253 0.237038702024348
0.348284015621725 0.220677283484341 0.153437528742550 0.277601172151383
0.323729299423353 0.184859665314909 0.165068103847446 0.326342931414292
0.289679137934694 0.169500816669559 0.157089807215137 0.383730238180611
0.269048751028415 0.137221115176648 0.162018523776610 0.431711610018327
0.246486961146958 0.104824838542935 0.175707568889070 0.472980631421037
0.231646541539017 0.079067218649022 0.160377037961203 0.528909201850758
0.202286153213445 0.060024374505406 0.164190688458183 0.573498783822966
0.191120117477517 0.022851491052983 0.170924135090005 0.615104256379496
0.170700065239256 0 0.167283268533450 0.662016666227294
0.128597303270623 0 0.161811353886575 0.709591342842802
0.085594237919813 0 0.160636722002793 0.753769040077394
0.043547008073508 0 0.159581675224810 0.796871316701682
0.000947997595755 0 0.161940311277941 0.837111691126304
0 0 0.078982255369733 0.921017744630267
0 0 0.000165128106188 0.999834871893812
Figure 1. Efficient Frontier for Problem 1
Figure 2. Efficient Frontier for Problem 3