Portfolio Selection How to Integrate Complex Constraints
Portfolio Selection How to Integrate Complex Constraints
{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.
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
MVQP
min V (x) = xT Qx (2a)
T
x µ=E (2b)
xT e = 1 (2c)
Ax ≤ b (2d)
x≥0 (2e)
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.
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 :
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%.
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.
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].
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.
7
3. The final weight xi is calculated:
u + c¯i (1 − |Υ|u) if i ∈ Υ
xi = (7)
0 otherwise
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
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.
• 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.
• 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.
9
• Metaheuristics are easy to parallelize.
Disadvantages of metaheuristics:
• More work has to be put into the design of the algorithms than when
a mixed integer solver is used.
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.
[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.
[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.
[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.
11
[18] Y. Crama and M. Schyns. Simulated annealing for complex portfolio se-
lection problems. European Journal of Operational Research, (150):546–
571, 2003.
12