Matlab Rounding as Portfolio Constraint

조회 수: 2 (최근 30일)
Carolin Brueckmann
Carolin Brueckmann 2015년 5월 23일
댓글: Carolin Brueckmann 2015년 5월 24일
Hi there,
I am optimizing a portfolio using the mean-CVaR optimization function in Matlab. One of the constraints I would like to set is that the portfolio weights for each asset class should be rounded to the nearest 0.05.
I have defined the rounding constraint as
round(x/5,2)*5
which works fine. However, I am wondering now how I can include this as a constraint in the optimization instead of just rounding the weights after the optimization.
Here is the code I am using for the portfolio optimization
pmc = PortfolioCVaR;
pmc = pmc.setAssetList(IndexList); % select index names
pmc = pmc.setScenarios(returns); % select return series
pmc = pmc.setProbabilityLevel(0.95); % cVaR confidence level
pmc = pmc.setDefaultConstraints; % Constraint 1: only positive
weights that sum to 1
pmc = pmc.setBounds(0.01, 0.1); % Constraint 2: min/max weights
I would be happy about any hints!
Thanks a lot, Carolin

채택된 답변

John D'Errico
John D'Errico 2015년 5월 23일
This becomes essentially an integer programming problem, since you are trying to force the parameters to be discrete values. So unless the optimization tool allows that as an option, you will need to use a different tool for the optimization.
  댓글 수: 1
Carolin Brueckmann
Carolin Brueckmann 2015년 5월 24일
Hi John,
thanks a lot for the Hint. The default solver for the mean-cVaR optimization ('fmincon') does not support integer programming problems. The solver option in the PortfolioCVaR object can be changed to the ‘cuttingplane’ solver, which is a mixed integer programming technique and thus would suit my need. Unfortunately, I am struggling with the implementation of the 2 decimals constraint. I believe that I have to run the ‘cuttingplane’ solver under the 'intlinprog' algorithm and adjust the number of decimals using ‘TolInteger’. The latter two however it seems cannot be combined.
Here is the code I am trying to run: pmc = pmc.setSolver('cuttingplane','MasterSolverOptions', options); options = optimoptions('intlinprog', 'TolInteger', 1e-3)
Would you have any Tips on how to set the decimal places under this approach?
Many thanks in advance!
Best, Carolin

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Portfolio Optimization and Asset Allocation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by