0% found this document useful (0 votes)
8 views

Portfolio Selection How to Integrate Complex Constraints

This paper discusses the challenges of integrating complex constraints into the standard Mean-Variance model for portfolio selection, highlighting that traditional algorithms struggle with constraints like cardinality and buy-in thresholds. It presents two approaches to address these issues: using mixed integer programming and metaheuristic methods, detailing their respective advantages and disadvantages. The authors conclude by emphasizing the need for effective algorithms to handle these constraints in practical portfolio management.

Uploaded by

mrweisu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Portfolio Selection How to Integrate Complex Constraints

This paper discusses the challenges of integrating complex constraints into the standard Mean-Variance model for portfolio selection, highlighting that traditional algorithms struggle with constraints like cardinality and buy-in thresholds. It presents two approaches to address these issues: using mixed integer programming and metaheuristic methods, detailing their respective advantages and disadvantages. The authors conclude by emphasizing the need for effective algorithms to handle these constraints in practical portfolio management.

Uploaded by

mrweisu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Portfolio Selection:

How to Integrate Complex Constraints

Michael Stein∗ , Jürgen Branke, and Hartmut Schmeck

Institute for Applied Informatics and Formal Description Methods,


University of Karlsruhe (TH)

{stein,branke,schmeck}@aifb.uni-karlsruhe.de

June 1, 2005


will attend the conference and present the paper
Portfolio Selection:
How to Integrate Complex Constraints

Abstract
For the standard Mean-Variance model for portfolio selection with linear
constraints, there are several algorithms that can efficiently compute both
a single point on the Pareto front and even the whole front. Unfortunately,
commonly used constraints (e.g. cardinality constraints or buy-in thresh-
olds) result in the optimization problem to become intractable by standard
algorithms. In this paper, two paradigms to deal with this kind of constraint
are presented and their advantages and disadvantages are highlighted.

keywords: portfolio selection, complex constraints, mixed integer quadratic


programming, metaheuristic, constraint handling
1 Introduction
Mean-Variance optimization is probably the most popular approach to port-
folio selection. It was introduced more than 50 years ago in the pioneering
work by Markowitz [1, 2]. The basic assumptions in his theory are a ra-
tional investor with either multivariate normally distributed asset returns
or, in the case of arbitrary returns, a quadratic utility function [3]. If these
assumptions are valid, Markowitz has shown that the optimal portfolio for
the investor lies on the Mean-Variance Efficient Frontier. (He defined a
portfolio of financial assets as efficient, if and only if for any given expected
return, there is no other portfolio with lower variance, and for any given vari-
ance there is no other portfolio with higher expected return. The Efficient
Frontier consists of all efficient portfolios.)
Computationally efficient algorithms that calculate a single point or even
the whole Efficient Frontier have been discussed in a large number of pub-
lications. (For an introduction see e.g. [4], [5], and [6].)
Unfortunately, some difficulties crop up when this approach is used in mutual
fund management. One of the main problems is caused by the obligation of
the fund managers to comply with both contractual constraints defined by
the prospectus of their particular fund and legal constraints laid down in the
respective laws of the country where the shares of the fund are offered. Some
– albeit not too many – of these rules can lead to constraints that can’t be
easily expressed in a way that permits standard algorithms to handle them.
Three examples for such constraints are the so called cardinality constraints,
buy-in thresholds, and a rule especially important for German mutual funds,
the 5-10-40-constraint.
Cardinality constraints normally are rules that determine the number of
securities which are allowed to be part of the portfolio.
Buy-in thresholds set a lower limit on all assets that are part of the portfolio.
The 5-10-40-constraint is based on §60(1) of the German investment law [7].
It defines an upper limit for each individual asset and for the sum of all
“heavyweights” in the portfolio.
Taking into account these more complex constraints, two quite different ap-
proaches can be taken to find solutions for the portfolio selection problem.
The first one uses a suitable mixed integer solver, the second one uses meta-
heuristics to compute the solutions.
This paper is organized as follows:
In Section 2 we formulate the standard model for portfolio selection and
present several categories of constraints that – when included – make the
optimization problems difficult to handle. Section 3 describes the mixed
integer and the metaheuristic approach to solve these problems. The ad-
vantages and disadvantages of these algorithms are discussed in Section 4.
Section 5 concludes with a short summary.

1
2 Mean-variance Model and Extensions
2.1 The Standard Model
The standard Mean-Variance (M-V) model can be described as a bicriterial
optimization problem:

SMVM

min V (x) = xT Qx (1a)


max E(x) = xT µ (1b)
T
x e=1 (1c)
Ax ≤ b (1d)
x≥0 (1e)
where the element xi of the vector x denotes the fraction of the budget
invested in asset i. Q is the covariance matrix, e represents the unit vector,
µ is the vector of expected returns of all assets. An this formulation of the
M-V-model it is assumed that all additional constraints beside the budget
constraint (1c) are expressed as inequalities (1d). A denotes the matrix of
inequality coefficients with b as the respective right hand sides. Additionally,
we assume that short sales are not allowed (1e).
There exist several different formulations for the linear constraints of the op-
timization problem which can be easily transformed into each other without
any loss of information ([6] pp. 24-27).
Depending on the intention of the optimization, there are two classical ap-
proaches to solve this problem:
1. If the focus is put on a single point on the Efficient Frontier, we can
assume the expected return E of the portfolio is fixed. This removes
one optimization criterion and adds an additional constraint. The
resulting optimization problem is – as the covariance matrix is positive
semidefinite – a convex quadratic programming problem (QP):

MVQP
min V (x) = xT Qx (2a)
T
x µ=E (2b)
xT e = 1 (2c)
Ax ≤ b (2d)
x≥0 (2e)

The solution can easily be computed using a QP-solver from any of


the more advanced optimization software packages. A list of suitable
programs and libraries can be found at [8].

2
Such a solution, however, represents only one point on the Efficient
Frontier. If necessary, an approximation of the complete Pareto front
can be computed by increasing (or decreasing) E iteratively.

2. If it is desired to calculate the complete Efficient Frontier, the obvious


choice is an active set algorithm for parametric quadratic program-
ming (see e.g. [9]), whose most known variant in the field of portfolio
selection is the Critical Line Algorithm by Markowitz [2, 6, 10].
Starting from one point on the Efficient Frontier, the algorithm com-
putes a sequence of so called corner portfolios x1 , . . . , xm . These
corner portfolios define the complete Efficient Frontier. If xi and
xi+1 are adjacent corner portfolios with expected returns Ei and Ei+1 ,
Ei ≤ Ei+1 , then for every Eλ with Eλ = λEi + (1 − λ)Ei+1 , λ ∈ [0, 1]
the optimal portfolio xλ is calculated as xλ = λxi + (1 − λ)xi+1 .
For an efficient implementation of the Critical Line Algorithm see [5]

2.2 Extensions: Complex Constraints


This section is focused on three types of constraints: buy-in thresholds, car-
dinality constraints, and the 5-10-40-constraint. Portfolio selection problems
that contain any of the three types can’t be solved with conventional means
(i.e. QP-solvers or the Critical Line Algorithm). Minimum transaction lots
are another type of “complex” constraint often mentioned in the related
articles (see e.g. [11, 12, 13, 14]). They are not considered any further,
however, as several managers of mutual funds have stated in interviews that
minimum transaction lots are not relevant in their daily work.

Buy-In Thresholds
Buy-in thresholds prevent assets with small weights from being included in
the portfolio. Assets either are above a lower bound l, or they are not part
of the portfolio at all. The main reason for such a constraint is to reduce
transaction costs.
As shown in [12], if there are N possible investment alternatives, the buy-in
threshold constraint can be formulated using binary variables ρi , i = 1 . . . N
in the following way :

lρi ≤ xi ≤ uρi ρi ∈ {0, 1} i = 1...N

(u denotes the upper bound for each individual asset. )


Unfortunately, binary variables can’t be handled by either a normal QP-
solver or the Critical Line Algorithm. Binary variables are inherently non-
convex, and convexity of the search space and the objective function(s) is
a prerequisite for both algorithms. But even if it is possible to model the
problem without binary variables, the search space is nonconvex:

3
Proof: Assume the portfolios x and y are valid, and that variable xi = 0,
and variable yi = l. Obviously any convex combination of x, y, apart from
x and y themselves, is not valid.

Cardinality Constraints
Investors and fund managers often wish to control the number of assets in
the fund they own/manage:
The fund manager might – due to monitoring reasons, or in order to re-
duce transaction costs – set an upper limit on the number of securities in a
portfolio.
The investor, however, might prefer a well diversified portfolio, and therefore
sets a minimum number of assets which the mutual fund must contain.
Horniman et al. pointed out in [12], that such a constraint is intrinsically
linked with buy-in thresholds: on the one hand, a high threshold limits the
number of assets the portfolio can contain, and on the other hand, if there is
no threshold at all, any xi can be set to a very small value instead of being
zero, meaning that the cardinality constraint doesn’t effectively influence
the solution.
The cardinality constrained portfolio selection problem with buy-in thresh-
old and fixed return E can now be formulated as:

QP-CARD-TH
min V (x) = xT Qx (3a)
T
x µ=E (3b)
T
x e=1 (3c)
lρi ≤ xi ≤ uρi ρi ∈ {0, 1} i = 1...N (3d)
n
X
ρi (≥, ≤) N (3e)
i=1

(3e) describes either an upper bound or a lower bound on the number of as-
sets in the portfolio. To simplify the model, the additional linear constraints
– beside the upper and lower bounds on the assets – have been removed.
The nonconvexity of the search space prevents the classical methods from
being applicable here as well.

The 5-10-40-Constraint
§60(1) of the German investment law [7] states, roughly translated, that
securities of the same issuer are allowed to amount to up to 5% of the
net asset value of the mutual fund. They are allowed to amount to 10%,
however, if the total of all of these assets is less than 40% of the net asset
value. This constraint is especially interesting because it is the only one

4
based on German law that can’t be incorporated into the standard model
in the form of linear constraints.
Using the vector ρ consisting of binary variables ρi , i = 1, . . . , N , the M-
V optimization problem with 5-10-40-constraint and fixed return E can be
formulated as follows:

QP-5-10-40
min V (x) = xT Qx (4a)
T
x µ=E (4b)
T
x e=1 (4c)
T
ρ x ≤ 0.4 (4d)
x − 0.05ρ ≤ 0.05e (4e)
ρi ∈ {0, 1} ∀i = 1, . . . , N (4f)
x≥0 (4g)
Obviously, this problem can’t be handled by either a QP-solver or the Crit-
ical Line Algorithm. The search space is nonconvex here as well.
Proof: Assume that the portfolios x and y are valid, and that xi = 0.1, i =
1, . . . , 4 and xj = 0.05, j = 5, . . . , 16. Assume further that yi = xi for all i
except y4 = 0.05 and x5 = 0.1. Any convex combination of x and y, apart
from x and y themselves, is not valid: the sum of all assets with xi > 0.05
is obviously larger than 40%.

3 Algorithms for Solving Extensions of the M-V-


Model
3.1 Mixed Integer Approach
The extended M-V-model with buy-in thresholds and cardinality constraints
presented in Section 2 can be categorized as a mixed integer programming
problem with a quadratic objective function (MIQP). Unfortunately, due
to constraint (4d), problem QP-5-10-40 does not fit into this category. By
introducing an additional vector t of size N , the problem can be transformed
into an equivalent MIQP-problem:

QP-5-10-40-MIQP
min V (x) = xT Qx (5a)
xT µ = E xT e = 1 (5b)
x − 0.05ρ ≤ 0.05e (5c)
t − 0.1ρ ≤ 0 t−x≤0 (5d)
T
x + 0.1ρ − t ≤ 0.1e t e ≤ 0.4 (5e)
x, t ≥ 0 ρi ∈ {0, 1} ∀i = 1, . . . , N (5f)

5
This modification has doubled the number of continuous variables, but the
number of discrete variables remains the same.
Any of the available MIQP-solvers can be used to solve the model QP-
CARD-TH (with or without cardinality constraint) or the model QP-5-10-
40-MIQP. Software packages that contain such a solver can be found at [8],
although – compared to the number of available QP-solvers – there are by far
fewer programs with the required capability. Depending on the performance
of the mixed integer code of the solver and the difficulty of the optimization
problem, calculation time may vary strongly when this approach is used. If
e.g. a problem with an upper bound on the number of securities is solved,
and the cardinality constraint is not binding due to the fact that the number
of assets is smaller than the upper bound, the runtime is essentially the same
as if there were no cardinality constraint at all, given the MIQP-solver works
efficiently. There is, however, no guarantee for getting the optimal portfolio
quickly. If only a fixed calculation time is available, and the time runs out,
the best valid portfolio calculated so far can be used instead — a normal
practice when working with mixed integer solvers.
For further information about the mixed integer approach to the cardinal-
ity constrained problem without using an external MIQP-solver, the reader
is referred to Bienstock [15]. Bienstock examined computational complex-
ity of the problem, tested a self-developed branch-and-cut algorithm using
disjunctive cuts, and discussed some of the implementation problems that
occurred.
Jobst, Horniman et al. [12] use a branch-and-bound algorithm to solve the
cardinality constrained problem with buy-in thresholds as well as a portfolio
tracking problem. As they calculate many points on the efficient frontier, the
available time is too short for individually solving each MIQP to optimality.
Therefore, they limit the number of nodes for each point of expected return
E in the search tree of the branch-and-bound algorithm. To speed up the
algorithm further, a previously calculated solution for an adjacent point is
used as a warm start solution for the new value of expected return.

3.2 Metaheuristic Approaches


The term metaheuristic normally describes an optimization principle that
can be applied to not only one problem type, but is widely usably for many
different problem categories. Very often, the basic idea behind a metaheuris-
tic is taken from some naturally appearing phenomenon, be it a physical
process like Simulated Annealing (SA) or biologically inspired algorithms
like Ant Algorithms or Evolutionary Algorithms (EAs).

6
Related Work on the Use of Metaheuristics for Portfolio Selection
There are several publications discussing the use of metaheuristics to solve
portfolio selection problems that have extensions which make the problem
intractable with classical means.
Chang et al. [16] used a Genetic Algorithm, Tabu Search, and Simulated
Annealing to solve portfolio selection problems where each solution had to
contain a predetermined number of assets. Schaerf [17] improved on the
work of Chang et al. by testing several neighborhood relations for Tabu
Search.
Crama and Schyns [18] applied Simulated Annealing to a portfolio selection
problem with cardinality constraints, turnover and trading restrictions.
Derigs and Nickel [19] used Simulated Annealing to solve a variation of
Problem QP-5-10-40 with an additional cardinality constraint. In [20] they
expanded their previous work, but the focus was put on developping a de-
cision support system for portfolio selection.
A completely different approach was followed in [13, 14]. Streichert et al.
did not set the expected return E as constant and then solved a separate
optimization problem for each E, but applied a multi-objective EA instead.
The big advantage of multi-objective EAs is their capability to produce an
approximation of the complete Pareto Front in one run, which saves a lot of
time. For further details concerning multi-objective EAs see e.g. [21].

Coding of Solutions and Constraint Handling


Common to all successful applications of metaheuristics in the field of
portfolio selection seems to be the use of a vector of continuous variables
c = (c1 , . . . , cN )T to represent the weights of the individual assets. Often,
but not always, an additional vector of binary variables k = (k1 , . . . , kN )T
is used to indicate if the asset is included in the portfolio at all. The latter
vector permits an easy way to handle cardinality constraints.
If we have a portfolio selection problem that contains a cardinality constraint
and buy-in thresholds, the decoding of the two vectors to get the actual
portfolio could work as follows (see e.g. [16]):
Example 1

1. If N
P
i=1 ki is more or less than the required cardinality, elements of k
are set to 0 or 1 accordingly. The selection criterion that determines
which elements are changed could be random or follow given rules.

2. The vector c is normalized:


ci
c¯i = P (6)
j∈Υ ci

where Υ is the set of all i with ki = 1.

7
3. The final weight xi is calculated:

u + c¯i (1 − |Υ|u) if i ∈ Υ
xi = (7)
0 otherwise

(|Υ| denotes the number of elements in Υ.)

There are three obvious ways to integrate constraints into metaheuristic


algorithms:

• Integrating the constraint directly into the coding of the solution, so


that obtaining an invalid solution is not possible.
In example 1, the budget constraint N
P
i=1 xi = 1 is always fulfilled:

N
X X ci
xi = (u + P (1 − |Υ|u))
i=1 i∈Υ j∈Υ ci
X ci X ci
= |Υ|u + P − P |Υ|u = |Υ|u + 1 − |Υ|u
i∈Υ j∈Υ ci i∈Υ j∈Υ ci

In order to guarantee that no infeasible solutions are constructed, the


operators that modify existing or create new solutions have to be
adapted to an inherently coded constraint. This is not always pos-
sible, especially when there are many constraints or the constraints
are quite complex.

• Using a repair algorithm if an invalid solution is constructed.


In example 1, this was done in the first step to guarantee the compli-
ance with the cardinality constraint.
The problems with using this method are twofold: first, if the repair
algorithm is not constructed well, the metaheuristic may be pushed
into a suboptimal direction of the search space, an second, if there are
many constraints handled in this fashion, it gets quite complicated to
construct such a repair algorithm.

• Introducing a penalty term into the objective function for constraints


that are not fulfilled.
One problem with this approach is that the best solutions found by the
algorithm don’t have to be valid, especially when tho optimal solution
is situated at the edge of the search space. Another disadvantage is
the difficulty of incorporating a large number of constraints.

An extensive list of references on constraint-handling techniques used with


EAs can be found at [22]. [23] is a starting point if the reader is interested
in alternative techniques to handle constraints in Evolutionary Algorithms.

8
4 Comparison of Mixed Integer Solvers and Meta-
heuristics
The following list describes those advantages and disadvantages of MIQP-
solvers and metaheuristics which the authors find the most compelling. The
intention of the list is to give the reader a little support in taking the right
decision, should it become necessary to select one of the two approaches for
a portfolio selection problem.

Advantages of the mixed integer approach:

• If the algorithm terminates, the solution is guaranteed to be optimal.

• Even if the solver does not terminate in the given time, the best feasible
solution found so far is often quite good. (The reader is referred to
[12] for comparative test results).

• The user can work with several modelling languages (e.g. AMPL,
GAMS), which give access to advanced solvers even if he has no pre-
vious programming experience.

• The most important constraint category, linear constraints only con-


taining continuous variables, are easily integrated in large numbers.

Disadvantages of the mixed integer approach:

• For large problems, there is no guarantee that the algorithm terminates


in an acceptable amount of time.

• If a problem does not fit into one of the well known categories, even
with extensive modelling experience, it is often not obvious how to
transform the problem into any of those categories. Sometimes, the
transformation is not possible at all.

• The Efficient Frontier can only be calculated pointwise; a mixed integer


version of the Critical Line Algorithm is not known.

Advantages of metaheuristics for portfolio selection:

• The algorithms work even if the objective function is changed and


another risk measure is used.

• Special constraints (e.g. cardinality constraints) are easily integrated.

• Many software libraries that implement metaheuristics are freely avail-


able.

• When using a multi-objective EA, the complete Pareto front can be


calculated in one algorithm run.

9
• Metaheuristics are easy to parallelize.

Disadvantages of metaheuristics:

• The performance of the tested metaheuristics was poor in comparison


to a mixed integer approach (see [12]).

• More work has to be put into the design of the algorithms than when
a mixed integer solver is used.

• There exist many libraries that offer metaheuristics in an adaptable


form, but programming experience is required nevertheless.

• Metheuristics require extensive parameter tuning.

5 Conclusion
In this paper, the standard M-V-model for portfolio selection as well as
several extensions have been presented. Both the mixed integer quadratic
programming approach and the use of metaheuristics to compute an ac-
ceptable solution have been discussed, and their respective strong and weak
points have been highlighted. An interesting idea for future research could
be the (partial) integration of both paradigms.

Acknowledgements
The first author would like to gratefully acknowledge financial support by
the Schleicher Foundation.

References
[1] H. M. Markowitz. Portfolio Selection. Journal of Finance, 7:77–91,
1952.

[2] H. M. Markowitz. The Optimization of a Quadratic Function Subject


to Linear Constraints. Naval Research Logistics Quarterly, 3:111–133,
1956.

[3] Chi-fu Huang and Robert H. Litzenberger. Foundations for Financial


Economics. Elsevier Science Publishing Co., Inc., 1988.

[4] Edwin Elton, Martin Gruber, Stephen Brown, and William Goetzmann.
Modern Portfolio Theory and Investment Analysis. John Wiley and
Sons, 6th edition, 2003.

10
[5] Andre F. Perold. Large-Scale Portfolio Optimization. Management
Science, 30(10):1143–1160, Okt. 1984.

[6] H. M. Markowitz. Mean-Variance Analysis in Portfolio Choice and


Capital Markets. Blackwell Publishers, 1987.

[7] Investmentgesetz (InvG). online:


http://www.bafin.de/gesetze/invg.htm, 2004.

[8] Optimization software guide. online:


http://www-fp.mcs.anl.gov/otc/Guide/SoftwareGuide/, 2005.

[9] M. J. Best. An Algorithm for the Solution of the Parametric Quadratic


Programming Problem. In H. Fischer, B. Riedmüller, and S. Schäffler,
editors, Applied Mathematics and Parallel Computing, pages 57–76.
Physica, 1996.

[10] Markus Rudolf. Algorithms for Portfolio Optimization and Portfolio


Insurance. Dissertation, Hochschule Sankt Gallen, 1994.

[11] Renata Mansini and Maria Grazia Speranza. Heuristic algorithms for
the portfolio selection problem with minimum transaction lots. Euro-
pean Journal of Operational Research, (114):219–233, 1999.

[12] M. D. Horniman, N. J. Jobst, C. A. Lucas, and G. Mitra. Computa-


tional Aspects of Alternative Portfolio Selection Models in the Presence
of Discrete Asset Choice Constraints. Quantitative Finance, 1:489–501,
2001.

[13] Felix Streicher, Holger Ulmer, and Andreas Zell. Evolutionary Algo-
rithms and the Cardinality Constrained Portfolio Optimization Prob-
lem. In International Conference on Operations Research, 2003.

[14] Felix Streichert, Holger Ulmer, and Andreas Zell. Comparing Discrete
and Continuous Genotypes on the Constrained Portfolio Selection Prob-
lem. In Genetic and Evolutionary Computation Conference, 2004.

[15] Daniel Bienstock. Computational Study of a Family of Mixed-


Integer Quadratic Programming Problems. Mathematical Program-
ming, 74(2):121–140, 1996.

[16] T.-J. Chang, N. Meade, J. B. Beasley, and Y. Sharaiha. Heuristics for


cardinality constrained portfolio optimisation. Computers & Operations
Research, 27:1271–1302, 2000.

[17] Andrea Schaerf. Local Search Techniques for Constrained Portfolio


Selection Problems. Computational Economics, 20(3):170–190, 2002.

11
[18] Y. Crama and M. Schyns. Simulated annealing for complex portfolio se-
lection problems. European Journal of Operational Research, (150):546–
571, 2003.

[19] Derigs U. and Nickel H.-H. On a Metaheuristic-Based DSS for Portfolio


Optimization and Managing Investment Guideleines. In Metaheuristics
International Conference, 2001.

[20] U. Derigs and Nickel N.-H. Meta-Heuristic Based Decision Support


for Portfolio Optimization with a Case Study on Tracking Error Mini-
mization in Passive Portfolio Management. OR Spectrum, 25:345–378,
2003.

[21] K. Deb. Multi-Objective Optimization using Evolutionary Algorithms.


Wiley, 2001.

[22] List of references on constraint-handling techniques used with evolu-


tionary algorithms. online:
http://www.cs.cinvestav.mx/~constraint/, 2005.

[23] Alternative techniques to handle constraints using evolutionary algo-


rithms. online:
http://www.lania.mx/~ccoello/constraint.html, 2005.

12

You might also like