Portfolio Optimization With Multi-Objective Optimization Algorithms
Portfolio Optimization With Multi-Objective Optimization Algorithms
net/publication/376167917
Article in International Journal of Advanced Natural Sciences and Engineering Researches · October 2023
DOI: 10.59287/as-ijanser.384
CITATION READS
1 366
2 authors:
All content following this page was uploaded by Tohid Yousefi on 02 December 2023.
(4th International Conference on Engineering and Applied Natural Sciences ICEANS 2023, November 20-21, 2023)
ATIF/REFERENCE: Yousefi, T. & Aktaş, Ö. (2023). Portfolio Optimization with Multi-Objective Optimization Algorithms.
International Journal of Advanced Natural Sciences and Engineering Researches, 7(10), 382-389.
Abstract – One of the critical issues in financial management is the investment decision-making process,
and one of the main goals of investment management is optimal stock portfolio selection. In this context,
there are various criteria and methods for optimal stock portfolio selection in the literature. This article
first calculates investment return and investment risk using data from 6 companies such as Amazon,
Yahoo, Microsoft, IBM, Apple, and Google for a one-month period from January 2014 to November
2014. Investment is calculated by 4 classical methods (mean-variance, mean-semi variance, mean
absolute deviation, conditional value at risk). As a result of these calculations, 0.05706, 0.028409,
0.028871, and 0.032995 with maximum ROI (0.0142 respectively) and Risk are calculated for each
classical method. Then, meta-heuristic methods (PSO, NSGA-II) are used for optimal selection of the
portfolio. As a result of the calculations, it can be seen that the NSGA-II meta-heuristic algorithm tends to
achieve the highest return on investment with a lower risk. These results suggest that the integration of
advanced computational methods, such as multi-objective optimization algorithms, may be important to
improve the precision and efficiency of portfolio selection in financial management. This can provide
valuable insights for investors and financial analysts.
Keywords – Modern Portfolio Theory, Markowitz Mean-Variance, Mean Semi Variance, Mean Absolute Deviation,
Conditional Value at Risk, Portfolio Optimization, Particle Swarm Optimization, Non-Dominated Sorting Genetic Algorithm-II
the same time. Finding these exchange portfolios Markowitz with the aim of maximizing the
requires solving a multi-objective nonlinear expected returns, provided the variance is limited
optimization problem [4]. from above [8].
In recent years, stock investment is not only In generally, parametric risk can be measured
heavily traded by organizations, but it has become using various mathematical formulas and through
quite common for household investors to invest in the concept of diversification, which aims to select
the stock market as well. Investors usually do not the correct weighted set of investment assets,
like and avoid risk-taking and always look to invest which together are less risky factors than investing
in commodities and stocks of assets that have the in any single asset or asset class. Diversity is the
highest returns and the least risk for them. In other main concept of modern portfolio theory [7].
words, return on investment is considered as a Markowitz showed that under certain conditions,
favorable factor and risk variance is considered as investor portfolio selection can be reduced by
an undesirable element. In portfolio optimization balancing the expected portfolio return and
issues, the main issue is the optimal selection of portfolio risk (variance). Given the potential for
assets and securities that can minimize risk and diversity risk reduction, portfolio investment risk,
maximize return on investment. There are many measured as its variance, depends on both the
ways to create an optimal stock [5]. The concepts variances of individual asset returns and the
of portfolio optimization and diversity are useful in "covariance" of asset pairs [9]. In this part of the
developing and understanding financial markets article, we review the classical methods used in
and decision making in this area. The publication optimal portfolio selection.
of Harry Markowitz's portfolio theory was also the
1) Mean Variance Model
main and most important achievement in this field.
Markowitz suggested that investors accept risk and The issue of portfolio allocation in financial
return together and choose the amount of capital subjects is of great theoretical and practical
allocation between different investment importance. The main goal of investors is to divide
opportunities based on the interaction between the their capital among different assets in the best way.
two [6]. The first fundamental solution to this problem was
One of the methods that has been used in recent proposed by Harry Markowitz. Markowitz
years to solve many optimization problems is the considered the portfolio selection process as a
use of heuristic algorithms. Innovative methods matter of optimizing the mean variance, the basic
that have been introduced to address the idea of which is to balance risk and return [10]. In
shortcomings of classical optimization methods the old approach to portfolio selection, the investor
with a comprehensive and random search, greatly must estimate the expected return on stocks at t = 0
guarantee the possibility of better results. In this and then invest in the stocks with the highest
paper, meta-heuristic methods and algorithms expected returns. According to Markowitz's theory,
(PSO and NSGA-II) have been used to select the this decision is irrational because the investor, in
appropriate portfolio. In reviewing the results addition to maximizing the expected return, also
obtained from portfolios, meta-heuristic methods wants to ensure the return as safe as possible, so
have less risk and higher returns than classical the investor should seek to balance maximizing the
methods. expected return and reducing investment
uncertainty. Markowitz also suggested that
II. MATERIALS AND METHOD investors should consider risk and return together
and allocate their budgets between investment
A. Classic Methods for Portfolio Optimization
options based on risk-return swaps [11]. The
Harry Markowitz's work formed the basis of Markowitz model assumes that investors make
what is now known as the Modern Portfolio their decision to build a portfolio by selecting
Theory. Modern portfolio theory (MPT) is an assets that maximize the return on their portfolio at
investment framework for selecting and building the end of the investment period. The mean
an investment portfolio based on maximizing the variance of the Markowitz portfolio can be
expected return on the portfolio while minimizing expressed mathematically as follows [4]:
investment risk [7]. The problem of selecting the
optimal portfolio was proposed in 1952 by Harry
383
International Journal of Advanced Natural Sciences and Engineering Researches
𝑛
acceptable than variance because it is applicable
𝜇𝑝 = ∑ 𝑤𝑖 𝜇𝑖 = 𝑊 𝑇 𝜇 (1) even when the distribution of return on assets
𝑖=1 shows a wider sequence [4]. Mao [12] supports the
𝑛 𝑛
fact that investors are only interested in downside
𝜎𝑝2 = ∑ ∑ 𝑤𝑖 𝑤𝑗 𝜎𝑖𝑗 = 𝑊 𝑇 𝛴 𝑤 (2) risks and that the semi-variance criterion is more
𝑖=1 𝑗=1 appropriate for use than the average variance
𝑛 criterion. The semi variance defined as [4]:
𝑛
∑ 𝑤𝑖 = 1
𝑠. 𝑡 { (3) 𝜇𝑝 = ∑ 𝑤𝑖 𝜇𝑖 = 𝑊 𝑇 𝜇 (4)
𝑖=1
𝑤𝑖 ≥ 0 𝑖=1
𝑛 𝑛
Where 𝑤𝑖 is weight or proportion of asset 𝑖 in in
𝜎𝑝2 = ∑ ∑ 𝑤𝑖 𝑤𝑗 𝜎𝑖− 𝜎𝑗− 𝜌𝑖𝑗 = 𝑊 𝑇 𝛴− 𝑤 (5)
the portfolio 𝑝, 𝜇𝑖 is expected return of asset 𝑖, 𝜇𝑝
𝑖=1 𝑗=1
is the expected return of the portfolio, 𝜎𝑖𝑗 is 𝑛
covariance between asset 𝑖 and 𝑗, if 𝑖 = 𝑗, it is
∑ 𝑤𝑖 = 1
variance of asset 𝑖 and 𝜎𝑝2 is variance of the 𝑠. 𝑡 { (6)
𝑖=1
portfolio assets. 𝑤𝑖 ≥ 0
The problem of portfolio optimization is
formulated as maximizing the expected return by Where 𝑤𝑖 is weight or proportion of asset 𝑖 in in
considering the upper limit for variance of the the portfolio 𝑝, 𝜇𝑖 is expected return of asset 𝑖, 𝜇𝑝
investment portfolio (equation 4 and 5) or is the expected return of the portfolio, 𝜎𝑝2 is
minimizing the variance by considering the lower variance of the portfolio assets.
limit for the expected return (equation 6 and 7) The following formulas are used to calculate
[11]: downside risk:
𝑛 2
𝜎𝑝2 = 𝑣𝑎𝑟{𝑅𝑝 (𝑡)} = 𝔼 {(𝑅𝑝 (𝑡) − 𝜇𝑝 ) } (7)
𝑇
max 𝜇𝑝 = ∑ 𝑤𝑖 𝜇𝑖 = 𝑊 𝜇 (1)
2 2
𝑖=1 𝜎𝑝− = 𝔼 {(𝑅𝑝 (𝑡) − 𝜇𝑝 ) | 𝑅𝑝 (𝑡) < 𝜇𝑝 } (8)
𝑛 𝑛
𝜎𝑖𝑗 = 𝜎𝑖 𝜎𝑗 𝜌𝑖𝑗 ⇒ 𝜎𝑖𝑗− = 𝜎𝑖− 𝜎𝑗− 𝜌𝑖𝑗 (9)
𝜎𝑝2 = ∑ ∑ 𝑤𝑖 𝑤𝑗 𝜎𝑖𝑗 = 𝑊 𝑇 𝛴 𝑤 ≤ 𝜎𝑝20
2
𝑖=1 𝑗=1 Where 𝜎𝑝− is semi variance of the portfolio
𝑠. 𝑡 𝑛 (5) assets and 𝑅𝑝 (𝑡) < 𝜇𝑝 is the downside risk.
∑ 𝑤𝑖 = 1
𝑖=1 3) Mean Absolute Deviation Model
{ 𝑤𝑖 ≥ 0 The mean absolute deviation (MAD) approach
𝑛 𝑛 has been proposed by Konno and Yamazaki
min 𝜎𝑝2 = ∑ ∑ 𝑤𝑖 𝑤𝑗 𝜎𝑖𝑗 = 𝑊 𝑇 𝛴 𝑤 (2) [13]and is now widely used by experts to solve a
𝑖=1 𝑗=1 portfolio optimization problem on a very large
𝑛 scale. The MAD model uses absolute deviation of
𝜇𝑝 = ∑ 𝑤𝑖 𝜇𝑖 = 𝑊 𝑇 𝜇 ≥ 𝜇𝑝0 the portfolio rate of return instead of variance as a
𝑖=1 risk measure. These two criteria are
𝑛
𝑠. 𝑡 (3) mathematically equivalent to each other. However,
∑ 𝑤𝑖 = 1 they are computationally different because the
𝑖=1 former can be reduced to a linear programming
{ 𝑤𝑖 ≥ 0 problem, while the latter leads to a convex
quadratic programming problem [14]. MAD leads
2) Mean Semi Variance Model to a linear programming model that has been
proven to be equivalent to the Markowitz model
The mean variance method for portfolio
but much more computationally tractable [15].
optimization has been widely criticized by
Mean absolute deviation defined as [13]:
researchers in this field. Markowitz later criticized
𝑠𝑖 = 𝔼{|𝑟𝑖 (𝑡) − 𝜇𝑖 |} (10)
the use of mean-variance as a measure of risk in
portfolio management. This criterion is more
384
International Journal of Advanced Natural Sciences and Engineering Researches
𝑛
Here 𝛼 is a decision variable representing 𝑉𝑎𝑅𝛽 ,
𝑠𝑝 = ∑ 𝑤𝑖 𝑠𝑖 = 𝑤 𝑇 𝑠 (11) and 𝑦 = {𝑦1 , … , 𝑦𝑇 } is a vector of decision
𝑖=1
variables denoting losses that are at least equal to
Minimizing 𝑠𝑖 is equivalent to minimizing 𝜎𝑖 if 𝑉𝑎𝑅𝛽 .
(𝑟1 , 𝑟2 , … , 𝑟𝑛 ) is multivariate and normally
distributed, leading to the following mean absolute B. Intelligent Methods for Portfolio Optimization
deviation model [13]: While the main problem of Markowitz theory can
min 𝑠𝑖 = 𝔼{|𝑟𝑖 (𝑡) − 𝜇𝑖 |} (12) be solved using quadratic programming,
𝑟𝑖 (𝑡) ≥ 𝑟𝑖0 (𝑡) metaheuristic algorithms have been used
𝑛 significantly to solve this optimization problem
𝑠. 𝑡 ∑ 𝑤𝑖 = 1 [20]. The classical branch of the portfolio
(13) optimization problem can be solved Considered as
𝑖=1
{ 𝑤𝑖 ≥ 0 a one-objective optimization problem in which the
investor minimizes his risk exposure provided the
Where 𝑟𝑖0 (𝑡) is the minimum return set by the minimum expected return is achieved, or the
investor. investor maximizes the expected return for a
certain level of risk [21]. In this article, we use the
4) Conditional Value at Risk Model Particle Swarm Optimization algorithm to optimize
One of the most well-known risk measures is the the single-objective modern portfolio theory.
measurement of risk value (VaR). At a given While Single-Objective Optimization methods
confidence level of α, 𝑣𝑎𝑟𝛼 represents the consider the minimum risk for a given return or the
maximum expected loss over a given period of maximum risk for a given expected return, or a
time. Although this criterion is widely used by goal function that weighs two goals and therefore
researchers, VaR has also been widely criticized as must be performed several times with the
an incompatible risk criterion [16]. Also, using corresponding weights [22], Multi-Object
VaR in optimization is difficult because it requires Optimization Methods use two or more sets of
solving a non-convex problem [17]. Alternatively, Pareto solutions while balancing the objective
Rockafellar and Uryasev [18] introduced function simultaneously [23]. In this article, we use
conditional VaR (CVaR), which was defined as the the Non-Dominated Genetic Algorithm-II to
conditional expectation of losing a basket at least optimize the multi-objective modern portfolio
equal to VaR. Formally, to distribute the theory.
probability of a stable return on assets, CVaR is 1) Particle Swarm Optimization
defined at the 𝛼% confidence level for a portfolio
with x composition as follows [19]: Particle swarm optimization is an evolutionary
1 ∞ computational method proposed by Kennedy and
𝐶𝑉𝑎𝑅𝛼 (𝑥) = ∫ 𝑓(𝑥, 𝑟)𝑝(𝑟)𝑑𝑟 (14) Eberhart in 1995 [24]. The particle swarm
1 − 𝛼 𝑓(𝑥,𝑟)≥𝛼𝛽(𝑥)
optimization algorithm simulates animal social
where 𝑟 is the vector of random assets’ returns, behavior, including insects, swarms, birds, and
𝑝(𝑟) is the associated probability density function, fish. These groups participate in a collaborative
𝑓(𝑥, 𝑟) denotes the portfolio loss function, and way to find food, and each member of the herd
𝛼𝛽 (𝑥) denotes the 𝑉𝑎𝑅𝛽 threshold for the portfolio continues to change their search pattern according
weights 𝑥. to their own learning experiences and those of
The portfolio composition 𝑥, which optimizes other members [25].
CVaR at the 𝛽 confidence level, while having the Particle swarm optimization algorithm is a
swarm-based search process in which each
minimum expected yield level 𝜇 ∗ , is obtained by
individual is called a particle, as a potential
solving the following linear program:
1 solution to the optimized problem in the next
min 𝛼 + 1𝑦 (15) search space D, and can remember the speed as
(1 − 𝛽)𝑇
well as the optimal position [26]. Congestion and
𝛼 + 𝑦 + 𝑅𝑥 ≥ 0 itself In each generation, particle information is
𝑠. 𝑡 { 𝜇̂ ≥ 𝜇∗ (16)
combined to adjust the velocity of each dimension
1𝑥 = 1 , 𝑥, 𝑦 ≥ 0 , 𝛼 ∈ 𝑅
385
International Journal of Advanced Natural Sciences and Engineering Researches
and used to calculate the new position of the and mutation to find a new population of offspring.
particle. Particles are constantly changing their After creating two equally sized populations, it
state in multidimensional search space until they combines parents and descendants to share half of
reach equilibrium or optimality, or beyond the newly combined population on Pareto fronts.
computational constraints. The unique connection To ensure the diversity of the front, the NSGA-II
between the different dimensions of the problem adds a crowding distance to each individual. This
area is achieved through the objective functions. ensures the diversity of the population and
The general flowchart of the particle swarm improves the exploration of the fitness
optimization algorithm is shown in Figure 1 [25]. environment [32]. Figure 2 clearly explains the
general flowchart of the NSGA-II algorithm.
is seen that the mean semi variance model gives the mean semi variance model. As stated in the
better results. classical models, the mean semi variance model
works better.
Fig. 3 Approximated pareto front for the mean variance Fig. 4 The best cost graph by desired expectation return
(MV), mean semi variance (MSV), mean absolute deviation (0.0060) ,100 iterations and 40 population for pso-mv, pso-
(MAD) and conditional value at risk (CVaR) msv, pso-mad and pso-cvar
Table 1. Weight Values, Return and Risk for classical Table 2. Weight Values, Return and Risk for intelligent
methods: mean variance (MV), mean semi variance (MSV), methods (particle swarm optimization) by desired expectation
mean absolute deviation (MAD) and conditional value at risk return (0.0060), 100 iteration and 40 population
(CVaR)
PSO- PSO- PSO- PSO-
MV MSV MAD CVaR MV MSV MAD CVaR
IBM 0.00056 0.00056 0.00056 0.00056 IBM 0.2274 0.4006 0.3620 0.3379
GOOGL 0.00507 0.00507 0.00507 0.00507 GOOGL 0.4857 0.0653 0.3068 0.3941
MSFT -0.00184 -0.00184 -0.00184 -0.0018 3.3849e- 3.0328e-
AAPL -0.00920 -0.00920 -0.00920 -0.0092 MSFT 0.0166 0.0029
05 04
YHOO 0.00869 0.00869 0.00869 0.00869 AAPL 0 0 0 0
AMZN 0.01423 0.01423 0.01423 0.01423 YHOO 0.1219 0.3410 0.0771 0
Return 0.01423 0.01423 0.01423 0.01423 AMZN 0.1650 0.1764 0.2511 0.2677
Risk 0.05706 0.02841 0.02889 0.03300 Return 0.0060 0.0060 0.0060 0.0060
Risk 0.0153 0.0090 0.0114 0.0155
B. Results of Intelligent Methods for Portfolio In this part, portfolio optimization is performed
Optimization using multi-objective meta-heuristic algorithms
In this part, portfolio optimization is performed (Non-Dominated Sorting Genetic Algorithm-II).
using single-objective meta-heuristic algorithms The difference between this method and the single-
(particle swarm optimization). For single-objective objective method is to solve the problem as it is.
optimization, the objective function was designed Therefore, in this method, there is no limit on the
to minimize risk and the expectation return was objective function and both forms are considered
desired as 0.0060. Particle swarm optimization was minimum and maximum. NSGA-II was run with
run with 100 iterations and 40 populations, and 100 iterations and 40 populations, and when
when looking at the results, pso-msv (particle looking at the Figure 4, Table 3 and Table 4
swarm optimization-mean semi variance) found the minimum risk results, NSGA-II-MSV and NSGA-
lowest risk (0.0090). Therefore, looking at the II-MAD found the lowest risk respectively 0.0073
Figure 4, it is seen that the best cost graph belongs and 0.0060. when looking at the maximum return
to the mean variance model, and when looking at (0.0142) results, NSGA-II-MSV found the lowest
Table 2, it is seen that the lowest risk belongs to risk 0.0284.
387
International Journal of Advanced Natural Sciences and Engineering Researches
IV. CONCLUSION
One of the major concerns of financial managers
today is to make high-speed, optimal decisions
amid large volumes of stock and capital market
information and data. Especially when the diversity
of investments in the investment portfolio
increases, optimal decisions are very important
given the constraints on expected returns and the
level of risk and liquidity of assets and other
variables. Portfolio optimization makes it possible
to attract more investors, because with the
emergence of a proper investment process, fixed
capital is attracted to the community. Therefore, in
this article, classical and intelligent methods for
portfolio optimization were examined. The results
of this article are generally as follows:
Fig. 5 Approximated pareto front for the NSGA-II-MV, 1. According to the obtained results, the mean
NSGA-II-MSV, NSGA-II-MAD and NSGA-II-CVaR semi variance method with lower risk
Table 3. Weight Values, Return and Risk for minimum risk (0.0284) and higher return (0.0142) than the
by intelligent methods (Non-Dominated Sorting Genetic other classical methods has acted on the
Algorithm): NSGA-II-MV, NSGA-II-MSV, NSGA-II-MAD
specified data.
and NSGA-II-CVaR
2. According to the results obtained in single-
NSGAII NSGAII NSGAII NSGAII objective meta-heuristic methods (Particle
-MV -MSV -MAD -CVaR Swarm Optimization), with a desired return
IBM 0.4636 0.5579 0.7083 0.5233 value of 0.0060 and risk minimization, the
GOOG particle swarm optimization-mean semi
0.2889 0 0.1496 0.4767
L
variance method with a risk of (0.0090) has
MSFT 0.1728 0.1060 0.0489 0
the lowest risk among other methods.
AAPL 0.0050 0.0089 0.0075 0
YHOO 0.0696 0.2739 0.0763 0
3. According to the results obtained in multi-
AMZN 0 0.0533 0.0094 0 objective meta-heuristic methods (Non-
Return 0.0020 0.0032 0.0018 0.0027 Dominated Sorting Genetic Algorithm-II),
Risk 0.0090 0.0073 0.0060 0.0125 in minimizing the risk, the lowest value of
risk was (0.0060) with a return of (0.0018)
Table 4. Weight Values, Return and Risk for maximum
by the NSGA-II-MAD method, also a
return by intelligent methods (Non-Dominated Sorting NSGA-II-MSV method with a risk of
Genetic Algorithm): NSGA-II-MV, NSGA-II-MSV, NSGA- (0.0073) and a higher return of (0.0032) It
II-MAD and NSGA-II-CVaR was more efficient than other methods. But
NSGAII NSGAII NSGAII NSGAII in maximizing the expected value of return,
-MV -MSV -MAD -CVaR the highest return value is (0.0142) with a
IBM 0 0 0 0 lower risk of (0.0284) belonging to the
GOOG NSGA-II-MSV method.
0 0 0.0880 0.1953
L According to the results, it is clear that the use of
MSFT 0 0 0.0046 0 intelligent methods can provide less risk with more
AAPL 0 0 0 0 returns for financial investors. Therefore, in this
3.9407e- article, by reviewing the results, it can be said that
YHOO 0.1136 0 0.1403
04 multi-objective meta-heuristic algorithms can help
AMZN 0.8864 1 0.7670 0.8043 financial investors to choose the right portfolio.
Return 0.0136 0.0142 0.0126 0.0124
Risk 0.0501 0.0284 0.0217 0.0269
388
International Journal of Advanced Natural Sciences and Engineering Researches
389