ArticlePDF Available

Abstract and Figures

We study the problem of finding sparse, mean reverting portfolios based on multivariate historical time series. After mapping the optimal portfolio selection problem into a generalized eigenvalue problem, we propose a new optimization approach based on the use of simulated annealing. This new method ensures that the cardinality constraint is automatically satisfied in each step of the optimization by embedding the constraint into the iterative neighbor selection function. We empirically demonstrate that the method produces better mean reversion coefficients than other heuristic methods, but also show that this does not necessarily result in higher profits during convergence trading. This implies that more complex objective functions should be developed for the problem, which can also be optimized under cardinality constraints using the proposed approach.
Content may be subject to copyright.
Algorithmic Finance 2 (2013) 197–211 197
DOI 10.3233/AF-13026
IOS Press
Sparse, mean reverting portfolio selection
using simulated annealing
Norbert Fogarasiaand Janos Levendovszkyb
Department of Networked Systems and Services, Budapest University of Technology and Economics,
Budapest, Hungary
aE-mail: fogarasi@hit.bme.hu
bE-mail: levendov@hit.bme.hu
Abstract. We study the problem of finding sparse, mean reverting portfolios based on multivariate historical time series. After
mapping the optimal portfolio selection problem into a generalized eigenvalue problem, we propose a new optimization approach
based on the use of simulated annealing. This new method ensures that the cardinality constraint is automatically satisfied in each
step of the optimization by embedding the constraint into the iterative neighbor selection function. We empirically demonstrate
that the method produces better mean reversion coefficients than other heuristic methods, but also show that this does not
necessarily result in higher profits during convergence trading. This implies that more complex objective functions should be
developed for the problem, which can also be optimized under cardinality constraints using the proposed approach.
Keywords: mean reversion, convergence trading, parameter estimation, stochastic optimization, simulated annealing.
1. Introduction
Ever since publication of the seminal paper of
Markowitz (1952), the selection of portfolios which
are optimal in terms of risk-adjusted returns has been
an active area of research both by academics and
financial practitioners. A key finding of Markowitz
is that diversification, as a means of reducing the
variance and therefore increasing the predictability of
an investment portfolio, is of paramount importance
even at the cost of reducing expected return. The
resulting, so-called “mean-variance” approach to
portfolio selection involves tracing out the surface
of efficient portfolios, which can be found via
quadratic programming and successfully applied by
practitioners (Konno and Yamazaki, 1991; Feiring
et al., 1994). Recent improvements to the model have
considered including more complex measures of risk
(Elton et al., 2007), transaction costs (Adcock and
Meade, 1994; Yoshomito, 1996) and sparsity con-
straints (Streichert et al., 2003; Anagnostopoulos and
Mamanis, 2011) to this basic model. These additional
constraints have made the portfolio selection problem
significantly more complex, justifying the use of
various heuristic methods, such as genetic algorithms
(Loraschi et al., 1995; Arnone et al., 1993), neural
networks (Fernández and Gómez, 2007) and even
simulated annealing (Chang et al., 2000; Armananzas
and Lozano, 2005), which is also used in this paper. A
comprehensive study of the metaheuristics in portfolio
selection can be found in Di Tollo and Rolli (2008).
At the same time, mean reversion, as a classic
indicator of predictability, has also received a great
deal of attention over the last few decades. It has been
shown that equity excess returns over long horizons
are mean reverting and therefore contain an element of
predictability (Poterba and Summers, 1988; Fama and
French, 1988; Manzan, 2007).
While there exist simple and reliable methods to
identify mean reversion in univariate time series,
selecting portfolios from multivariate data which
exhibit this property is a much more difficult
problem. This can be approached by the Box-Tiao
procedure (Box and Tiao, 1977) to extract cointe-
grated vectors by solving a generalized eigenvalue
problem.
2158-5571/13/$27.50 c
2013 – IOS Press and the authors. All rights reserved
198 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
In his recently published article, d’Aspremont
(2011) posed the problem of finding sparse portfolios
which maximize mean reversion. The impetus is that
by finding mean reverting portfolios, one can develop
conversion trading strategies to produce profits, as
opposed to the buy and hold strategy associated with
portfolios which maximize excess returns or minimize
risk. Sparseness, he argues, is desirable for reducing
transaction costs associated with convergence trading
as well as for increasing the interpretability of the
resulting portfolio. He developed a new approach to
solve the problem by using semidefinite relaxation
and compared the efficiency of this solution to the
simple greedy algorithm in a number of markets.
Inspired by this work, we recently suggested some
further heuristics for portfolio selection, compared
these to the theoretically optimal exhaustive solution
and outlined a simplified method to estimate the pa-
rameters of the underlying stationary first order vector
autoregressive VAR(1) model, which also provides
a model fit measure (Fogarasi and Levendovszky,
2011). Subsequently, we suggested improvements to
estimating the underlying Ornstein-Uhlenbeck process
and outlined a simple convergence trading algorithm
based on decision theory (Fogarasi and Levendovszky,
2012).
In this paper, we summarize the above results and
combine them into a comprehensive framework (see
Fig. 1). We also outline a new method for portfolio
selection using simulated annealing. This new method
is compared to the existing methods via extensive
simulations on both generated and historical time
series.
The structure of the paper is as follows:
In section 2, after giving a formal presentation
of the problem, we review the existing heuristics
and present a novel approach using simulated
annealing.
In section 3, we review the methods for esti-
mating the parameters of a VAR(1) model and
explain a novel approach to trading basd on
decision theory.
Finally, in section 4, the methodology on gen-
erated VAR(1) data is validated and significant
trading gains are demonstrated . We also analyze
the performance on historical time series of real
data: the daily close prices of 8 different maturity
U.S. swap rates and the daily close prices of
stocks comprising the S&P 500 index.
2. Sparse mean reverting portfolio selection
In this section, the model is described together
with the foundations of mean reverting portfolio
identification. Our approach follows the one published
by d’Aspremont (2011), and in Section 2.3 we present
the methods published by Fogarasi and Levendovszky
(2011).
2.1. Mean reverting portfolios
The problem we examine in this paper is the
selection of sparse, mean reverting portfolios which
follow the so-called Ornstein-Uhlenbeck process
(Ornstein and Uhlenbeck, 1930). Let si,t denote the
price of asset iat time instant t, where i= 1, . . . , n and
t= 1, . . . , m are positive integers. We form portfolios,
of value ptof these assets with coefficients xi, and
assume they follow an Ornstein-Uhlenbeck process
given by:
dpt=λ(µpt)dt +σdWt,(1)
where Wtis a Wiener process and λ > 0(mean rever-
sion coefficient), µ(long-term mean), and σ > 0(port-
folio volatility) are constants.
Considering the continuous version of this process
and using the Ito-Doeblin formula (Ito, 1944) to solve
it, we get:
p(t) = p(0) eλt +µ1eλt
+
t
R
0
σeλ(ts)dW (s)(2)
Performance
analysis
Asset
price
time
series Trading with mean
reverting portfolio
Portfolio parameter
identification
Optimal mean
reverting portfolio
selection
VAR(1) model
parameter
identification
Fig. 1. Overall framework for identifying and trading sparse mean reverting portfolios.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 199
which implies that
E[p(t)] = p(0) eλt +µ1eλt(3)
and asymptotically
lim
t→∞ p(t)N µ, rσ2
2λ!(4)
For trading, λis a key parameter, as it determines
how fast the process returns to the mean, as well as
inversely indicating the level of uncertainty around the
mean (via the standard deviation of the asymptotic
Gaussian distribution). Hence, the larger the λ, the
more suitable is the mean reverting portfolio for
convergence trading, as it quickly returns to the mean
and contains a minimum amount of uncertainty around
the mean. Therefore, we shall be concerned with
finding sparse portfolios which are optimal in the sense
that they maximize λ. Later on, we show that this
approach may be overly simplistic if our purpose is to
maximize profits achieved via convergence trading. In
this case, the distance from the long-term mean, the
model fit and other factors should also be taken into
account.
2.2. Mean reverting portfolio as a generalized
eigenvalue problem
In this section, we view asset prices as a first order,
vector autoregressive VAR(1) process. Let si,t denote
the price of asset iat time instant t, where i= 1, . . . , n
and t= 1, . . . , m are positive integers, and assume that
sT
t= (s1,t, . . . , sn,t )is subject to a first order vector
autoregressive process, VAR(1), defined as follows:
st=Ast1+Wt,(5)
where Ais an n×nmatrix and WtN(0, σI )are
i.i.d. noise terms for some σ > 0.
One can introduce a portfolio vector xT= (x1,...,
xn), where component xidenotes the amount of asset
iheld. In practice, assets are traded in discrete units,
so xi∈ {0,1,2, . . .}but for the purposes of our
analysis we allow xito be any real number, including
negative ones, which denote the ability to short sell
assets. Multiplying both sides by vector x(in the inner
product sense), we obtain
xTst=xTst1A+xTWt(6)
Following the treatment in d’Aspremont (2011), we
define the predictability of the portfolio as
ν(x) := var(xTAst1)
var(xTst)=E(xTAst1sT
t1ATx)
ExTstsT
tx,
(7)
provided that E(st)=0, so the asset prices are norma-
lized for each time step. The intuition behind this
portfolio predictability is that the greater this ratio, the
more st1dominates the noise, and therefore the more
predictable stbecomes. Therefore, we will use this
measure as a proxy for the portfolio’s mean reversion
parameter λin (1). Maximizing this expression will
yield the following optimization problem for finding the
best portfolio vector xopt:
xopt = arg max
x
ν(x) = arg max
x
xTAGATx
xTGx (8)
where Gis the stationary covariance matrix of process
st. Based on (8), we observe that the problem is
equivalent to finding the eigenvector corresponding to
the maximum eigenvalue in the following generalized
eigenvalue problem (d’Aspremont, 2011):
AGATx=λGx (9)
λcan be obtained by solving the following equation:
det(AGATλG)=0 (10)
2.3. Sparse portfolio selection
In the previous section, we outlined the process of
selecting a portfolio which maximizes predictability
by solving a generalized eigenvalue problem. How-
ever, we are seeking the optimal portfolio vector that
exhibits a mean reverting property under sparseness
constraint. Adding this to (8), we can formulate our
constrained optimization problem as follows:
xopt = arg max
xRn,card(x)L
xTAGATx
xTGx (11)
where card denotes the number of non-zero compo-
nents, and Lis a given integer 1Ln.
The cardinality constraint poses a serious computa-
tional challenge, as the number of subspaces in which
optimality must be checked grows exponentially.
200 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
In fact, Natarjan (1955) shows that this problem is
equivalent to the subset selection problem, which is
proven to be NP-hard. However, as a benchmark
metric, we can compute the theoretically optimal
solution which, depending on the level of sparsity and
the total number of assets, could be computationally
feasible (Fogarasi and Levendovszky, 2011). We also
describe three polynomial time, heuristic algorithms
for an approximate solution of this problem.
Exhaustive search method
The brute force approach of constructing all
n!
L!(nL)! L-dimensional submatrices of Gand
AGAT, and then solving all the corresponding
eigenvalue problems to find the theoretical optimum
is, in general, computationally infeasible. However,
for relatively small values of nand L, or as an off-
line computed benchmark, this method can provide
a very useful basis of comparison. Indeed, for the
practical applications considered by d’Aspremont
(2011) (selecting sparse portfolios of n= 8 U.S. swap
rates and n= 14 FX rates), this method is fully
applicable and could be used to examine the level of
sub-optimality of other proposed methods.
Greedy method
A reasonably fast heuristic algorithm is the so-called
greedy method, first presented by d’Aspremont (2011).
Let Ikbe the set of indices belonging to the knon-zero
components of x. One can then develop the following
recursion for constructing Ikwith respect to k.
When k= 1, we set i1= arg max
j[1,n]
(AGAT)jj
Gjj .
Suppose now that we have a reasonable approxi-
mate solution with support set Ikgiven by
(x)k= arg max
xRn:xIC
k=0
xTAGATx
xTGx , where IC
kis the
complement of the set Ik. This can be solved as a
generalized eigenvalue problem of size k. We seek
to add one variable with index ik+1 to the set Ik
to produce the largest increase in predictability by
scanning each of the remaining indices in IC
k. The
index ik+1 is then given by
ik+1 = arg max
iIC
k
max
{xRn:xJi=0}
xTAGATx
xTGx ,
where Ji=IC
k\ {i}(12)
which amounts to solving (nk)generalized eigen-
value problems of size k+ 1. We then define
Ik+1 =Ik∪ {ik+1}, and repeat the procedure until
k=n. Naturally, the optimal solutions of the problem
might not have increasing support sets IkIk+1,
hence the solutions generated by this recursive
algorithm are potentially far from optimal. However,
the cost of this method is relatively low: with each
iteration costing Ok2(nk), the complexity of
computing solutions for all target cardinalities kis
On4. This recursive procedure can also be repeated
forward and backward to improve the quality of the
solution.
Truncation method
A simple and very fast heuristic that we can apply is
the following. First, compute xopt, the unconstrained,
n-dimensional solution of the optimization problem
in (8) by solving the generalized eigenvalue problem
in (9). Next, consider the Llargest values of
xopt and construct LxL dimensional submatrices G0
and (AGAT)0corresponding to these dimensions.
Solving the generalized eigenvalue problem in this
reduced space and padding the resulting x0
opt with 0’s
will yield a feasible solution xtrunc
opt to the original con-
strained optimization problem. The big advantage of
this method is that with just two maximum eigenvector
computations, we can determine an estimate for the
optimal solution. The intuition behind this heuristic is
that the most significant dimensions in the solution of
the unconstrained optimization problem could provide,
in most cases, a reasonable guess for the dimensions
of the constrained problem. This is clearly not the case
in general, but nonetheless, the truncation method has
proven to be a very quick and useful benchmark for
evaluating other methods.
Simulated annealing with constraint satisfaction
over a discretized grid
Another approach to solving (9) is to restrict the
portfolio vector xto contain only integer values.
Indeed, when it comes to trading methods utilizing
the optimal portfolio vector, only an integer number
of assets can be purchased in most markets, so this
restriction more closely resembles the truth. If the per
unit price of the asset is relatively large, this can give
rise to a material difference to considering all real-
valued portfolio vectors.
As such, the equation in (11) becomes a combi-
natorial optimization problem over an n-dimensional
discrete grid where the subspace of allowable solutions
is limited to dimensionality L. The main difficulty in
combinatorial optimization problems is that simpler
algorithms such as greedy methods and local search
methods tend to become trapped in local minima.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 201
A large number and variety of stochastic optimization
methods have been developed to address this problem,
one of which is simulated annealing as proposed by
Kirkpatrick et al. (1983).
At each step of the algorithm, we consider a
neighboring state w0of the current state wnand decide
between moving the system to state to w0, or staying
in wn. Metropolis et al. (1953) suggested the use of
the Boltzmann-Gibbs distribution as the probability
function to make this decision as follows:
P(wn+1 =w0)
=(1if E(wn)> E(w0)
eE(w0)E(wn)
Tif E(wn)E(w0)(13)
where E(.)is the function to be minimized and Tis the
temperature of the system. If Tis fixed and the neighbor
function which generates the random neighboring state
at each step is non-periodic and ergodic (any state is
reachable from any other state by some sequence of
moves), then this system corresponds to a regular time-
homogenous finite Markov chain. For the Metropolis
transition probability function, the stationary probabil-
ity distribution of finding the system at a given state wis
given by the Boltzmann distribution:
πw=e
E(w)
T KB(14)
where KBis the Boltzmann constant, equal to
1.38 ·1023 J/K. The stationary distribution given
by (14) indicates that the maximum of function
E(w)will be reached with maximum probability
(Salamon et al., 2002). Furthermore, when the
temperature parameter Tis decreased during the
procedure (also known as cooling), convergence in
distribution to the uniform measure over globally
optimal solutions has been proven by Geman and
Geman (1984), provided that the cooling schedule is
slow enough to be at least inversely proportional to the
logarithm of time. In practice, the time performance
of inverse logarithmic cooling is often untenable, so
faster heuristic algorithms have been developed as a
result, such as exponential, geometric and adaptive
cooling and applied successfully to a wide range
of combinatorial optimization problems (Chen and
Aihara, 1995; Ingber, 1993; Johnson et al., 1989;
Johnson et al., 1991).
In our application, based on the formulation in (8),
the energy function to be minimized is defined as
E(w) = wTATGAw
wTGw (15)
A very important feature of the simulated annealing
method is that the cardinality constraint can be easily
built into the search, by mapping the unconstrained
wvector into a randomly selected Ldimensional
subspace on each step. The idea is that on each step, we
randomly select k of the nindices (i1, . . . , ik) ; ij
{1, . . . , n}and we set the corresponding elements of
wto be 0: wij:= 0, j = 1, . . . , k. Full pseudocode for
the neighbor function and further details of the whole
algorithm are presented in the Appendix.
The high-level pseudocode of the general simulated
annealing algorithm used is as follows:
sGreedy_sol; e E(s) // Start from Greedy sol.
sbest s; ebest e // Initial "best" solution
k0 // Energy evaluation count
reject 0 // consecutive rejections
while stop(reject,k,e,ebest) // While stop conditions
// (see Appendix) not met
snew neighbor(s) // Pick some neighbour
// See Appendix for details
enew E(snew) // Compute its energy.
if P(e, enew, temp(k/kmax)) >random() then // Should we move to it?
ssnew; e enew; // Yes, change state.
reject 0 // Reset reject counter
else reject reject + 1 // Increment reject counter
if enew >ebest then // Is this a new best?
sbest snew; ebest enew // Save to ’best found’.
kk + 1 // One more evaluation done
return sbest // Return the best found.
202 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
The parameters of the simulated annealing algo-
rithm (function temp, which determines the cooling
schedule, and function stop, determining the halting
condition) need to be selected for acceptable speed of
convergence. Whilst the logarithmic cooling schedule,
shown to converge to the optimal solution by Geman
and Geman (1984), has proven to be too slow in the
application to this particular problem, in the Appendix
we show the details of a modified geometric cooling
algorithm with appropriate stopping conditions. This
has free parameters to adapt to the size of the specific
problem at hand.
3. Model parameter estimation and convergence
trading
In this section, we summarize our methods proposed
in earlier studies (Fogarasi and Levendovszky, 2011;
Fogarasi and Levendovszky, 2012) for estimating
the model parameters and performing convergence
trading.
3.1. Estimation of VAR(1) parameters
As explained in the preceding sections, in the
knowledge of the parameters Gand A, we can apply
various heuristics to approximate the L-dimensional
optimal sparse mean reverting portfolio. However,
these matrices must be estimated from historical
observations of the random process st. While there is
a vast amount of literature on the topic of parameter
estimation of VAR(1) processes, recent research
has focused on sparse and regularized covariance
estimation (Banerjee et al., 2008; d’Aspremont et al.,
2008; Rothman et al., 2008). As a new approach,
Fogarasi and Levendovszky (2011) have suggested
finding a dense estimate for Gwhich best describes the
observed historical data and dealing with dimensional-
ity reduction with the apparatus outlined in section 2.
We start by estimating the recursion matrix A. If the
number of assets nis greater than or equal to the length
of the observed time series m, then Acan be estimated
by simply solving the linear system of equations:
ˆ
Ast1=st(16)
This gives a perfect VAR(1) fit for our time series
in cases where we have a large portfolio of potential
assets (e.g. considering all 500 stocks which make
up the S&P 500 index), from which a sparse mean
reverting subportfolio is to be chosen.
In most practical applications, however, the length
of the available historical time series is greater than the
number of assets considered, so Ais estimated using,
for example, least squares estimation techniques, as
derived by Fogarasi and Levendovszky (2012). The
resulting estimate is
ˆ
A= m
X
t=2
stsT
t1! m
X
t=2
st1sT
t1!+
,(17)
where M+denotes the Moore-Penrose pseudoinverse
of matrix M. Note that the Moore-Penrose pseudoin-
verse is preferred to regular matrix inversion, in order
to avoid problems which may arise due to the potential
singularity of sT
t1st1.
Assuming that the noise terms in equation (5) are
i.i.d. with WtN(0, σWI)for some σW>0,
we obtain the following estimate for σWusing ˆ
A
from (17):
ˆσW=v
u
u
t
1
n(m1)
T
X
t=2
stˆ
Ast1
2
(18)
In the case that the terms of Wtare correlated, we
can estimate the covariance matrix Kof the noise as
follows:
ˆ
K=1
m1
T
X
t=2
(stˆ
Ast1)(stˆ
Ast1)T(19)
Using the results of (17) and (19), Fogarasi
and Levendovszky (2012) have derived a numerical
method for computing the covariance matrix, based on
the following iteration:
G(k+ 1) = G(k)δ(G(k)ˆ
AG(k)ˆ
ATˆ
K)(20)
where δis a constant between 0 and 1, and G(i)is
the covariance matrix estimate on iteration i. Provided
that the starting point for the numerical method, G(0),
is positive definite (eg. the sample covariance matrix),
and since our estimate of Kis positive definite, by
construction, this iterative method will produce an
estimate which will be positive definite. We have also
shown that comparing this estimate to the sample
covariance estimate gives rise to a model fit parameter
which can later be used in determining our level of
confidence in a mean reverting portfolio.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 203
3.2. Estimation of Ornstein-Uhlenbeck parameters
Having identified the portfolio with maximal mean
reversion that satisfies the cardinality constraint, our
task now is to develop a profitable convergence trading
strategy. The immediate decision that we face is
whether the current value of the portfolio is below
the mean and is therefore likely to rise so buying is
advisable, above the mean and therefore likely to fall
so selling is advisable, or close to the mean in an
already stationary state, in which case no action will
likely result in a profit. In order to formulate this as a
problem of decision theory, we first need to estimate
the mean value of the portfolio.
As an alternative to the classical methods
of mean estimation (sample mean estimate, least
squares linear regression estimate, maximum
likelihood estimate), Fogarasi and Levendovszky
(2012) have presented a novel mean estimation tec-
hnique based on pattern matching. The idea is to
consider µ(t) =µ+ (µ(0) µ)eλt, the continuous
process of the expected value of the portfolio at time
step twith µ(0) = p(0). Intuitively, this describes
the value of the portfolio, without noise, in the
knowledge of the long term mean and the ini-
tial portfolio value. In the knowledge of observat-
ions pt= (p(t1), p(t2), . . . , p(0)) we can use
maximum likelihood estimation techniques to
determine which of the convergence patterns µ(t)
matches best. The result is the following mean
estimate:
ˆµ:=
t
P
i=1
t
P
j=1 U1i,j µ(0) 2eλ(i+j)eλi eλj 2pjeλi 1
t
P
i=1
t
P
j=1
2 (U1)i,j eλ(i+j)eλi eλj + 1
,(21)
where Uij := cov (p(ti), p (tj)) = σ2
2λeλ(ji)
eλ(2tij)is the time-covariance matrix of ptfor
jiand µt= (µ(t1) , . . . , µ (0)).
3.3. A simple convergence trading strategy
In this section, we review a simple model of trading
in which we restrict ourselves to holding only one
portfolio at a time. This can be perceived as a walk in
a binary state-space, depicted in Fig. 2.
As a result, the main task after identifying the
mean reverting portfolio and obtaining an estimate
for its long-term mean is to verify whether µ(t)< µ
or µ(t)µbased on observing samples {p(t) =
xTs(t), t = 1, . . . , T . This verification can be per-
ceived as a problem of decision theory, since direct
observations on µ(t)are not available.
If process p(t)is in a stationary state, then
the samples {p(t), t = 1, . . . , T }are generated by
Gaussian distribution Nµ, qσ2
2λ. As a result, for a
given rate of acceptable error εwe can select an αfor
which
µ+α
Z
µα
1
p2πσ2/2λe(uµ)2
σ2du = 1 ε(22)
Cash at hand Portfolio at
hand
Fig. 2. Trading as a walk in a binary state-space.
204 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
Cash at hand
BUY if p(t) < μ−α
SELL if p(t) μ−α
HOLD
if p(t) < μ−α
NO ACTION
if p(t) μ−α
Portfolio at
hand
Fig. 3. Flowchart for simple convergence trading of mean reverting portfolios.
As such, having observed the sample p(t)
[µα, µ +α], it can be said that we accept the
stationary hypothesis which holds with probability
1ε. Thus, we can augment Fig. 2 with precise
conditions as depicted in Fig. 3.
4. Performance analysis
All of the algorithms outlined in this paper
have been implemented in MATLAB and extensive
numerical simulations were run on both generated and
real historical data. The results of these simulations are
presented in this section.
4.1. Performance of portfolio selection and trading
on generated data
In order to compare the portfolio selection methods
outlined in section 2, we generated synthetic VAR(1)
data as follows. We first generated an n×nrandom
matrix A, ensuring that all of its eigenvalues were
smaller than 1. We then generated random i.i.d.
noise WtN(0, σI )for an arbitrary selection of σ.
Finally, we used equation (5) to generate the random
sequence st, ensuring that all of its values were
positive. We then used the methods of section 3 to
compute the estimates ˆ
A,ˆ
Kand ˆ
Gand computed
optimal sparse portfolios, maximizing the mean-
reversion coefficient λ.
Having run 3,000 independent simulations for
selecting sparse portfolios of five assets out of a
universe of ten, we found that the greedy method
generates the theoretically best result produced by
an exhaustive search in 70% of the cases. Of the
remaining 30% where an improvement over the greedy
method is possible, simulated annealing managed
to find an improvement in slightly over one-third
of the cases, namely in 11% of all simulations.
The impact of the improvement produced by the
simulated annealing method can be significant, as
illustrated in Fig. 4 by one specific generated example
where simulated annealing substantially outperforms
the greedy method. We also note that the truncation
method performs poorly in this analysis providing
mean reversion coefficients lower than other methods
in over 99% of the generated cases.
In the following simulation, we increased the asset
population to 20 and restricted cardinality of the opti-
mal portfolio to ten. Intuitively, this causes the greedy
method to go astray more frequently and thus would
provide more room for improvement. The simulations
indeed confirm this intuition, as in a simulation of 1,000
independent cases, the greedy method was able to find
the theoretical optimum in only 1% of the cases. Under
these settings, simulated annealing outperformed the
greedy method in 25% of all cases. This indicates
that for larger problem sizes, simulated annealing
becomes more attractive compared to other simple
heuristic methods. This finding is also confirmed when
analyzing the runtimes of the different algorithms. As
expected, truncation and greedy methods are clearly
the fastest of the four examined methods. The speed
of simulated annealing depends largely on the settings
of the parameters (see Appendix for more details),
but it is generally slower than even an exhaustive
search for smaller values of n. However, over n= 21,
simulated annealing is faster than exhaustive search.
At the other end of the spectrum, the greedy and
truncation methods, although clearly less optimal than
exhaustive and simulated annealing, are very fast and
therefore can be used for real-time algorithmic trading
applications for most reasonably-sized problems. For a
total asset size of 100, computing all sparse portfolios
of cardinalities 1 to 100 took only two seconds with
the truncation method and only 31 seconds with the
greedy algorithm on a Pentium 4, 3.80 GHz machine.
Simulated annealing can be used for lower frequency
(daily or infrequent intraday trading) for most problem
sizes. The optimal exhaustive method is only practical
for daily or intraday trading if the total number of assets
does not exceed 25. Fig. 5 shows more details of the
runtimes of the different algorithms.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 205
Exhaustive
Greedy
Sim Ann
Truncation
Cardinality
1
0
50
100
150
Mean reversion
200
250
300
2345678910
Fig. 4. Comparison of portfolio selection methods of various cardinalities on n= 10-dimensional generated VAR(1) data.
In order to prove the economical viability of our
methodology, we implemented the simple conver-
gence trading strategy, as outlined in section 4.3. We
generated n= 10-dimensional VAR(1) sequences of
length 270 of which the first 20 time steps were used
to estimate the parameters of the model and find the
optimal portfolio of size L= 5 using the different
methods. The following 250 (approximate number of
trading days in a year) were used to trade the portfolio,
using the simple linear regression estimate of µ.
Running each of the algorithms on 2,000 different time
series, we found that all methods generated a profit in
over 97% of the cases. The size of the profit, starting
from $100, using the risky strategy of betting all of
our cash on each opportunity, increased monotonically
in most simulations, reaching as high as 400% in
some cases. The biggest loss across the 2,000 runs
was 37% of our initial wealth, showing the robustness
of the method on generated data. Fig. 6 shows a
typical pattern of successful convergence trading on
mean reverting portfolios selected from generated
VAR(1) data. We can observe that the more frequent
the movement around the estimated long-term mean,
the more trading opportunities arise, hence the larger
the profitability of the methodology. Fig. 7 shows the
histogram of trading gains achieved by the simulated
annealing method. All four methods produced average
profits in the same order of magnitude, with the
distribution of trading gains very similar. This is
despite the fact that the exhaustive method produced
mean reversion coefficients on average 15 times those
produced by the truncation method, and three times
those produced by the greedy method and simulated
annealing. This implies that the profits reached by this
simple convergence trading strategy are not directly
proportional to the lambda produced by the portfolio
selection method. In order to maximize trading gains,
other factors (such as the model fit, the amount of
diversion from the long-term mean, etc) would need
to be taken into account. This topic is the subject of
further research.
4.2. Performance of portfolio selection and trading
on historical data
We consider daily close prices of the 500 stocks
which make up the S&P 500 index from July 2009
to July 2010. We use the methods of section 3 to
206 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
20
0
5
10
15
CPU runtime (sec)
CPU runtime (sec)
20
25
30
35
Truncation
40 60
Cardinality
80 1000
0
500
1000
1500
51510
Cardinality
20 25
Exhaustive
Greedy
Sim Ann
Greedy
Truncation
Fig. 5. CPU runtime (in seconds) versus total number of assets n, to compute a full set of sparse portfolios, with cardinality ranging from 1 to
n, using the different algorithms.
Portfolio value
0
100
0
100
200
300
400
500
50 100 150 200 250 300
Mean estimate
Buy action
Sell action
Fig. 6. Typical example of convergence trading over 250 time steps on a sparse mean reverting portfolio. Weighted mix of L = 5 assets were
selected from n= 10-dimensional generated VAR(1) process by simulated annealing during the first 20 time steps. A profit of $1,440 was
achieved with an initial cash of $100 after 85 transactions.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 207
Simulated annealing trading results
Profit generated (C0 =100)
Frequency (out of 2000 cases)
500 0
0
100
200
300
400
500
600
700
800
500 1000 1500 2000 2500 3000 3500 4000 4500
Fig. 7. Histogram of profits achieved over 2,000 different generated VAR(1) series by simulated annealing.
G_min
G_max
G_avg
G_final
L=3 Greedy L =4 Sim Ann
75,00%
85,00%
95,00%
105,00%
115,00%
125,00%
135,00%
145,00%
155,00%
L=4 GreedyL =3 Sim Ann
Fig. 8. Comparison of minimum, maximum, average and final return on S&P500 historical data of the greedy and simulated annealing methods
for sparse mean reverting portfolios of size L =3 and L=4.
estimate the model parameters on a sliding window
of eight observations and select sparse, mean re-
verting portfolios using the algorithms of section 2.
Using the simple convergence trading methodology
in section 4 for portfolios of sparseness L = 3 and
4, the methods produced annual returns in the range
of 23-34% (note that the return on the S&P 500
index was 11.6% for this reference period). Simulated
annealing performed similarly to the greedy method
for most cardinalities, but produced better mean
reversion coefficients and better profit return for the
case L = 4 (see Fig. 8).
208 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
G_min
G_max
G_avg
G_final
L=1 Trunc
0,00%
20,00%
40,00%
60,00%
80,00%
100,00%
120,00%
140,00%
160,00%
L=2 Trunc L =3 Trunc L =4 Trunc L =5 Trunc L=6 Trunc L =7 Trunc L =8 Trunc
Fig. 9. Comparison of minimum, maximum, average and final return on historical US swap data of the truncation method for sparse mean
reverting portfolios of cardinality L = 1-8.
Next, we studied U.S. swap rate data for maturities
1Y, 2Y, 3Y, 4Y, 5Y, 7Y, 10Y, and 30Y from 1995
to 2010. Similar to the S&P 500 analysis, we used
sliding time windows of eight observations to estimate
model parameters, and applied the simple convergence
trading methodology on heuristically selected mean
reverting portfolios. Due to a poorer model fit, we
observed more moderate returns of 15-45% over the
15 years for portfolio cardinalities of L = 4-6. The
methods generated best results for cardinalities L = 4
and 5 (see Fig. 9).
5. Conclusions and directions for future research
We have examined the problem of selecting optimal
sparse mean reverting portfolios based on observed
and generated time series. After reviewing the novel
parameter estimation techniques suggested in earlier
publications, we have adapted simulated annealing
to the problem of optimal portfolio selection. We
have shown that the exhaustive method can be a
viable practical alternative for problems with an
asset universe size up to 25, and examined the
relative performance of simulated annealing versus
the greedy method whilst considering the theoretically
best solution. We concluded that even for small
problem sizes (ten assets and portfolios restricted
to cardinality of five), simulated annealing can
outperform the greedy method in 10% of the cases,
very significantly in some cases. This ratio improved
to 25% with the doubling of the problem size
and cardinality restriction, suggesting that simulated
annealing becomes more appealing for larger problem
sizes, whilst having the asymptotic runtime of simpler
heuristics. Furthermore, the viability of the entire
framework has been demonstrated by introducing a
simple convergence trading strategy which proved to
be very profitable on generated VAR(1) sequences and
also viable on real historical time series of S&P 500
and US swap rate data. However, the fact that all four
methods produced very similar profit profiles implies
that the relationship between the mean reversion
coefficient produced by the selected sparse portfolio
and the profits achieved by trading is nontrivial. Our
conclusion is that more factors (such as distance from
the mean, model fit, etc.) need to be taken into account
in the selection of the objective function. However, our
method can be directly applied to these more complex
objective functions, making our suggested numerical
approach viable. Finally, more sophisticated trading
methods, involving multiple portfolios and better cash
management, could be developed to further enhance
trading performance, and they could be analyzed
with the introduction of transaction costs, short-selling
costs or an order book.
Acknowledgments
This work was partially supported by the European
Union and the European Social Fund through project
FuturICT.hu (grant no.: TAMOP-4.2.2.C-11/1/KONV-
2012-0013).
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 209
The authors also wish to thank the anonymous
referee and the editor, Philip Maymin for their valuable
comments and suggestions to improve the quality of
the paper.
Appendix – Simulated Annealing technical details
In this Appendix, we discuss some of the technical
details of our implementation of the simulated anneal-
ing algorithm for solving the cardinality constrained
maximum eigenvalue problem required for sparse
mean reverting portfolio selection.
As explained in section 2.6, optimality in distri-
bution of the solution of simulated annealing can
be proven, as long as the cooling schedule is slow
enough to be at least inversely proportional to
the logarithm of time (Geman and Geman, 1984).
However, for concrete applications this schedule is
“utterly impractical [. . . ] and amounts to a random
search in state space.” (Nourani and Andersen, 1998)
As such, we implemented the exponential cooling
schedule of the form
T(t) = T0αt(23)
In our implementation, we used T0= 0,α= 0.8
and a maximum of 3,000 repeats at each temperature
level, but moving to the next temperature when 100
successful moves have been made. This technique
is used to ensure there are a sufficient number of
trials at each temperature level, but it also enables the
algorithm to proceed if there is reasonable progress.
The same principles must guide our selection of
stopping conditions. Since our specific application
contains no a priori target or lower limit for the
minimization problem, we set a stopping temperature
Tstop = 108. However, if the algorithm finds no
improvement over 10,000 consecutive trials, we also
stop the algorithm. Another optimization heuristic we
found successful for difficult surfaces is to revert to the
best solution thus far after 500 unsuccessful attempts.
As indicated in section 2.6, it is practical to select
a competitive starting point for the algorithm because,
by our construction, the final solution is guaranteed
to be at least as good as the starting point. Given
the linear scalability of eigenvectors, we can give any
scalar multiple of the solution of the greedy algorithm
as the starting point for the algorithm. Given that it
only operates over discrete whole values, it has been
found advisable to give a large scalar multiple of the
normalized greedy solution as a starting point – for
the purposes of our numerical runs, we used 100 times
the normalized greedy solution.
As for the neighbor function, as explained in section
2.6, we need a two-step approach to first randomly
decide the up to Lnew non-zero values, and then to
randomly decide the up to Lnew dimensions, given
the starting values and dimensions.
For the selection of non-zero values, two different
approaches would be to either generate them com-
pletely anew, without regard to the starting point, or
to perturb the starting non-zero values by uniformly
generated random values between 0 and a constant
k1. A similar choice can be made about the non-
zero dimensions as well; they can either be generated
completely randomly, independent of the starting
point, or we can select k2Lrandom new dimensions
to change within the dimensions of our starting point.
Having implemented various combinations of these
choices and comparing the speed of convergence and
quality of solution produced on generated data, we
found that the following adaptive algorithm works best
in practice.
function neighbor (s0, T) // s0 is starting point,
for i1upto L // Generate L random
deltas[i]=rand(0,max(1,floor(100*T)) // perturbations to values
Prandom permutation of nonzero indices in s0
Qrandom permutation of zero indices in s0
nrand(0,floor(L*T, (n-L)*T)) // # dimensions to change
for i1upto n
swap P[i] and Q[i]
snew=vector(P,s0[P]+deltas) // insert perturbed values
// into perturbed P dims
return snew
210 N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing
The intuition behind this algorithm is that at higher
temperatures more dimensions are allowed to change
and by larger amounts, but as the system is cooled,
only smaller changes to s0 are allowed.
References
Adcock, C.J., Meade, N., 1994. A simple algorithm to
incorporate transaction costs in quadratic optimiza-
tion. Eur. J. Oper. Res. 79, 85–94.
Anagnostopoulos, K.P., Mamanis, G., 2011. The mean-
variance cardinality constrained portfolio optimiza-
tion problem: An experimental evaluation of five
multiobjective evolutionary algorithms. Exp. Sys.
App. 38, 14208–14217.
Armananzas, R., Lozano, J.A., 2005. A multiobjective
approach to the portfolio optimization problem.
IEEE congress on evolutionary computation 1,
1388–1395.
Arnone, S., Loraschi, A., Tettamanzi, A., 1993. A
genetic approach to portfolio selection. Neur. Netw.
W. 6, 597–604.
Banerjee, O., El Ghaoui, L., d’Aspremont A.,
2008. Model selection through sparse maximum
likelihood estimation. J. Mach. Learn. Res. 9,
485–516.
Box, G.E., Tiao, G.C., 1977. A canonical analysis of
multiple time series. Biometrika 64(2), 355–365.
Chang, T.-J., Meade, N., Beasley, J.E., Sharaiha,
Y.M., 2000. Heuristics for cardinality constrained
portfolio optimization. Comp. Oper. Res., 27, 1271–
1302.
Chen, L., Aihara, K.,1995. Chaotic simulated anneal-
ing by a neural network model with transient chaos.
Neur. Netw. 8(6), 915–930.
d’Aspremont, A, Banerjee, O., El Ghaoui, L, 2008.
First-Order Methods for Sparce Covariance Selec-
tion. SIAM J. Matr. Anal. Appl. 30(1), 56–66.
d’Aspremont, A., 2011. Identifying small mean
reverting portfolios. Quant. Financ.11(3), 351–364.
Di Tollo, G., Rolli, A., 2008. Metaheuristics for the
portfolio selection problem. Int. J. Operations Res.
5, 13–35.
Elton, E.J., Gruber, M.J., Brown, S.J., Goetzmann
W.N., 2007. Modern Portfolio Theory and Invest-
ment Analysis. Wiley, New York.
Fama, E., French, K., 1988. Permanent and Temporary
Components of Stock Prices. The J. Pol. Econ.
96(2), 246–273.
Feiring, BR., Wong, WL, Poon, M., Chan Y.C., 1994.
Portfolio selection in downside risk optimization
approach – application to the Hong Kong stock
market. Int. J. Sys. Sci. 25:1921–1929.
Fernández, A., Gómez, S., 2007. Portfolio selection
using neural networks. Comp. Oper. Res. 34, 1177–
1191.
Fogarasi, N., Levendovszky, J., 2011. A simplified
approach to parameter estimation and selection of
sparse, mean reverting portfolios. To appear in
Periodica Polytechnica Electrical Engineering and
Computer Science.
Fogarasi, N., Levendovszky, J., 2012. Improved
parameter estimation and simple trading algorithm
for sparse, mean reverting portfolios. Annales Univ.
Sci. Budapest., Sect. Comp. 37, 121–144.
Geman, S., Geman, D., 1984. Stochastic relaxation,
Gibbs distributions, and the Bayesian restoration of
images. IEEE Trans. Patt. Anal. Mach. Intellig. 6,
721–741.
Ingber, L., 1993. Simulated annealing: Practice versus
theory. Math. Comput. Modelling 18, 29–57.
Ito, K., 1944. Stochastic integral. Proc. Imperial Acad.
Tokyo 20, 519–524.
Johnson, D.S., Aragon, C.R., McGeoch, L.A.,
Schevon, C., 1989. Optimization by simulated
annealing: an experimental evaluation. Part I, graph
partitioning. Oper. Res. 37, 865–892.
Johnson, D.S., Aragon, C.R., McGeoch, L.A.,
Schevon, C., 1991. Optimization by simulated
annealing: an experimental evaluation; Part II,
graph coloring and number partitioning. Oper. Res.
39, 378–406.
Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P., 1983.
Optimization by simulated annealing. Science 220,
671–680.
Konno, H., Yamazaki, H., 1991. Mean/absolute
devation portfolio optimiziation model and its
applications to Tokyo Stock Market. Manag. Sci. 37,
519–531.
Loraschi, A., Tettamanzi, A., Tomassini, M., Verda,
P., 1995. Distributed genetic algorithms with an
application to portfolio selection problems. In:
Pearson, D.W., Steele, N.C., Albrecht, R.F. (Eds.),
Artificial Neural Nets and Genetic Algorithms.
Springer-Verlag, Vienna, pp. 384–387.
Manzan, S. 2007. Nonlinear mean reversion in
stock prices. Quant. Qual. Anal. Soc. Sci. 1(3),
1–20.
N. Fogarasi and J. Levendovszky / Sparse, mean reverting portfolio selection using simulated annealing 211
Markowitz, H., 1952. Portfolio Selection. J. Financ.
7(1), 77–91.
Metropolis, N., Rosenbluth, A.W., Rosenbluth, M.N.,
Teller, A.H., Teller, E., 1953. Equations of state
calculations by fast computing machines. J. Chem.
Phys. 21(6), 1087–1092.
Natarjan, B.K., 1995. Sparse approximate solutions to
linear systems. SIAM J. Comput. 24(2), 227–234.
Nourani, Y., Andersen, B., 1998. A comparison of
simulated anneling cooling strategies. J. Phys. 31,
8373–8385.
Ornstein, L.S., Uhlenbeck, G.E., 1930. On the theory
of the Brownian motion. Phys. Rev. 36(5), 823.
Poterba, J.M., Summers, L.H., 1988. Mean reversion
in stock prices: Evidence and implications. J.
Financ. Econ. 22(1), 27–59.
Rothman, A., Bickel, P., Levina, E., Zhu, J., 2008.
Sparse permutation invariant covariance estimation.
Electron. J. Stat. 2, 494–515.
Salamon, P., Sibani, P., Frost, R., 2002. Facts, Conjec-
tures, and Improvements for Simulated Annealing.
SIAM Monographs on Mathematical Modeling and
Computation. Society for Industrial and Applied
Mathematics, Philadelphia, PA.
Streichert, F., Ulmer, H., Zell, A., 2003. Evolutionary
algorithms and the cardinality constrained portfolio
optimization problem. In: Selected Papers of the
International Conference on Operations Research,
Heidelberg, Germany, pp. 253–260.
Yoshomito, A., 1996. The mean-variance approach to
portfolio optimization subject to transaction costs. J.
Oper. Res. Soc. Japan 39, 99–117.
... The aim of the present work is to create a portfolio of which predictability is high so the future value can be inferred with very good precision in a way that it has a very low number of constituents. Portfolios that follow mean reverting stochastic processes meet this criteria (see Banerjee et al., 2008;d' Aspremont, 2011;Fogarasi & Levendovszky, 2012;Fogarasi & Levendovszky, 2011). The mean-reverting property is widely used in economics (Ahsan & Rub, 2017;Madan & Wang, 2022;Narula, 2018;Tah, 2018). ...
... The speed is proportional to predictability while the sparsity (the number of different stocks used in the portfolio) is important for investors as this minimizes the transaction cost and makes the portfolio easier to interpret. This optimization can be done using simple and fast approximation and much more complex and expensive methods (see d ' Aspremont, 2011;Fogarasi & Levendovszky, 2011;Stübinger & Endres, 2021;Yang et al., 2017;Wei, 2022)). It was shown that further optimization such as SA starting from the greedy solution can reach a solution closer to the global one (Fogarasi & Levendovszky, 2011). ...
... This optimization can be done using simple and fast approximation and much more complex and expensive methods (see d ' Aspremont, 2011;Fogarasi & Levendovszky, 2011;Stübinger & Endres, 2021;Yang et al., 2017;Wei, 2022)). It was shown that further optimization such as SA starting from the greedy solution can reach a solution closer to the global one (Fogarasi & Levendovszky, 2011). However, in the majority of cases, the less expensive and simpler greedy algorithm can find the global optimum. ...
Article
Full-text available
We study the problem of selecting a sparse, mean reverting portfolio from a universe of assets using simulated annealing (SA). Assuming that assets follow a first order vector autoregressive process (VAR(1)), we make a number of improvements in existing methods. First, we extend the underlying asset dynamics to include a time-independent additive term, thereby enriching the model’s applicability. Second, we introduce Extreme Learning Machine (ELM) to decide whether to apply SA or settle for the much faster greedy solution. Finally, we improve the SA method by better calibration of the initial temperature and by determining the exact value of the weights within a selected dimension using the Rayleigh quotient. On real data, these changes result in more than 90% improvement in run time on average and 4.78% improvement in optimized mean reversion in our simulations. We also test the trading performance of our method on both simulated and real data and managed to achieve positive mean trading results in both cases.
... In this paper, we propose to apply the above described techniques to the problem of effective trading of sparse, mean reverting portfolios. These portfolios were created using VAR(1) model fitted on stock price data and the weights of the portfolio are coming from eigenvectors related to the maximal eigenvalue of the regression matrix using Simulated Annealing (see Fogarasi and Levendovszky 2011). ...
... To keep the number of constituents low and minimize transaction costs while maintaining low portfolio complexity, the optimization problem now involves a trade-off between maximizing mean reversion speed and minimizing the number of stocks. Mathematically the Eq. 14 has an additional constraint, (Fogarasi and Levendovszky 2011) Solving an optimization problem (16) can happen in several ways. The simplest way is the exhaustive method where the global minimum is found by sweeping through the whole configuration space. ...
Article
Full-text available
This paper introduces an effective convergence trading algorithm for mean reverting portfolios using Long Short Term Memory (LSTM) neural networks. Utilizing known techniques for selection of sparse, mean reverting portfolios from asset dynamics following the VAR(1) model, we introduce a 2-step technique to effectively trade the optimal portfolio. Sequence-to-sequence (Seq2Seq) LSTM architecture is implemented to make longer term prediction of future portfolio values and establish a trading range. In addition, a simple LSTM network is applied to predict very precisely one time step ahead. Combining these two constructions, a sophisticated convergence trading algorithm is implemented which produced Sharpe ratios around 1.0 on optimal portfolios selected from historical S[NONSPACE]&P500 S[NONSPACE] \& P500 stocks during 201520222015-2022. This represents a very significant improvement compared to the previous convergence trading algorithms on the same set of portfolios by around 141%141\% on average.
... In [16], fuzzy number appears for the first time in this field. In [7,8,9,10,11,12], authors introduced multi-objective paradigm modelling. A resolution with Goal Programming method is described in [13,14]. ...
... A resolution with Goal Programming method is described in [13,14]. In several other articles [8,10,13,15,16,17,18,19,20] various related issues are discussed, it is among other investment diversification, the portfolio management expected return of the capital markets or mutual funds [18,21]. ...
Article
Full-text available
Portfolio selection problem consists on choice of best titles to constitute a portfolio which maximizes revenue and minimizes risk. We then deal with a bicriteria problem having two conflicting criteria to optimize simultaneously. It is well known that such a combinatorial problem is intractable with exact methods for large dimension problems. Then metaheuristics are useful to find a good approximation of the efficient set. The purpose of this article is to evaluate the efficiency of two metaheuristic methods, namely the simulated annealing and the genetic algorithm to solve Portfolio selection problem. In order to compare both of them, metaheuristics have been implemented in the same language, Matlab. Statistical estimator and variance analysis allowed us to discriminate numerical experiments results. We observe that differences are significant. In terms of calculation time, simulated annealing appears more efficient than genetic algorithm. Variance analysis shows that both methods are independent one to another, and the result depends on the used method. In conclusion, some suggestions for future research are proposed.
... applications; e.g., [1], [2], [3], [4], [5], [6], [7] and references therein). Hence, constructing a mean-reverting portfolio exhibiting reasonable volatility and comprising of a relative smaller number of assets has received significant attention in the literature [8], [9], [10], [11], [12]. ...
... Hence, {(λ (j ) , µ (j ) , w (j ) )} is bounded and has a convergent subsequence with the limit (λ, µ, w). thus, through passing limit in (V-C) and applying the results of part (i), we have: αA 1 x * + 2γ q i=2 (x * ) T A i x * A i x * − λA 0 x * + µx * + w = 0, x * = 1, (x * ) L c = 0, and w * L = 0, where 0 ≤ λ ⊥ (x * ) T A 0 x * − φ ≥ 0. This means that x * satisfies the first-order optimality conditions of (P ) given in (12). ...
Preprint
Full-text available
Mean-reverting portfolios with volatility and sparsity constraints are of prime interest to practitioners in finance since they are both profitable and well-diversified, while also managing risk and minimizing transaction costs. Three main measures that serve as statistical proxies to capture the mean-reversion property are predictability, portmanteau criterion, and crossing statistics. If in addition, reasonable volatility and sparsity for the portfolio are desired, a convex quadratic or quartic objective function, subject to nonconvex quadratic and cardinality constraints needs to be minimized. In this paper, we introduce and investigate a comprehensive modeling framework that incorporates all the previous proxies proposed in the literature and develop an effective unifying algorithm that is enabled to obtain a Karush-Kuhn-Tucker (KKT) point under mild regularity conditions. Specifically, we present a tailored penalty decomposition method that approximately solves a sequence of penalized subproblems by a block coordinate descent algorithm. To the best of our knowledge, the proposed algorithm is the first for finding volatile, sparse, and mean-reverting portfolios based on the portmanteau criterion and crossing statistics proxies. Further, we establish that the convergence analysis can be extended to a nonconvex objective function case if the starting penalty parameter is larger than a finite bound and the objective function has a bounded level set. Numerical experiments on the S&P 500 data set demonstrate the efficiency of the proposed algorithm in comparison to a semidefinite relaxation-based approach and suggest that the crossing statistics proxy yields more desirable portfolios.
... Our approach mines for such discoveries. Hence, more closely related are the works of d' Aspremont (2011), Cuturi and d'Aspremont (2013), and Fogarasi and Levendovszky (2013) who also focus on constructing maximally mean reverting portfolios. Linearity is inherent, and allows for such problems to be reformulated as extensions of canonical correlation analysis with a varying degree of elaboration. ...
Preprint
When it comes to stock returns, any form of predictability can bolster risk-adjusted profitability. We develop a collaborative machine learning algorithm that optimizes portfolio weights so that the resulting synthetic security is maximally predictable. Precisely, we introduce MACE, a multivariate extension of Alternating Conditional Expectations that achieves the aforementioned goal by wielding a Random Forest on one side of the equation, and a constrained Ridge Regression on the other. There are two key improvements with respect to Lo and MacKinlay's original maximally predictable portfolio approach. First, it accommodates for any (nonlinear) forecasting algorithm and predictor set. Second, it handles large portfolios. We conduct exercises at the daily and monthly frequency and report significant increases in predictability and profitability using very little conditioning information. Interestingly, predictability is found in bad as well as good times, and MACE successfully navigates the debacle of 2022.
Article
Full-text available
Purpose: Pre-positioning is a crucial choice in pre-disaster humanitarian logistics planning that consists of deciding in advance how much aid and where should it be located to enable effective and prompt operations in the case of an emergency. To support managers making such decisions, we propose four mathematical formulations that, considering the uncertainty on the demand to satisfy, seek to optimize aid prepositioning (before the event) and further distribution (after the event) in order to minimize unmet demand (MUD). The purpose of this paper is to evaluate and compare the performance of these formulations on a real case to discuss when and why should each approach be applied.Design/methodology/approach: The two first formulations adopt the cardinality-constrained (CC) approach to handle uncertainty. These formulations differ in their objective functions, the first formulation’s objective seeks to MUD, whilst the second incorporates equity in the way that demand is satisfied. The two remaining formulations are scenario-based (SB) and as in the previous two formulations, seek to MUD with and without equity considerations, respectively.Findings: Applying our formulations to a case study, we compare the differences between the solutions produced by the proposed formulations and the solutions that would have been produced without uncertainty (perfect information) to have a better understanding of their performance and their behavior. A discussion of the strengths and weaknesses of each model is provided to help managers choose the model that best suits their needs.Originality/value: The formulations are applied to a case study where a food bank is faced with the arrival of a hurricane in Mexico. As far as our knowledge, it is the first work in literature to deal with humanitarian logistics under a cardinality-constrained approach.
Article
Full-text available
The study, based on available data on the Congolese banking sector has succeeded in establishing a benchmark of the ideal distribution of a bank's credit portfolio by sector in order to improve its profitability while reducing the risk of default. This benchmark has been established on an exclusively quantitative basis on the results of three distinct methods of multi-criteria decision aid: AHP and TOPSIS. It can help banks to assess of the quality of their credit portfolio (or, at least, their sectorial allocation) relative to the latter, which is derived from the aggregates of the entire banking sector. It would benefit from being usefully combined with a more qualitative analysis that escapes the spectrum of this study taking into account the quality and availability of the guarantee, track record, etc. The Student t-test, as the correlation coefficient has shown that the results of our different methods are in perfect correlation with the data of the bank, and the difference of the discrepancies between our methods and the data of the bank are random, that is to say not significant.
Article
The study, based on available data on the Congolese banking sector has succeeded in establishing a benchmark of the ideal distribution of a bank’s credit portfolio by sector in order to improve its profitability while reducing the risk of default. This benchmark has been established on an exclusively quantitative basis on the results of three distinct methods of multi-criteria decision aid: AHP and TOPSIS. It can help banks to assess of the quality of their credit portfolio (or, at least, their sectorial allocation) relative to the latter, which is derived from the aggregates of the entire banking sector. It would benefit from being usefully combined with a more qualitative analysis that escapes the spectrum of this study taking into account the quality and availability of the guarantee, track record, etc. The Student t-test, as the correlation coefficient has shown that the results of our different methods are in perfect correlation with the data of the bank, and the difference of the discrepancies between our methods and the data of the bank are random, that is to say not significant.
Article
Mean‐reverting portfolios with volatility and sparsity constraints are of prime interest to practitioners in finance since they are both profitable and well‐diversified, while also managing risk and minimizing transaction costs. Three main measures that serve as statistical proxies to capture the mean‐reversion property are predictability, portmanteau criterion, and crossing statistics. If in addition, reasonable volatility and sparsity for the portfolio are desired, a convex quadratic or quartic objective function, subject to nonconvex quadratic and cardinality constraints needs to be minimized. In this paper, we introduce and investigate a comprehensive modeling framework that incorporates all the previous proxies proposed in the literature and develop an effective unifying algorithm that is enabled to obtain a Karush–Kuhn–Tucker (KKT) point under mild regularity conditions. Specifically, we present a tailored penalty decomposition method that approximately solves a sequence of penalized subproblems by a block coordinate descent algorithm. To the best of our knowledge, our proposed algorithm is the first method for directly solving volatile, sparse, and mean‐reverting portfolio problems based on the portmanteau criterion and crossing statistics proxies. Further, we establish that the convergence analysis can be extended to a nonconvex objective function case if the starting penalty parameter is larger than a finite bound and the objective function has a bounded level set. Numerical experiments on the S&P 500 data set demonstrate the efficiency of the proposed algorithm in comparison to a semidefinite relaxation‐based approach and suggest that the crossing statistics proxy yields more desirable portfolios.
Article
Full-text available
In this paper, we study the problem of finding sparse, mean reverting portfolios in multivariate time series. This can be applied to developing profitable convergence trading strategies by identifying portfolios which can be traded advantageously when their prices differ from their identified long-term mean. Assuming that the underlying assets follow a VAR(1) process, we propose simplified, dense parameter estimation techniques which also provide a goodness of model fit measure based on historical data. Using these dense estimated parameters, we describe an exhaustive method to select an optimal sparse mean-reverting portfolio which can be used as a benchmark to evaluate faster, heuristic methods such as greedy search. We also present a simple and very fast heuristic to solve the same problem, based on eigenvector truncation. We observe that convergence trading using these portfolio selection methods is able to generate profits on historical financial time series.
Article
Full-text available
We examine the problem of finding sparse, mean reverting portfolios based on multivariate historical time series. After mapping optimal portfolio selections into a generalized eigenvalue problem, two different heuristic algorithms are referenced for finding the solution in a subspace which satisfies the cardinality constraint. Having identified the optimal portfolios, we outline the known methods for finding the long-term mean and introduce a novel approach based on pattern matching. Furthermore, we present a simple convergence trading algorithm with a decision theoretic approach, which can be used to compare the economic viability of the different methods and test the effectiveness of our end-to-end process by extensive simulations on generated and historical real market data.
Article
Full-text available
While the unconstrained portfolio optimization problem can be solved efficiently by standard algorithms, this is not the case for the portfolio optimization problem with additional real world constraints like cardinality constraints, buy-in thresholds, roundlots etc. In this paper we investigate two extensions to Evolu-tionary Algorithms (EA) applied to the portfolio optimization problem. First, we introduce a problem specific EA representation and then we add a local search for feasible solutions to improve the performance of the EA. All algorithms are compared on the constrained and unconstrained portfolio optimization problem.
Article
Full-text available
The Portfolio selection problem is a relevant problem arising in finance and economics. Some practical formulations of the problem include various kinds of nonlinear constraints and objectives and can be efficiently solved by approximate algorithms. Among the most effective approximate algorithms, are metaheuristic methods that have been proved to be very successful in many applications. This paper presents an overview of the literature on the application of metaheuristics to the portfolio selection problem, trying to provide a general descriptive scheme.
Article
With a method first indicated by Ornstein the mean values of all the powers of the velocity u and the displacement s of a free particle in Brownian motion are calculated. It is shown that u−u0exp(−βt) and s−u0β[1−exp(−βt)] where u0 is the initial velocity and β the friction coefficient divided by the mass of the particle, follow the normal Gaussian distribution law. For s this gives the exact frequency distribution corresponding to the exact formula for s2 of Ornstein and Fürth. Discussion is given of the connection with the Fokker-Planck partial differential equation. By the same method exact expressions are obtained for the square of the deviation of a harmonically bound particle in Brownian motion as a function of the time and the initial deviation. Here the periodic, aperiodic and overdamped cases have to be treated separately. In the last case, when β is much larger than the frequency and for values of t≫β−1, the formula takes the form of that previously given by Smoluchowski.
Article
We make an analogy between images and statistical mechanics systems. Pixel gray levels and the presence and orientation of edges are viewed as states of atoms or molecules in a lattice-like physical system. The assignment of an energy function in the physical system determines its Gibbs distribution. Because of the Gibbs distribution, Markov random field (MRF) equivalence, this assignment also determines an MRF image model. The energy function is a more convenient and natural mechanism for embodying picture attributes than are the local characteristics of the MRF. For a range of degradation mechanisms, including blurring, nonlinear deformations, and multiplicative or additive noise, the posterior distribution is an MRF with a structure akin to the image model. By the analogy, the posterior distribution defines another (imaginary) physical system. Gradual temperature reduction in the physical system isolates low energy states (``annealing''), or what is the same thing, the most probable states under the Gibbs distribution. The analogous operation under the posterior distribution yields the maximum a posteriori (MAP) estimate of the image given the degraded observations. The result is a highly parallel ``relaxation'' algorithm for MAP estimation. We establish convergence properties of the algorithm and we experiment with some simple pictures, for which good restorations are obtained at low signal-to-noise ratios.
Article
In this paper, we consider the portfolio selection problem. For 60 selected Hong Kong stocks, we form portfolios based on 10 years of observations. The classical Markowitz mean-variance model is compared with a downside risk optimization model for the Hong Kong stock market, fn particular, the downside risk model provided better downside risk protection in the sense of offering lower risk and higher return for the chosen data. The results also indicate that longer holding periods tend to result in higher portfolio returns. Lastly, the downside risk optimization approach allows investors to specify both required return levels and target return rates in order to reflect their risk attitudes.