Next Article in Journal
The Impact of Financial Derivatives on the Enterprise Value of Chinese Listed Companies: Moderating Effects of Managerial Characteristics
Previous Article in Journal
Do Customers Want to Communicate with Insurers on Social Media? An Investigation of the Swiss Market
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Solving Constrained Mean-Variance Portfolio Optimization Problems Using Spiral Optimization Algorithm

by
Werry Febrianti
1,2,*,
Kuntjoro Adji Sidarto
1 and
Novriana Sumarti
1,*
1
Department of Mathematics, Faculty of Mathematics and Natural Sciences, Institut Teknologi Bandung, Ganesa Street No. 10, Bandung 40132, Indonesia
2
Mathematics, Department of Sciences, Institut Teknologi Sumatera, Terusan Ryacudu Street, Way Huwi, South Lampung 35365, Indonesia
*
Authors to whom correspondence should be addressed.
Int. J. Financial Stud. 2023, 11(1), 1; https://doi.org/10.3390/ijfs11010001
Submission received: 9 November 2022 / Revised: 5 December 2022 / Accepted: 11 December 2022 / Published: 20 December 2022

Abstract

:
Portfolio optimization is an activity for balancing return and risk. In this paper, we used mean-variance (M-V) portfolio models with buy-in threshold and cardinality constraints. This model can be formulated as a mixed integer nonlinear programming (MINLP) problem. To solve this constrained mean-variance portfolio optimization problem, we propose the use of a modified spiral optimization algorithm (SOA). Then, we use Bartholomew-Biggs and Kane’s data to validate our proposed algorithm. The results show that our proposed algorithm can be an efficient tool for solving this portfolio optimization problem.

1. Introduction

A portfolio is a combination of various investment assets that are maintained to achieve investment goals. The assets investment combination will determine the high risk and large profits of the portfolio. Portfolios can contain a variety of investment assets such as stocks, bonds, properties, and cash. In general, investors always want to achieve the maximum rate of return on their investment. In fact, a fairly high return is often accompanied by a high level of risk. Therefore, we need a way to minimize this high risk. Thus, the portfolio has an important role. By using a portfolio, investors try to maximize the expected return at a certain level of risk or minimize risk at a certain target rate of return (expected return). A portfolio that can achieve this goal is called an efficient portfolio.
Regarding the level of expected return and risk, investors have their own preferences. Investors will choose a portfolio that is in accordance with their preferences for returns and the risks they will bear. To meet the investors’ preferences, an optimal portfolio is formed. This optimal portfolio is chosen by investors from the many choices available in an efficient portfolio collection. In general, the optimal portfolio is a portfolio that maximizes investor preferences with regard to investment returns and risks.
There are many theories regarding the formation of an efficient portfolio. One of them is by Markowitz (1959). The portfolio theory proposed by Markowitz is known as the mean-variance optimization model. Markowitz defined the return of an asset portfolio in the form of the expected value and the risk in the form of the variance of the portfolio’s return. He stated that mean-variance analysis has an important role in portfolio selection theory.
Markowitz described how to combine assets into an efficient and diversified portfolio. In this portfolio, risk can be reduced by adding the number of types of assets to the portfolio; the level of expected return can increase if there are differences in price movements of the combined assets. A comprehensive literature review of recent and novel papers about mean-variance portfolio optimization in which several variants of this model and additional constraints have been studied has been conducted by Kalayci et al. (2019). The review classifies the approaches according to exact and approximate attempts and analyzes the purposed algorithm based on various data and performance indicators in depth. Le Thi and Moeini (2006) have investigated a continuous approach for a generalization of the Markowitz mean-variance model which included buy-in threshold constraints. The existence of buy-in threshold constraints made the corresponding portfolio selection nonconvex and not easy to solve. Therefore, they expressed the buy-in threshold constraints as mixed zero-one linear constraints, then used an exact penalty result. They reformulated this problem in terms of a Difference of Convex functions (DC) program. The computational aspects of alternative portfolio selection models in the presence of discrete asset choice constraints were studied by Jobst et al. (2001). They considered the mean-variance (M-V) model of Markowitz and the risk-return efficient frontier. They examined the effects of applying buy-in threshold, cardinality constraints, and transaction round lot restrictions to the portfolio selection problem. The effects of adding these constraints cause the efficient frontier to become discontinuous. They proposed alternative approaches for computing this frontier and provided insights into its discontinuous structure. Cesarone et al. (2013) presented a study of the Limited Asset Markowitz (LAM) model based on a reformulation as a Standard Quadratic Program with a cardinality constraint. They used this reformulation to avoid the explicit use of additional binary variables. Gao and Li (2013) explored the special structures and rich geometric properties behind the mathematical formulation instead of tailoring this difficult problem into the general solution framework of a mixed-integer programming formulation. They applied Langrangian relaxation to the primal problem, resulting in a cardinality-constrained portfolio selection problem that possessed a symmetric property and developed geometric approaches. Dehghan Hardoroudi et al. (2017) used a transformation method to change the cardinality-constrained mean-variance (CCMV) portfolio optimization problem into a mixed integer linear programming (MILP) problem. They used a MILP solver to solve this CCMV portfolio optimization problem so that they did not need to develop a customized code to solve the problem. Kalayci et al. (2020) proposed an efficient hybrid metaheuristic algorithm that combined components from an ant colony, artificial bee colony optimization, and genetic algorithms to solve a cardinality-constrained multi-objective portfolio optimization problem. Akbay et al. (2020) developed an efficient solution approach called a parallel variable neighborhood search algorithm combined with quadratic programming to solve cardinality-constrained multi-objective portfolio optimization. Then, quadratic programming quickly calculated the proportion of assets, and a variable neighborhood search algorithm was used to decide the combination of assets to be held in the portfolio.
In 2009, Bartholomew-Biggs and Kane (2009) demonstrated the possibility of solving problems with buy-in threshold and round lot constraints using a global minimization approach that involved continuous rather than discrete variables. They also used a penalty function approach such that they could use the DIRECT method as one of the algorithms for unconstrained global minimization.
In this paper, we convert the problem of constrained mean-variance portfolio optimization with buy-in threshold and cardinality constraints into a mixed integer nonlinear programming (MINLP) problem. To solve this MINLP portfolio problem, we propose the use of a modified spiral optimization algorithm (SOA MINLP).
A spiral optimization algorithm (SOA) was proposed by Tamura and Yasuda (2011) as a metaheuristic algorithm that is inspired by spiral phenomena in nature. SOA was used to solve a mixed integer nonlinear programming problem by Kania and Sidarto (2016) and SOA with clustering was used to find solutions to systems of nonlinear equations by Sidarto and Kania (2015). SOA was also used to solve a combined economic and emission dispatch (Benasla et al. 2014).
In this paper, we use real data from Bartholomew-Biggs and Kane (2009) to verify our constrained mean-variance model with buy-in threshold and cardinality constraints.
The organization of this paper is as follows. In Section 2, we describe the portfolio optimization and MINLP problems. Then, in Section 3, we describe the spiral optimization algorithm (SOA). In Section 4, we describe the modified SOA for solving the portfolio optimization problem (SOA MINLP). In Section 5, a numerical example is given to illustrate the implementation of the SOA MINLP to find the minimum risk of the portfolio optimization problem with buy-in threshold and cardinality constraints. A conclusion is given in Section 6.

2. Portfolio Optimization Problem as a Mixed Integer Nonlinear Programming Problem

2.1. Portfolio Optimization Problem

We briefly describe portfolio theory before using the MINLP concept regarding the portfolio optimization problem. Portfolio theory is concerned with investors’ estimates of risk and return expectations, which are statistically measured to create investment portfolios. Markowitz (1959) described how to combine assets into an efficient and diversified portfolio. In practice, investors in securities often diversify their investments by combining various securities/stocks; otherwise stated, they form a portfolio of several shares/securities.
Portfolio theory starts with the assumption that future returns on securities can be estimated. Then, we can determine risk by using the variance of the distribution of returns.
Let y i represent the proportion ( 0 y i 1 ) of capital to be invested in asset i and y T = ( y 1 , y 2 , , y n ) . Then, for a set of n assets, we have the mean returns r ¯ T = ( r ¯ 1 , r ¯ 2 , r ¯ n   ) and Q as a n × n Variance-Covariance (positive semidefinite) matrix. Initially, we require the invested fractions to satisfy i = 1 n y i = 1 or equivalently e T y = 1 where e T = ( 1 , 1 , , 1 ) . Then, the problem of minimizing the total variance (risk= V ( y ) ) associated with the portfolio is solved by ensuring that the portfolio has an expected return R p , expressed as below:
min V ( y ) = y T Q y
subject   to :   r ¯ T y = R p i = 1 n y i = 1
In this paper, we do not allow short selling. Therefore, the formulation has changed to be as below:
min V ( y ) = y T Q y
subject   to :   r ¯ T y = R p i = 1 n y i = 1 y i 0 ,       i = 1 ,   2 ,   ,   n
A buy-in threshold is defined as the minimum level below which an asset cannot be purchased. This requirement eliminates unrealistically small trades that can otherwise be included in an optimized portfolio (Jobst et al. 2001). The portfolio optimization problem with a buy-in threshold constraint is stated below:
min V ( y ) = y T Q y
subject   to :   r ¯ T y = R p e T y = 1 l i z i y i u i z i ,       i = 1 ,   2 ,   ,   n 0 < l i < u i 1 z i { 0 , 1 }
where l i and u i   are finite lower and upper bounds associated with each asset i = 1 ,   2 ,   ,   n .
Cardinality constraints restrict the number of securities that are allowed in the portfolio (Jobst et al. 2001). In practice, the cardinality constraint is related to the buy-in threshold constraint. This means that we can achieve optimization using the formula below:
min V ( y ) = y T Q y
subject   to :   r ¯ T y = R p e T y = 1 i = 1 n z i = K l i z i y i u i z i ,       i = 1 ,   2 ,   ,   n 0 < l i < u i 1 z i { 0 , 1 }
where l i and u i are finite lower and upper bounds associated with each asset i = 1 ,   2 ,   ,   n .
In this cardinality constraint problem, K stocks are selected from n existing stocks.

2.2. Mixed Integer Nonlinear Programming

Based on data by Kania and Sidarto (2016), we can express the MINLP problem as follows:
min x n f ( x )
subject   to   g i ( x ) = 0 ,     i = 1 , 2 ,   , M and   h j ( x ) 0 , j = 1 , 2 ,   ,   N x = ( x 1 , x 2 , x q , x q + 1 , , x n ) T
where x 1 , x 2 , x q are integers for a given q .
The above problem can be transformed into an unconstrained problem using a penalty function. Therefore, the penalty function that we want to minimize is given by the following equation:
F ( x , α i , β j ) = f ( x ) + i = 1 M α i g i 2 ( x ) + j = 1 N β j ( max ( h j ( x ) , 0 ) ) 2
Here, α i and β j are large positive numbers as penalty constants. For simplicity, we use the same constants, α i and β j for i = 1 , 2 ,   , M and j = 1 , 2 ,   ,   N .
Based on the discussion above, we can transform the portfolio optimization problem with a buy-in threshold constraint into an MINLP problem by using a penalty function. Therefore, the penalty function that we want to minimize is given by the following equation:
F = y T Q y + ρ ( e T y 1 ) 2 + μ ( r ¯ T y R p 1 ) 2 + i = 1 n α i [ max ( 0 , ( y i + l i z i ) ) ] 2 +                                                                                                   i = 1 n β i [ max ( 0 , ( y i u i z i ) ) ] 2
where ρ , μ , α i , and β i are penalty constants.
For the cardinality constraint problem, as in Equation (4), we can transform the portfolio optimization problem into an MINLP problem by using a penalty function. Therefore, the portfolio optimization problem with a cardinality constraint can be transformed into an unconstrained problem as follows:
F = y T Q y + ρ ( e T y 1 ) 2 + μ ( r ¯ T y R p 1 ) 2 + λ i = 1 n ( z i K 1 ) 2 +                     i = 1 n α i [ max ( 0 , ( y i + l i z i ) ) ] 2 + i = 1 n β i [ max ( 0 , ( y i u i z i ) ) ] 2
where ρ , μ , λ , α i , and β i are penalty constants.

3. Spiral Optimization Algorithm

We review the spiral model in 2-dimensional and n -dimensional initially. Consider that R ( 2 ) = ( cos θ sin θ sin θ cos θ ) and x can be any vector in 2 . The multiplication of x by R ( 2 ) gives a counterclockwise rotation of x . The matrix R ( 2 ) represents the rotation in the 2D plane by an angle ( 0 < θ < 2 π ) . The multiplication of x by the diagonal matrix d i a g 2 ( r , r ) = ( r 0 0 r ) with 0 < r < 1 shortens the length of x in 2 by the factor of r . Therefore, the multiplication of the vector x in 2 by matrix S 2 ( r , θ ) = d i a g 2 ( r , r ) R ( 2 ) gives the geometric effect of the anticlockwise rotation of x through the angle θ , then shortens the vector R ( 2 )   x by a factor of r . Hence, the equation below:
x ( k + 1 ) = S 2 ( r , θ ) x ( k )   where   x ( k ) = ( x 1 ( k ) ,   x 2 ( k ) ) T ,   k = 0 , 1 , 2 ,
This describes the transformation of initial point x 0 in 2 repeatedly by the operator     x S 2 ( r , θ ) x . The graph of the sequence x 0 , x 1 , x 2 ,   in the 2D-plane produces a trajectory of a spiral form; thus, in the case of 0 < r < 1 , the point x 0 spirals inward and toward the origin as the geometric effect of S 2 ( r , θ ) . Based on translating the initial point toward an arbitrary point x * , Equation (9) is given as below:
x ( k + 1 ) x * = S 2 ( r ,   θ ) ( x ( k ) x * )
where x ( k ) = ( x 1 ( k ) ,   x 2 ( k ) ) T , k = 0 , 1 , 2 , , which gives the below equation:
x ( k + 1 ) = S 2 ( r ,   θ ) x ( k ) ( S 2 ( r ,   θ ) I 2 ) x *
where x ( k ) = ( x 1 ( k ) ,   x 2 ( k ) ) T , k = 0 , 1 , 2 ,
The iterated point u k = u ( k ) = x ( k ) x * , k = 0 , 1 , 2 , in Equation (10) spirals inward toward the origin so that the iterates of point x 0 spiral inward toward point x * on the plane.
The extension of the 2-D spiral model into an n -dimensional spiral model can be achieved with the help of a rotation matrix in n -dimensional space. In this case, rotation in the n-dimension is performed in a similar way as in 2-dimensional rotation. Consider that R i , j ( n ) can be an n × n matrix with entries r i i = r j j = cos θ , r j i = sin θ ,     r i j = sin θ , and that r s t = δ s t for all other entries of R i , j ( n ) (where if s = t and δ s t = 0 if s t ). Here, R i , j ( n ) resembles the identity matrix except for the ii, ij, jj, and j i positions. The multiplication of a vector by rotation matrix only alters the and j t h components of the vector. It has no effect on other components. Thus, R i , j ( n ) acts as a plane rotation. In total, we have ( n 2 ) = n ! 2 ! ( n 2 ) ! = 1 2 n ( n 1 ) number of plane rotation matrices. Consider that R ( n ) can be an n × n matrix defined as follows:
R ( n ) = i = 1 n 1 ( j = 1 i R ( n ) n i ,   n + 1 j )  
R ( n ) is a composition of plane rotation matrix R i , j ( n ) . Using this composition rotation matrix, the n-dimensional spiral model is formulated as below:
x ( k + 1 ) = S n ( r ,   θ ) x ( k )
where x ( k ) = ( x 1 ( k ) ,   x 2 ( k ) ,   ,     x n ( k ) ) T and S n ( r ,   θ ) = d i a g n ( r , r , , r ) R ( n )
Having translated the initial point toward an arbitrary point x * , the n -dimensional spiral model with its center at x * is defined as follows:
x ( k + 1 ) = S n ( r ,   θ ) x ( k ) ( S n ( r ,   θ ) I n ) x *
where x ( k ) = ( x 1 ( k ) ,   x 2 ( k ) ,   ,     x n ( k ) ) T , and S n ( r ,   θ ) = d i a g n ( r , r , , r ) R ( n )
Now, consider the optimization problem
max x n F ( x )  
with
x = ( x 1 , x 2 , x n ) T n
Hence, based on Sidarto and Kania (2015), we show the algorithm of n -dimensional spiral optimization algorithm in Algorithm 1.
Algorithm 1. Spiral Optimization Algorithm
1:Input:
m 2 , the number of search points
θ ( 0 < θ < 2 π ) ,    r   ( 0 < r < 1 )
k m a x maximum number of iterations
2:Process:
Step 1. Generate randomly initial points x i ϵ n ,   i = 1 , 2 , , m in the feasible region
Step 2. Set k = 0
Step 3. Find x * as x * = x i g ( 0 ) ,     i g = arg min i F ( x i ( 0 ) )   ,   i = 1 , 2 , , m
Step 4. Update x i ( k ) to be x i ( k + 1 )   =   S n ( r ,   θ ) x i ( k ) ( S n ( r ,   θ ) I n ) x * ,   i = 1 , 2 , , m
Step 5. Update x * to be x * = x i g ( k + 1 ) ,     i g = arg max i F ( x i ( k + 1 ) ) ,   i = 1 , 2 , , m
Step 6. If k = k m a x then stop. Otherwise, set k = k + 1 and return to step 4.
3:Output: x * as a minimum point of F ( x )

4. Spiral Optimization Algorithm for the Portfolio Optimization Problem

We propose a method for solving the portfolio optimization problem using a modified SOA. The main modification occurs in the calculation of the objective function. We round to the nearest integer for variables that must be an integer in the computation, but keep the variables as real when spiral iterations are conducted. Algorithm 2 below is based on a study by Kania and Sidarto (2016).
Algorithm 2. Spiral Optimization Algorithm for Solving the MINLP Problem
1:Input:
m 2 , the number of search points
θ ( 0 < θ < 2 π ) ,   r   ( 0 < r < 1 )
k m a x maximum number of iterations
2:Process:
Step 1. Generate randomly initial points x i ϵ n ,   i = 1 , 2 , , m in the feasible region
Step 2. Set k = 0
Step 3. For i = 1 , 2 , , m , find F ( y i ( 0 ) )
where
y i ( 0 ) = ( y i 1 ( 0 )   y i 2 ( 0 ) y i j ( 0 ) y i n ( 0 ) ) T
with
y i j ( 0 ) = { r o u n d   ( x i j ( 0 ) ) x i j ( 0 )                                       ,   if   x i j   must   be   integer ,   otherwise                                                  
Step 4. Find x * as x * = x i g ( 0 ) with i g = arg min i F ( y i ( 0 ) ) ,     i = 1 , 2 , , m
Step 5. Update the value of x i ( k ) to be x i ( k + 1 ) such that we get
x i ( k + 1 ) = S n ( r ,   θ ) x ( k ) ( S n ( r ,   θ ) I n ) x * , i = 1 , 2 , , m
Step 6. Update the value of x * to be x i g ( k + 1 ) ,     i g = arg min i F ( y i ( k + 1 ) )
where
y i ( k + 1 ) = ( y i 1 ( k + 1 ) y i 2 ( k + 1 ) y i j ( k + 1 ) y i n ( k + 1 ) ) T
with
y i j ( k + 1 ) = { r o u n d   x i j ( k + 1 ) x i j ( k + 1 )                           ,   if   x i j   must   be   integer ,   otherwise                                              
Step 7. If k = k m a x   then stop. Otherwise, set k = k + 1 and return to step 5.
Step 8. Set y * = ( y 1 * y 2 * y j * y n * ) T where
y j * = { r o u n d ( x j * ) x j *                                 ,   if   x j *   must   be   integer ,   otherwise                                                
3:Output : y * as minimum point
In the following section, we develop an SOA for the portfolio optimization problem with buy-in threshold and cardinality constraints, as stated in Algorithms 3 and 4.
Algorithm 3. SOA for Portfolio Optimization Problem with Buy-In Threshold Constraint
1:Preliminaries:
Spiral Input Parameter: m (≥2) the number of search points, θ (0 ≤ θ ≤ 2π), r (0 < r < 1), kmax maximum number of iterations
Portfolio Input Parameter: Rp (target return), Q (covariance matrix), ρ ,   μ , α i ,   β i (penalty parameters), l i and u i (finite lower and upper bounds of assets proportion)
2:Initialization:
Generate initial z i = ( z 1 ( 0 )   z 2 ( 0 ) z m ( 0 ) ) = r o u n d ( r a n d ( ) ) ,
y i = ( l i + ( u i l i ) · r a n d ( ) ) · z i    
i = 1 , 2 , , m , in the feasible search space randomly.
3:Assign k = 0
For i = 1,2,⋯, m, find F ( y i ( 0 ) , z i ( 0 ) )
where
y i ( 0 ) = ( y i 1 ( 0 )   y i 2 ( 0 ) y i j ( 0 ) y i n ( 0 ) ) T
z i ( 0 ) = ( z i 1 ( 0 )   z i 2 ( 0 ) z i j ( 0 ) z i n ( 0 ) ) T
and
F ( y , z ) = y T Q y + ρ ( e T y 1 ) 2 + ρ ( r ¯ T y R p 1 ) 2 + i = 1 n α i [ max ( 0 , ( y i + l i z i ) ) ] 2 + i = 1 n β i [ max ( 0 , ( y i u i z i ) ) ] 2
with l i z i y i u i z i ,     i = 1 , 2 , , m
4:Find y * and z * as y * = y i g ( 0 ) and z * = z i g ( 0 )
with i g = arg min i F ( y i ( 0 ) , z i ( 0 ) ) ,     i = 1 , 2 , , m
5:Update the value of y i ( k )   to be y i ( k + 1 )   and z i ( k )   to be z i ( k + 1 )   as follows:
y i ( k + 1 )   = S n ( r ,   θ ) y ( k ) ( S n ( r ,   θ ) I n ) y * , i = 1 , 2 , , m
z i ( k + 1 ) = r o u n d ( S n ( r ,   θ ) z ( k ) ( S n ( r ,   θ ) I n ) z * ) ,   i = 1 , 2 , , m
6:Update the values of y * and z *
y * = y i g ( k + 1 ) ,     and z * = z i g ( k + 1 ) ,
i g = arg min i F ( y i ( k + 1 ) ,   z i ( k + 1 )   ) ,   i = 1 , 2 , , m
where
y i ( k + 1 ) = ( y i 1 ( k + 1 ) y i 2 ( k + 1 ) y i j ( k + 1 ) y i n ( k + 1 ) ) T
z i ( k + 1 ) = ( z i 1 ( k + 1 ) z i 2 ( k + 1 ) z i j ( k + 1 ) z i n ( k + 1 ) ) T
with
l i z i y i u i z i ,   i = 1 , 2 , , m
7:If k = k m a x , end to the program. Otherwise, choose k = k + 1 and return to step 5.
8:Choose y * = ( y 1 * y 2 * y j * y n * ) T and z * = ( z 1 * z 2 * z j * z n * ) T
9:Output : y * and z *
Algorithm 4. SOA for Portfolio Optimization Problem with Cardinality Constraint
1:Preliminaries:
Spiral Input Parameter: m (≥2) the number of search points, θ (0 ≤ θ ≤ 2π), r (0 < r < 1), kmax maximum number of iterations
Portfolio Input Parameter: Rp (target return), Q (covariance matrix), ρ , μ , λ , α i , β i (penalty parameters), l i and u i (finite lower and upper bounds of assets proportion)
2:Initialization:
Generate initial z i = r o u n d ( r a n d ( ) ) , y i = ( l i + ( u i l i ) · r a n d ( ) ) · z i  
i = 1 , 2 , , m , in the feasible search space randomly.
3:Assign k = 0
For i = 1,2,⋯, m, find F ( y i ( 0 ) , z i ( 0 ) )
where
y i ( 0 ) = ( y i 1 ( 0 )   y i 2 ( 0 ) y i j ( 0 ) y i n ( 0 ) ) T
z i ( 0 ) = ( z i 1 ( 0 )   z i 2 ( 0 ) z i j ( 0 ) z i n ( 0 ) ) T

and
F ( y , z ) = y T Q y + ρ ( e T y 1 ) 2 + μ ( r ¯ T y R p 1 ) 2 + λ i = 1 n ( z i K 1 ) 2 +
+ i = 1 n α i [ max ( 0 , ( y i + l i z i ) ) ] 2 + i = 1 n β i [ max ( 0 , ( y i u i z i ) ) ] 2
with l i z i y i u i z i ,     i = 1 , 2 , , m
4:Find y * and z * as y * = y i g ( 0 ) and z * = z i g ( 0 )
with i g = arg min i F ( y i ( 0 ) , z i ( 0 ) ) ,   i = 1 , 2 , , m
5:Update the value of y i ( k ) to be y i ( k + 1 ) and z i ( k ) to be   z i ( k + 1 ) as follows:
y i ( k + 1 )   = S n ( r ,   θ ) y ( k ) ( S n ( r ,   θ ) I n ) y * , i = 1 , 2 , , m  
z i ( k + 1 ) = r o u n d ( S n ( r ,   θ ) z ( k ) ( S n ( r ,   θ ) I n ) z * ) ,   i = 1 , 2 , , m
6:Update the values of y * and z *
y * = y i g ( k + 1 ) ,     and z * = z i g ( k + 1 ) ,
i g = arg min i F ( y i ( k + 1 ) ,   z i ( k + 1 )   ) ,   i = 1 , 2 , , m
where
y i ( k + 1 ) = ( y i 1 ( k + 1 ) y i 2 ( k + 1 ) y i j ( k + 1 ) y i n ( k + 1 ) ) T
z i ( k + 1 ) = ( z i 1 ( k + 1 ) z i 2 ( k + 1 ) z i j ( k + 1 ) z i n ( k + 1 ) ) T
with
l i z i y i u i z i ,   i = 1 , 2 , , m
7:If k = k m a x , then end the program. Otherwise, choose k = k + 1 and return to step 5.
8:Choose y * = ( y 1 * y 2 * y j * y n * ) T and z * = ( z 1 * z 2 * z j * z n * ) T
9:Output : y * and z *

5. Numerical Examples

We used a spiral optimization algorithm to solve the mixed integer nonlinear programming (SOA MINLP) problem to minimize the risk of the portfolio with given expected returns. All computations were run using MATLAB R2020b in an HP PC equipped with Windows 10 and processor Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz with 32 GB ram.
We used data from Bartholomew-Biggs and Kane (2009), which consists of five assets. The vector of the mean return was as follows:
r ¯ = ( 0.056 ,   0.324 ,   0.343 ,   0.132 ,   0.108 ) T
Then, the variance-covariance matrix was as follows:
Q = ( 2.4037   0.0222 0.5230 0.2612 0.6126 0.0222 1.8912 0.0442 0.0020 0.4272 0.5230 0.0442 1.7704 0.2283 0.3103 0.2612   0.0020 0.2283   4.4812 0.1134 0.6126   0.4272 0.3103 0.1134 7.7490 )
The target return was R p = 0.25 % , y m i n = 0.05 and penalty parameters were ρ = 10 8 .
We used this data to solve portfolio optimization with buy-in threshold and cardinality constraints.
The SOA MINLP parameters that we used were as follows:
m = 50,000 ,   r = 0.99 ,   θ = π 32   ,   k m a x = 1000
The result of SOA MINLP with the buy-in threshold using Bartholomew-Biggs and Kane’s data is shown in Table 1. We also show a comparison result from Bartholomew-Biggs and Kane to solve the portfolio optimization problem with a buy-in threshold constraint using data from Bartholomew-Biggs and Kane (2009).
Our result is close to that of Bartholomew-Biggs and Kane (2009), which used the hybrid DIRECT and quasi-Newton methods. The results of the invested fractions after 20 iterations are as follows:
y 1 = 0.125 ,   y 2 = 0.364 ,   y 3 = 0.344 ,   y 4 = 0.116 ,   y 5 = 0.05
with a portfolio risk of 0.6906 . We can conclude that our SOA MINLP can approximate the value of this portfolio risk.
We ran the SOA MINLP for the buy-in threshold and cardinality constraints for 50 iterations in order to obtain the best results. The results of the portfolio optimization with a buy-in threshold constraint are presented in Table 1. The results of the portfolio optimization with a cardinality constraint are presented in Table 2.
Based on the results in Table 1, the minimum risk is equal to 0.6969, with the given target return as 0.25. Then, the total proportion of investment is equal to 1 with the active stock equal to 5. We also used the buy-in threshold constraint y m i n = 0.05 . The results of the invested fractions were as follows:
y 1 = 0.1367 ,   y 2 = 0.3893 ,   y 3 = 0.3331 ,   y 4 = 0.0911 ,   y 5 = 0.0506
Based on the results in Table 2, the minimum risk was equal to 0.6978, with the given target return as 0.25. Then, the total proportion of investment was equal to 1 with the active stock equal to 5 as we used a cardinality constraint of K = 5. We also used the buy-in threshold constraint y m i n = 0.05 . The results of the invested fractions of this portfolio problem with the cardinality constraint were as follows:
y 1 = 0.1288 ,   y 2 = 0.3858 ,   y 3 = 0.3267 ,   y 4 = 0.0882 ,   y 5 = 0.0675

6. Conclusions

This paper discussed the portfolio optimization problem with buy-in threshold and cardinality constraints and tested an extension of Markowitz’s mean-variance model. We modified the spiral optimization algorithm (SOA) to solve the mixed integer nonlinear programming (MINLP) problem. The modification of SOA is called SOA MINLP. This algorithm is designed to solve a constrained portfolio optimization problem. By adding constraints to the Markowitz mean-variance model, we could capture real-world restrictions on actual investments. We compared the results of SOA MINLP with those obtained using Quasi-Newton and DIRECT methods. The results show that SOA MINLP can be a tool for finding portfolio optimization solutions. We changed the constrained portfolio optimization problem into an unconstrained one. We also added nonlinear constraints to the portfolio problem. Therefore, we could work straightforwardly with variables. We used metaheuristics such as SOA as a solver for unconstrained portfolio optimization problems.
SOA is a metaheuristic method famous for its speed in finding solutions to optimization problems. For large enough data, modern techniques (such as metaheuristics) will certainly be more effective than classical methods as they constitute a mesh-free method that does not use the gradient to solve the problem. We gave a numerical example to illustrate our proposed model and the effectiveness of the SOA MINLP algorithm. We used data from Bartholomew-Biggs and Kane (2009). Furthermore, we compared our SOA MINLP with Quasi-Newton and DIRECT methods. The results indicate that the proposed approach is an efficient way to solve unconstrained portfolio optimization problems using the penalty function. We can also work with a discrete variable to simulate a real-world condition. As SOA MINLP succeeds in approximating the risk value of a constrained mean-variance portfolio problem with a given target return, SOA MINLP can be a good tool for solving portfolio optimization problems with buy-in threshold and cardinality constraints.

Author Contributions

Supervision, K.A.S. and N.S.; Writing—original draft, W.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Indonesian Minister of Research and Technology/National Research and Innovation Agency, Indonesia, Grant Number 2/E1/KP.PTNBH/2021 and Domestic Postgraduate Scholarship for New College or BPPDN Afirmasi PTNB in 2019 from The Ministry of Education, Culture, Research, and Technology, Indonesia. The Article Processing Charge (APC) was funded by the Indonesian Minister of Research and Technology/National Research and Innovation Agency, Indonesia, Grant Number 007/E5/PG.02.00.PT/2022 and Institute for Research and Community Services Institut Teknologi Sumatera (ITERA).

Acknowledgments

The authors are grateful to the anonymous reviewers for comments and suggestions which have helped to strengthen this paper. The authors also grateful to Rector of ITERA for facilitating the funding of this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Akbay, Mehmet Anil, Can B. Kalayci, and Olcay Polat. 2020. A parallel variable neighborhood search algorithmwith quadratic programming for cardinality constrained portfolio optimization. Knowledge-Based Systems 198: 105944. [Google Scholar] [CrossRef]
  2. Bartholomew-Biggs, Mike C., and Stephen. J. Kane. 2009. A global optimization problem in portfolio selection. Computational Management Science 6: 329–45. [Google Scholar] [CrossRef] [Green Version]
  3. Benasla, Lahouaria, Abderrahim Belmadani, and Mostefa Rahli. 2014. Spiral optimization algorithm for solving combined economic and emission dispatch. International Journal of Electrical Power & Energy Systems 62: 163–74. [Google Scholar]
  4. Cesarone, Francesco, Andrea Scozzari, and Fabio Tardella. 2013. A new method for mean-variance portfolio optimization with cardinality constraints. Annals of Operations Research 205: 213–34. [Google Scholar] [CrossRef]
  5. Dehghan Hardoroudi, Nasim, Abolfazl Keshvari, Markku Kallio, and Pekka Korhonen. 2017. Solving cardinality constrained mean-variance portfolio problems via milp. Annals of Operations Research 254: 47–59. [Google Scholar] [CrossRef]
  6. Gao, J., and D. Li. 2013. Optimal cardinality constrained portfolio selection. Operations Research 61: 745–61. [Google Scholar] [CrossRef]
  7. Jobst, Norbert J., Michael D. Horniman, Cormac A. Lucas, and Gautam Mitra. 2001. Computational aspects of alternative portfolio selection models in the presence of discrete asset choice constraints. Quantitative Finance 1: 489. [Google Scholar] [CrossRef] [Green Version]
  8. Kalayci, Can B., Okkes Ertenlice, and Mehmet Anil Akbay. 2019. A comprehensive review of deterministic models and applications for mean-variance portfolio optimization. Expert Systems with Applications 125: 345–68. [Google Scholar] [CrossRef]
  9. Kalayci, Can B., Olcay Polat, and Mehmet A. Akbay. 2020. An efficient hybrid metaheuristic algorithm for cardinality constrained portfolio optimization. Swarm and Evolutionary Computation 54: 100662. [Google Scholar] [CrossRef]
  10. Kania, Adhe, and Kuntjoro Adji Sidarto. 2016. Solving mixed integer nonlinear programming problems using spiral dynamics optimization algorithm. AIP Conference Proceedings 1716: 020004. [Google Scholar]
  11. Le Thi, Hoai An, and Mahdi Moeini. 2006. Portfolio selection under buy-in threshold constraints using DC programming and DCA. Paper presented at the 2006 International Conference on Service Systems and Service Management, Troyes, France, October 25–27; vol. 1, pp. 296–300. [Google Scholar]
  12. Markowitz, Merton H. 1959. Portfolio Selection: Efficient Diversification of Investments. New Haven: Yale University Press. [Google Scholar]
  13. Sidarto, Kuntjoro Adji, and Adhe Kania. 2015. Finding all solutions of systems of nonlinear equations using spiral dynamics inspired optimization with clustering. Journal of Advanced Computational Intelligence and Intelligent Informatics 19: 697–707. [Google Scholar] [CrossRef]
  14. Tamura, Kenichi, and Keiichiro Yasuda. 2011. Spiral dynamics inspired optimization. Journal of Advanced Computational Intelligence and Intelligent Informatics 15: 1116–22. [Google Scholar] [CrossRef]
Table 1. Comparison result from SOA MINLP with the result of Bartholomew-Biggs and Kane for solving the portfolio optimization problem with a buy-in threshold constraint using data from Bartholomew-Biggs and Kane (2009).
Table 1. Comparison result from SOA MINLP with the result of Bartholomew-Biggs and Kane for solving the portfolio optimization problem with a buy-in threshold constraint using data from Bartholomew-Biggs and Kane (2009).
Stock NumberSOA MINLP Result Using Equation (7) with
y m i n = 0.05
Quasi-Newton in Bartholomew-Biggs DIRECT in Bartholomew-Biggs
y i z i y i y i
10.136710.1520.122
20.389310.3810.369
30.333110.3480.339
40.091110.1180.111
50.0506100.058
Risk0.69690.70050.6935
Table 2. SOA MINLP for solving the portfolio optimization problem with cardinality constraint K = 5 using data from Bartholomew-Biggs and Kane (2009).
Table 2. SOA MINLP for solving the portfolio optimization problem with cardinality constraint K = 5 using data from Bartholomew-Biggs and Kane (2009).
Stock NumberCardinality Constraint Result Using Equation (8) with
y m i n   =   0.05
y i z i
10.12881
20.38581
30.32671
40.08821
50.06751
Risk0.6978
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Febrianti, W.; Sidarto, K.A.; Sumarti, N. Solving Constrained Mean-Variance Portfolio Optimization Problems Using Spiral Optimization Algorithm. Int. J. Financial Stud. 2023, 11, 1. https://doi.org/10.3390/ijfs11010001

AMA Style

Febrianti W, Sidarto KA, Sumarti N. Solving Constrained Mean-Variance Portfolio Optimization Problems Using Spiral Optimization Algorithm. International Journal of Financial Studies. 2023; 11(1):1. https://doi.org/10.3390/ijfs11010001

Chicago/Turabian Style

Febrianti, Werry, Kuntjoro Adji Sidarto, and Novriana Sumarti. 2023. "Solving Constrained Mean-Variance Portfolio Optimization Problems Using Spiral Optimization Algorithm" International Journal of Financial Studies 11, no. 1: 1. https://doi.org/10.3390/ijfs11010001

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop