Does the Portfolio class have an equivalent to ABS2ACTIVE (in PORTOPT) to set constraints in the Financial Toolbox 5.0 (R2012b)?

1 visualizzazione (ultimi 30 giorni)
I would like to set active constraints on my portfolio. Using the function PORTOPT, one can do that by passing the output of ABS2ACTIVE to the input argument 'ConSet'.
How can I do this using the Portfolio class instead of PORTOPT?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 1 Set 2015
There are two approaches to this problem:
Method 1: Using the ‘setInequality’ method.
If you have A and b matrices such that "Ax <= b" with portfolio "x" (i.e. weights) and a reference portfolio "x0", the active constraint has the form
A*y <= b - A*x0
where "y" are the active portfolio weights. These must satisfy a budget constraint defined as:
sum(y) = 0
The sum of the active weights "y" is zero because y = x - x0, and the sum of the weights for both "x" and "x0" is 1.
The constraints can be set up directly in the Portfolio object with
p = Portfolio;
p = p.setInequality(A, b - A*x0);
p.setBudget(0, 0);
and then you set up your additional information to form a proper portfolio optimization problem (means, covariances, etc.)
Method 2: Using the output of ABS2ACTIVE
When you use the output from ABS2ACTIVE to determine the constraints, the procedure would be
p = Portfolio;
c = abs2active([A, b], x0);
p = p.setInequality(c(:,1:end-1),c(:,end));
p = p.setBudget(0, 0);

Più risposte (0)

Prodotti


Release

R2012b

Community Treasure Hunt

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

Start Hunting!

Translated by