You are on page 1of 90

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Programacin no-lineal entera para problemas


de optimizacin de portafolios
Juan Pablo Vielma Shabbir Ahmed
Nemhauser

George L.

H. Milton Stewart School of Industrial and Systems Engineering


Georgia Institute of Technology

Universidad Adolfo Ibaez


Julio 2008

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Outline

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Resultados Computacionales

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Optimizacin de Portafolios y Programacin No-Lineal


Entera

Optimizacin de Portafolios Tradicional (Markowitz):


Problema no-linear quadrtico que puede ser resuelto
eficientemente.
No muy realista.

Optimizacin de Portafolios Realista:


Problema no-linear entero difcil de resolver.
Requiere el desarrollo de nuevos algoritmos.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Seleccin de un Portafolio de Inversin


Opcin de invertir en n activos diferentes (e.g. 100
acciones, 3 tipos de bonos y un deposito a plazo).
Problema: seleccionar fraccin de capital a invertir en
cada activo.
Informacin sobre los activos:
Retorno r de un activo:
(Valor en periodo t + 1) = (1 + r)(Valor en periodo t).
r es una variable aleatoria. Solo informacin parcial: valor
esperado, desviacin estndar, covarianza entre activos,
etc.

Objetivo de la seleccin:
1
2

Maximizar el retorno esperado del portafolio.


Minimizar el riesgo del portafolio.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Seleccin de un Portafolio de Inversin


Opcin de invertir en n activos diferentes (e.g. 100
acciones, 3 tipos de bonos y un deposito a plazo).
Problema: seleccionar fraccin de capital a invertir en
cada activo.
Informacin sobre los activos:
Retorno r de un activo:
(Valor en periodo t + 1) = (1 + r)(Valor en periodo t).
r es una variable aleatoria. Solo informacin parcial: valor
esperado, desviacin estndar, covarianza entre activos,
etc.

Objetivo de la seleccin:
1
2

Maximizar el retorno esperado del portafolio.


Minimizar el riesgo del portafolio.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Seleccin de un Portafolio de Inversin


Opcin de invertir en n activos diferentes (e.g. 100
acciones, 3 tipos de bonos y un deposito a plazo).
Problema: seleccionar fraccin de capital a invertir en
cada activo.
Informacin sobre los activos:
Retorno r de un activo:
(Valor en periodo t + 1) = (1 + r)(Valor en periodo t).
r es una variable aleatoria. Solo informacin parcial: valor
esperado, desviacin estndar, covarianza entre activos,
etc.

Objetivo de la seleccin:
1
2

Maximizar el retorno esperado del portafolio.


Mantener el riesgo del portafolio controlado.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio


yj fraccin de capital
invertido en activo j.

max
y

sujeto a
n
X

yj = 1

j=1

yj 0

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

max
y

n
X

rj yj

j=1

sujeto a
n
X

yj = 1

j=1

yj 0 j

yj fraccin de capital
invertido en activo j.
rj : retorno esperado de
activo j.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

max
y

n
X

rj yj

j=1

sujeto a
n
X

yj = 1

j=1

yj 0 j

yj fraccin de capital
invertido en activo j.
rj : retorno esperado de
activo j.
qi, j : covarianza entre el
retorno del activo i y j.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

n
X

max
y

yj fraccin de capital
invertido en activo j.

rj yj

rj : retorno esperado de
activo j.

j=1

sujeto a
n
X

qi, j : covarianza entre el


retorno del activo i y j.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj
i=1 j=1

Limite en la varianza del


portafolio (Markowitz).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

n
X

max
y

yj fraccin de capital
invertido en activo j.

rj yj

rj : retorno esperado de
activo j.

j=1

sujeto a
n
X

qi, j : covarianza entre el


retorno del activo i y j.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj
i=1 j=1

Limite en la varianza del


portafolio (Markowitz).
Problema de
Programacin Cnica
Quadrtica que puede
ser resuelto
eficientemente.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

n
X

max
y

yj fraccin de capital
invertido en activo j.

rj yj

rj : retorno esperado de
activo j.

j=1

sujeto a
n
X

qi, j : covarianza entre el


retorno del activo i y j.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj
i=1 j=1

Limite en la varianza del


portafolio (Markowitz).
Problema de
Programacin Cnica
Quadrtica que puede
ser resuelto
eficientemente.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Modelo Matemtico para Optimizacin de Portafolio

n
X

max
y

yj fraccin de capital
invertido en activo j.

rj yj

rj : retorno esperado de
activo j.

j=1

sujeto a
n
X

yj = 1

qi, j : covarianza entre el


retorno del activo i y j.

yj 0

Limite en la varianza del


portafolio (Markowitz).

j=1

v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

Problema de
Programacin Cnica
Quadrtica que puede
ser resuelto
eficientemente.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Extensiones del Modelo


1

Restricciones Combinatoriales:
lmites en el numero de activos en el portafolio.
Niveles mnimos invertidos en cada activo.
Hacen que el problema sea muy difcil de resolver.
(Bienstock, 1996; Chang et al., 2000; Maringer and
Kellerer, 2003; Bertsimas and Shioda, 2004,. . . ).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Extensiones del Modelo


1

Restricciones Combinatoriales:
lmites en el numero de activos en el portafolio.
Niveles mnimos invertidos en cada activo.
Hacen que el problema sea muy difcil de resolver.
(Bienstock, 1996; Chang et al., 2000; Maringer and
Kellerer, 2003; Bertsimas and Shioda, 2004,. . . ).

Medidas de riesgo ms all de la varianza:


lmites en la probabilidad de baja rentabilidad (e.g.
Prob(retorno 0.9) 0.8 y Prob(retorno 0.7) 0.97).
(Lobo et al. 1998, 2007).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Extensiones del Modelo


1

Restricciones Combinatoriales:
lmites en el numero de activos en el portafolio.
Niveles mnimos invertidos en cada activo.
Hacen que el problema sea muy difcil de resolver.
(Bienstock, 1996; Chang et al., 2000; Maringer and
Kellerer, 2003; Bertsimas and Shioda, 2004,. . . ).

Medidas de riesgo ms all de la varianza:


lmites en la probabilidad de baja rentabilidad (e.g.
Prob(retorno 0.9) 0.8 y Prob(retorno 0.7) 0.97).
(Lobo et al. 1998, 2007).

Considerar errores en la estimacin de los retornos


esperados rj :
Considerar una versin robusta del objetivo.
(Ceria and Stubbs, 2006).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
y

Modelo Markowitz.

rj yj

j=1

sujeto a
n
X

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
x, y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

Agregamos variables
binarias que indican si
invertimos en un activo.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2

i=1 j=1

yj xj

xj {0, 1}

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
x, y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

Agregamos variables
binarias que indican si
invertimos en un activo.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2

i=1 j=1

n
X
j=1

yj xj

xj {0, 1}

xj K

Limite es impuesto con


una restriccin lineal.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
x, y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

Agregamos variables
binarias que indican si
invertimos en un activo.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2

i=1 j=1

n
X
j=1

yj xj

xj {0, 1}

xj K

Limite es impuesto con


una restriccin lineal.
Problema de
Programacin Cnica
Quadrtica Mixta que es
difcil de resolver.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
x, y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

Agregamos variables
binarias que indican si
invertimos en un activo.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2

i=1 j=1

n
X
j=1

yj xj

xj {0, 1}

xj K

Limite es impuesto con


una restriccin lineal.
Problema de
Programacin Cnica
Quadrtica Mixta que es
difcil de resolver.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

lmites en el numero de activos en el portafolio


n
X

max
x, y

Modelo Markowitz.

rj yj

j=1

Permitimos invertir en a
lo mas K activos.

sujeto a
n
X

Agregamos variables
binarias que indican si
invertimos en un activo.

yj = 1

j=1

yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2

i=1 j=1

n
X
j=1

yj xj

xj {0, 1}

xj 10

Limite es impuesto con


una restriccin lineal.
Problema de
Programacin Cnica
Quadrtica Mixta que es
difcil de resolver.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Medidas de riesgo mas all de la varianza


qP P
n
n
Varianza:
i=1
j=1 qi, j yi yj .
Pn
Retorno: j=1 rj yj .
Prob(retorno w) puede ser aproximado por:
v
uX
n
n
X
u n X
rj yj w
qi, j yi yj
1 ()t
i=1 j=1

j=1

donde () es la distribucin de probabilidad de una


normal con media 0 y varianza 1.
Tambin es una restriccin de Problema de Programacin
Cnica Quadrtica.
1 = 0.8, w1 = 0.9 y 2 = 0.97, w2 = 0.7.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


n
X

max
x, y

rj yj

j=1

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X

xj 10

j=1

xj {0, 1}, yj 0
j
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

Modelo Markowitz con


lmites en el numero de
activos.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


n
X

max
x, y

rj yj

j=1

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X

xj 10

j=1

xj {0, 1}, yj 0
j
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

Modelo Markowitz con


lmites en el numero de
activos.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max

x, y, r

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X

xj 10

j=1

xj {0, 1}, yj 0
j
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1
n
X
j=1

rj yj r

Modelo Markowitz con


lmites en el numero de
activos.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max
x, y, r

Modelo Markowitz con


lmites en el numero de
activos.

xj 10

Suposicin: los retornos


esperados rj tienen una
distribucin normal
conjunta. Media es rj y
covarianza entre ri y rj
es si, j .

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X
j=1

xj {0, 1}, yj 0
j
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1
n
X
j=1

rj yj r

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max

x, y, r

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X

xj 10

j=1

xj {0, 1}, yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

n
X
j=1

v
uX
n
u n X
rj yj t
si, j yi yj r
i=1 j=1

Modelo Markowitz con


lmites en el numero de
activos.
Suposicin: los retornos
esperados rj tienen una
j distribucin normal
conjunta. Media es rj y
covarianza entre ri y rj
es si, j .
Versin robusta del
objetivo.
= nivel de seguridad.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max

x, y, r

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X

xj 10

j=1

xj {0, 1}, yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

n
X
j=1

v
uX
n
u n X
rj yj t
si, j yi yj r
i=1 j=1

Modelo Markowitz con


lmites en el numero de
activos.
Suposicin: los retornos
esperados rj tienen una
j distribucin normal
conjunta. Media es rj y
covarianza entre ri y rj
es si, j .
Versin robusta del
objetivo.
= nivel de seguridad.
Restriccin de Problema
de Programacin Cnica
Quadrtica.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max
x, y, r

Modelo Markowitz con


lmites en el numero de
activos.

xj 10

Suposicin: los retornos


esperados rj tienen una
distribucin normal
conjunta. Media es rj y
covarianza entre ri y rj
es si, j .

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X
j=1

xj {0, 1}, yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

n
X
j=1

v
uX
n
u n X
rj yj t
si, j yi yj r
i=1 j=1

Versin robusta del


objetivo.
= nivel de seguridad.
Restriccin de Problema
de Programacin Cnica
Quadrtica.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Considerar errores en retornos esperados rj


max
x, y, r

Modelo Markowitz con


lmites en el numero de
activos.

xj 10

Suposicin: los retornos


esperados rj tienen una
distribucin normal
conjunta. Media es rj y
covarianza entre ri y rj
es si, j .

s.a.
n
X

yj = 1,

j=1

yj xj ,

n
X
j=1

xj {0, 1}, yj 0
v
uX
n
u n X
t
qi, j yi yj 0.2
i=1 j=1

n
X
j=1

v
uX
n
u n X
rj yj 3t
si, j yi yj r
i=1 j=1

Versin robusta del


objetivo.
= nivel de seguridad.
Restriccin de Problema
de Programacin Cnica
Quadrtica.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

B&B para Programacin Entera No-Lineal


Branch-and-Bound bsico:
Relajacin del Problema.
Ramificacin.
Problema Relajado + Ramificacin: Subproblema.

Mtodos basados en relajacin no-lineal:


Relajan restricciones de integralidad.
Subproblema es un problema no-lineal convexo.

Mtodos basados en relajaciones polyhedrales:


Relajan restricciones de integralidad y no-lineales.
Subproblema es un problema lineal.
Reutilizan tecnologa para Programacin lineal entera y
aprovechan warm starts de simplex.
Dos Tipos:
1
2

Relajaciones polyhedrales por tangentes.


Relajaciones polyhedrales extendidas o por proyeccin
(Nuevo Mtodo).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

x1

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

c
x

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max x1 + x2
x
q
x12 + x22 2.5

x1 = x2 1.77
/ .
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

c
x

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max x1 + x2
x
q
x12 + x22 2.5

x1 = x2 1.77
/ .
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5

x1 = x2 1.77
/ .
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5
x1 1

x1 = 1, x2 2.29
/ .
Ramificacin:
x2 2 x2 3.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


x2

max
x

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5
x1 1

x1 = 1, x2 2.29
/ .
Ramificacin:
x2 2 x2 3.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


x2

max
x

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5
x1 1

x1 = 1, x2 2.29
/ .
Ramificacin:
x2 2 x2 3.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5
x1 1
x2 2

x1 = 1, x2 = 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Mtodos Basados en Relajacin No-Lineal


max

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
x1

max
x

x1 + x2
q
x12 + x22 2.5
x1 1
x2 2

x1 = 1, x2 = 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:

x1

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:

x1

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max
x

x1

x1 + x2
2.5 xi 2.5

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max
x

x1

x1 + x2
2.5 xi 2.5

x1 = x2 = 2.5
/ .
Cortes: xi b2.5c.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max
x

x1

x1 + x2
2.5 xi 2.5

x1 = x2 = 2.5
/ .
Cortes: xi b2.5c.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2
x1 = x2 = 2,
q
x1 2 + x2 2 > 2.5.

Corte: x1 + x2 2.5 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2
x1 = x2 = 2,
q
x1 2 + x2 2 > 2.5.

Corte: x1 + x2 2.5 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2

x2 = 2, x1 1.53
/ ,
q
2
2

x1 + x2 > 2.5.
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2

x2 = 2, x1 1.53
/ ,
q
2
2

x1 + x2 > 2.5.
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2

x2 = 2, x1 1.53
/ ,
q
2
2

x1 + x2 > 2.5.
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2

x2 = 2, x1 1.53
/ ,
q
2
2

x1 + x2 > 2.5.
Ramificacin:
x1 1 x1 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2
x1 1
x1 = 1, x2 = 2.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyhedrales Tangentes


max
x

x2

x1 + x2
q
x12 + x22 2.5
x1 , x2

Subproblema:
max x1 + x2
x

x1

2.5 xi 2

x1 + x2 2.5 2
x1 1
x1 = 1, x2 = 2.

Non-Linear Programm
Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Caractersticas de Relajaciones Polyhedrales


Tangentes

Restricciones no lineales
aproximada por cortes de primer
orden (gradiente, tangente,
benders).

+ dy

Cortes construidos en espacio


original.

x, y) C
x

Usualmente pocos cortes son


suficientes.
Convergencia puede ser lenta
(e.g. Restricciones cuadrticas).

n+p

Solucin: usar una


aproximacin polyhedral global
y fija.

(M

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyedrales
qP

d
2
j=1 xj

r, d = 2, = 0.41

(1

r
)

Se necesitan a lo menos
exp(d/(2(1 + ))2 )
restricciones lineales en el
espacio original.
Ben-Tal and Nemirovski
(2001) dan relajacin como la
proyeccin de un polyhedro
con O(d log(1/)) variables y
restricciones.
Glineur (2000) refina la
aproximacin y muestra que
no es prctica para
Programacin no-lineal
continua.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyedrales

)
r

r, d = 2, = 0.08

d
2
j=1 xj

(1

qP

Se necesitan a lo menos
exp(d/(2(1 + ))2 )
restricciones lineales en el
espacio original.
Ben-Tal and Nemirovski
(2001) dan relajacin como la
proyeccin de un polyhedro
con O(d log(1/)) variables y
restricciones.
Glineur (2000) refina la
aproximacin y muestra que
no es prctica para
Programacin no-lineal
continua.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyedrales

)
r

r, d = 2, = 0.08

d
2
j=1 xj

(1

qP

Se necesitan a lo menos
exp(d/(2(1 + ))2 )
restricciones lineales en el
espacio original.
Ben-Tal and Nemirovski
(2001) dan relajacin como la
proyeccin de un polyhedro
con O(d log(1/)) variables y
restricciones.
Glineur (2000) refina la
aproximacin y muestra que
no es prctica para
Programacin no-lineal
continua.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Relajaciones Polyedrales

)
r

r, d = 2, = 0.08

d
2
j=1 xj

(1

qP

Se necesitan a lo menos
exp(d/(2(1 + ))2 )
restricciones lineales en el
espacio original.
Ben-Tal and Nemirovski
(2001) dan relajacin como la
proyeccin de un polyhedro
con O(d log(1/)) variables y
restricciones.
Glineur (2000) refina la
aproximacin y muestra que
no es prctica para
Programacin no-lineal
continua.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

B&B Usando Relajacin Polyhedral Extendida


(proyeccin).
Reemplazar restricciones no-lineales por relajaciones
polyhedrales extendidas para precisin .
Obtenemos problema de Programacin lineal entera que
puede ser resuelto por software comercial (e.g. CPLEX).
Pequeas modificaciones al software comercial aseguran
obtener solucin exacta.
Obtencin de solucin exacta es independiente de
precisin .
Eleccin de precisin puede afectar velocidad.
Vielma, et. al, A Lifted Linear Programming
Branch-and-Bound Algorithm for Mixed Integer Conic
Quadratic Programs, IJOC.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Experimentos Computacionales
3 tipos de problemas de Optimizacin de portafolios:
Numero de activos disponibles: 20 y 30 (limite de inversin
el 10 activos).
Retornos estimados de acciones de S&P 500.
200 instancias en total.

Computador: Dual 2.4GHz Xeon Linux workstation with


2GB of RAM.
Solvers:
CPLEX 11 B&B de relajacin no-lineal (CPLEX QCP).
CPLEX 11 B&B de relajacin polyedral tangente (CPLEX
LP).
Algoritmo B&B de relajacin polyedral extendida basado en
CPLEX 11 ( LP() -BB ).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Tiempos de Solucin Promedio [s]


100

10

0.1
LP(!)-BB

CPLEX QCP

CPLEX LP

Resultados Computacionales

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Tiempos de Solucin (Desviacin Estndar) [s]


1000

100

10

0.1
LP(!)-BB

CPLEX QCP

CPLEX LP

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Using Ben-Tal Nemirovski Approximation to Exploit


Mixed Integer Linear Programming Solver Technology
Lifted linear programming relaxation: Polyhedron
P n+p+q such that

C {(x, y)

Rn+p : v Rq s.t. (x, y, v) P} C

Use a state of the art MILP solver to solve


max cx + dy
x,y,v

s.t.

(x, y, v) P
x

(MILP)

Problem: Obtained solution might not even be feasible for


MINLP
Solution: Modify Solve of MILP

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Idea: Simulate NLP Branch-and-Bound


Problem solved in NLP B&B node (lk , uk )
zNLP(lk ,uk ) := max
x,y

Z2n is:

cx + dy
(x, y) C

s.t.

Rn+p

(NLP(lk , uk ))

lk x uk
Problem solved by state of the art MILP solver is:
zLP(lk ,uk ) := max cx + dy
x,y,v

s.t.

(x, y, v) P
l k x uk

(LP(lk , uk ))

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Idea: Simulate NLP Branch-and-Bound


Problem solved in NLP B&B node (lk , uk )
zNLP(lk ,uk ) := max
x,y

Z2n is:

cx + dy
(x, y) C

s.t.

Rn+p

(NLP(lk , uk ))

lk x uk
Problem solved by state of the art MILP solver is:
zLP(lk ,uk ) := max cx + dy
x,y,v

s.t.

(x, y, v) P

(LP(lk , uk ))

l k x uk
Advantages of second subproblem:
Algorithmic Advantage: Simplex has warm starts.
Computational Advantage: Use MILP solvers technology.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Idea: Simulate NLP Branch-and-Bound


Problem solved in NLP B&B node (lk , uk )
zNLP(lk ,uk ) := max
x,y

Z2n is:

cx + dy
(x, y) C

s.t.

Rn+p

(NLP(lk , uk ))

lk x uk
Problem solved by state of the art MILP solver is:
zLP(lk ,uk ) := max cx + dy
x,y,v

s.t.

(x, y, v) P

(LP(lk , uk ))

l k x uk
Issues:
1
2

Integer feasible solutions may be infeasible for C.


Need to be careful when fathoming by integrality.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

First Issue: Correcting Integer Feasible Solutions

Let (x , y , v ) P such that x

Zn, but (x, y) / C.

We reject (x , y , v ) and try to correct it using:


zNLP(x ) := max cx + dy
y

s.t.
(x , y) C

Rn+p.

(NLP(x ))

This can be done for solutions found by heuristics, at


integer feasible nodes, etc.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Second Issue: Correct Fathoming by Integrality

Suppose that for a node (lk , uk ) with lk 6= uk we have that


the solution (x , y , v ) of LP(lk , uk ) is such that x n

(x , y )

(x , y )

If
C then
is also the optimal for NLP(lk , uk )
and we can fathom by integrality.
If (x , y )
/ C it is not sufficient to solve NLP(x ):
Problem: Corrected solution is not necessarily optimal for
NLP(lk , uk ).
Solution: Solve NLP(lk , uk ) and process node according to
its solution.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Second Issue: Correct Fathoming by Integrality

Suppose that for a node (lk , uk ) with lk 6= uk we have that


the solution (x , y , v ) of LP(lk , uk ) is such that x n

(x , y )

(x , y )

If
C then
is also the optimal for NLP(lk , uk )
and we can fathom by integrality.
If (x , y )
/ C it is not sufficient to solve NLP(x ):
Problem: Corrected solution is not necessarily optimal for
NLP(lk , uk ).
Solution: Solve NLP(lk , uk ) and process node according to
its solution.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Second Issue: Correct Fathoming by Integrality

Suppose that for a node (lk , uk ) with lk 6= uk we have that


the solution (x , y , v ) of LP(lk , uk ) is such that x n

(x , y )

(x , y )

If
C then
is also the optimal for NLP(lk , uk )
and we can fathom by integrality.
If (x , y )
/ C it is not sufficient to solve NLP(x ):
Problem: Corrected solution is not necessarily optimal for
NLP(lk , uk ).
Solution: Solve NLP(lk , uk ) and process node according to
its solution.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

(x, y) B 2 (2) (MINLP)

max y
x,y

(x, y) [2, 2]2


x

(LP)

LP(, 1):
x = 1, y = 2,
(x, y)
/ B 2 (2).
NLP(x ) (xcor , ycor ).
If we fathom we loose
optimum (0, 2)!

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)


(x , y )

max y
x,y

(x, y) [2, 2]2


x

(LP)

LP(, 1):
x = 1, y = 2,
(x, y)
/ B 2 (2).
NLP(x ) (xcor , ycor ).
If we fathom we loose
optimum (0, 2)!

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)


(x , y )

(xcor , ycor )

max y
x,y

(x, y) [2, 2]2


x

(LP)

LP(, 1):
x = 1, y = 2,
(x, y)
/ B 2 (2).
NLP(x ) (xcor , ycor ).
If we fathom we loose
optimum (0, 2)!

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)


(x , y )

(xcor , ycor )

max y
x,y

(x, y) [2, 2]2


x

(LP)

LP(, 1):
x = 1, y = 2,
(x, y)
/ B 2 (2).
NLP(x ) (xcor , ycor ).
If we fathom we loose
optimum (0, 2)!

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)


(x , y )

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 1:
Branch: x 0 x 1.
Solve LP(, 0).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

(x, y) B 2 (2) (MINLP)

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 1:
Branch: x 0 x 1.
Solve LP(, 0).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

(x, y) B 2 (2) (MINLP)

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 1:
Branch: x 0 x 1.
Solve LP(, 0).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)

(x , y )

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 1:
Branch: x 0 x 1.
Solve LP(, 0).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

(x, y) B 2 (2) (MINLP)

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 2:
Solve NLP(, 1).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Correcting Integer Feasible Solutions is Not Enough


max y
x,y

y
c

(x, y) B 2 (2) (MINLP)

(x , y )

max y
x,y

(x, y) [2, 2]2


x

(LP)

Solution 2:
Solve NLP(, 1).
We get optimum (0, 2).

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Instance Data

Maximum number of stocks K = 10.


Maximum risk = 0.2.
Shortfall constraints: 1 = 80%, W1low = 0.9, 2 = 97%,
W2low = 0.7 (Lobo et al., 1998, 2007).
Data generation for Classical and Shortfall from S&P 500
data following Lobo et al. (1998), (2007).
Data generation for Robust from S&P 500 data following
Ceria and Stubbs (2006).
Riskless asset included for Shortfall.
Random selection of n stocks out of 462.
100 instances for n {20, 30, 40, 50}, 10 for n {100, 200}.

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Average Solve Times [s] for n {20, 30}


10000

LP(!)-BB
I-QG
I-Hyb
I-BB
Cplex

1000

100

10

0.1
classical(20) classical(30) shortfall(20)

shortfall(30)

robust(20)

robust(30)

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Performance Profile for n {20, 30}


1

0.8

0.6

0.4

0.2
I-BB
I-Hyb
I-QG
Cplex
LP(!)-BB

0
1

10

100

1000

10000

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Average Solve Times [s] for n {40, 50}


10000

LP(!)-BB
I-Hyb
I-BB
Cplex

1000

100

10

0.1
classical(40) classical(50) shortfall(40)

shortfall(50)

robust(40)

robust(50)

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Performance Profile for n {40, 50}


1

0.8

0.6

0.4

0.2
I-BB
I-Hyb
Cplex
LP(!)-BB

0
1

10

100

1000

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Average Solve Times [s] for n {100, 200}


100000

LP(!)-BB
I-BB
Cplex

10000

1000

100

10

1
classical(100)

shortfall(100)

robust(100)

robust(200)

Introduccion

Optimizacin de Portafolios

B&B para Programacin Entera No-Lineal

Resultados Computacionales

Performance Profile for n {100, 200}


1

0.8

0.6

0.4

0.2

I-BB
Cplex
LP(!)-BB

0
1

10

You might also like