How do I set a conditional condition in an optimization probem using Linprog

I want to optimize my bond portfolio using Linprog. But how do I incorporate the conditional condition that: if I choose a bond out of my bond-list then the minimum piece is 200'000 and any step upward is +1000 pieces (e.g. 201k, 202k, 203k etc). So if the bond is not attractive the minimum weight must be zero but if it is selected the condition has to be applied. Using inequalities, I was only able to say that the weights are not allowed to exceed a certain limit.

 Respuesta aceptada

Perhaps this MIQP documentation example has the modeling information you need. For your case you don't need to use the MIQP model, but I believe that you should use an MILP formulation, not a linear programming formulation.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

2 comentarios

Pascal
Pascal el 21 de Jun. de 2016
Editada: Pascal el 21 de Jun. de 2016
Hello Alan, Many thanks for your answer. However, looking at the MIQP documentation I still don't see how to enter the condition that each x can either be zero or at least the minimum investment. Regards, Pascal
Look at the semicontinuous constraints in the MIQP example. They do exactly what you ask.
Alan Weiss
MATLAB mathematical toolbox documentation

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 14 de Jun. de 2016

Comentada:

el 23 de Jun. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by