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

Application of Genetic Optimization Algorithm in F

Uploaded by

jarvisle11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Application of Genetic Optimization Algorithm in F

Uploaded by

jarvisle11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Hindawi

Computational Intelligence and Neuroscience


Volume 2022, Article ID 5246309, 9 pages
https://doi.org/10.1155/2022/5246309

Research Article
Application of Genetic Optimization Algorithm in Financial
Portfolio Problem

He Li and Naiyu Shi


School of Sciences, Changzhou Institute of Technology, Changzhou 213000, China

Correspondence should be addressed to Naiyu Shi; [email protected]

Received 21 April 2022; Revised 9 June 2022; Accepted 15 June 2022; Published 15 July 2022

Academic Editor: Kapil Sharma

Copyright © 2022 He Li and Naiyu Shi. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is
properly cited.
In order to address the application of genetic optimization algorithms to financial investment portfolio issues, the optimal
allocation rate must be high and the risk is low. This paper uses quadratic programming algorithms and genetic algorithms as well
as quadratic programming algorithms, Matlab planning solutions for genetic algorithms, and genetic algorithm toolboxes to solve
Markowitz’s mean variance model. The mathematical model for introducing sparse portfolio strategies uses the decomposition
method of penalty functions as an algorithm for solving nonconvex sparse optimization strategies to solve financial portfolio
problems. The merging speed of the quadratic programming algorithm is fast, and the merging speed depends on the selection of
the initial value. The genetic algorithm performs very well in global searches, but local search capabilities are insufficient and the
pace of integration into the next stage is slow. To solve this, using a genetic algorithm toolbox is quick and easy. The results of the
experiments show that the final solution of the decomposition method of the fine function is consistent with the solution of the
integrity of the genetic algorithm. 67% of the total funds will be spent on local car reserves and 33% on wine reserves. When data
scales are small, quadratic programming algorithms and genetic algorithms can provide effective portfolio feedback, and the
method of breaking down penalty functions to ensure the reliability and effectiveness of algorithm combinations is widely used in
sparse financial portfolio issues.

1. Introduction Market investment has both the possibility of profit and


the risk of loss. Portfolio is a commonly used way to avoid
In recent years, China’s venture capital industry has devel- risk. The reasonable goal of building a portfolio should be to
oped rapidly, and the total amounts of venture capital en- achieve the highest return portfolio as far as possible under a
terprises (funds) and venture capital management funds are certain risk level, that is, an effective portfolio. In order to
increasing. The increasing number and variety of securities build a portfolio that can achieve the most effective goal,
investment not only greatly enrich the products of the fi- Markowitz model provides a clear training proc-
nancial market, but also become a backbone force in the ess—optimization. Optimization process is widely used in
financial market and play an important role in the stable the process of asset allocation. Since the main asset types
development of the market. Securities investment is an im- available are limited in the actual process, the process is
portant part of the operation of the securities market, and operable [2].
securities portfolio theory is one of the most important se- Optimization models and algorithms are playing an
curities investment theories. Therefore, it is of great signifi- increasingly important role in financial decision making.
cance to establish an appropriate model and choose an From asset allocation to risk management and option
effective algorithm to solve the portfolio problem. In order to pricing to modeling, many financial mathematical problems
avoid complex mathematical programming, many scholars can be effectively addressed through modern optimization
use intelligent algorithms to solve portfolio problems [1]. methods. Optimization methods are a branch of applied
2 Computational Intelligence and Neuroscience

mathematics. Mathematically, this means finding the min- describing securities returns, it greatly simplifies the model
imum or maximum value of the objective function under of Markowitz theory and provides convenience for the
certain conditions [3]. A typical optimization problem is to successful application of Markowitz theory in the actual
achieve the goal optimization by allocating different pro- investment process. However, the theory is not perfect. Then
portions of resources, such as cost minimization, profit Wang et al. proposed a multifactor model, which we call
maximization, and so on. Optimization method is a arbitrage pricing model [8]. Setiawan and Rosadi made an
mathematical method to solve optimization problems. in-depth study on the securities price in the capital market
Traditional optimization methods mainly include branch by using statistical methods from both theoretical and
definition method, background segmentation method, dy- empirical aspects in 1965 and put forward the efficient
namic programming method, and other accurate algo- market theory [9]. The subsequent portfolio development is
rithms. The absolute optimal solution can be obtained by based on some of the above theories. In China, the research
accurate algorithm, but because of its large calculation scale, on portfolio can be traced back to the 1990s [10]. Of course,
it is only suitable for solving small-scale problems and is not many valuable documents have emerged. Jiang et al. pro-
suitable for application in complex engineering problems posed a portfolio selection theory that strictly stated the
with high-dimensional, multiobjective, and multi- operability under uncertain conditions: mean variance
constraints. On the contrary, heuristic algorithm refers to method, and conducted systematic, in-depth, and fruitful
the method of searching according to empirical rules when research. This theory led to the revolution of stock invest-
solving problems, rather than solving according to deter- ment theory. Since Markowitz put forward the mean vari-
mined steps. After the 1950s, scholars applied heuristic ance model, most portfolio models are based on the two
algorithms to practical complex engineering problems and parameters of mean and variance. With the development of
obtained good feedback, which opened the research wave of portfolio theory, new risk measurement methods continue
heuristic algorithms [4]. to emerge. Takahashi and Takahashi proposed the concept of
The purpose of this article is to understand the effects of semiabsolute deviation (Semia. D) and improved the mean
various methods of optimization in theory and practice. variance model on this basis [11]. By analyzing the com-
Therefore, we have chosen the M-V model, which is the pound price of 50 representative stocks in Shanghai, it is
simplest square error model. concluded that the portfolio based on M-Semiad model is
M-V model, as shown in the following formulas: better than that in M-V model at each expected rate of
1 return, and the effective portfolio satisfies the separation
min σ 2 � xT Vx, (1) theorem of two funds. Finding the optimal solution of
x 2
portfolio problem actually belongs to a kind of portfolio
optimization problem, which usually comes down to qua-


⎪ rT x ≥ μ,
⎨ T dratic programming model. The solving process is very
s⎪ e x � 1, (2) cumbersome and requires high mathematical foundation, so


L ≤ x ≤ U, many scholars use intelligent algorithms to solve it. Nahvi
et al. applied binary coded genetic algorithm (GA) to solve
where V represents the covariance matrix of each financial this problem, which has the advantages of simplicity and
asset (in this case, stock), (r1 , r2 , . . . , rn )T represents the rate intuition, but the efficiency is not high enough (Figure 2)
of return of each stock, and μ � (μ1 , μ2 , . . . , μn )T represents [12]. Bakar and Rosbi applied integer coded adaptive genetic
the investment return expected by investors. algorithm (AGA) to solve the problem, which improved the
In the portfolio theory, the average value of the return on solution efficiency [13]. In 1964, Cheng and Zhong estab-
assets is used as the measurement index of the expected lished the capital asset pricing model (CAPM) based on
return on assets, and the variance of the return on assets is Markowitz. CAPM “accurately described the return and risk
used as the risk measurement index of the portfolio [5]. of assets” and studied the relationship between the expected
return of assets and risky assets in the securities market and
2. Related Works the formation of equilibrium price [14]. Pakistan proposed
to solve the problem of portfolio optimization through
At present, domestic and foreign scholars have more and symbiotic multiswarm PSO [15]. Mu and Xiong proposed
more research on portfolio optimization. It can be seen from portfolio analysis under background risk based on mean
the Citation Report retrieved from the relevant database that variance model [16]. Lin et al. put forward an adaptive
there is more and more literature research on portfolio portfolio model under new assets [17].
optimization. The publication and citation of portfolio Based on the basic idea of ABC algorithm, this paper
optimization literature are shown in Figure 1. solves the cardinality constrained mean variance model
After Kumar et al. put forward the portfolio theory, there (CCMV model) in portfolio problem. In the process of
have been many new portfolio developments: multiperiod solving, a FABC algorithm which can always get the feasible
portfolio, portfolio under different risk measures, portfolio solution is designed for CCMV model. Then the renewal
based on transaction cost and liquidity, portfolio theory equation of FABC is improved, and the IFABC algorithm
based on nonutility maximization, etc. [6, 7]. In the de- with faster convergence speed is obtained. Finally, the
velopment history of portfolio theory, Ahn’s work is the IFABC algorithm is further improved based on quadratic
most prominent. By introducing a single factor model programming, and a better QFABC algorithm is proposed.
Computational Intelligence and Neuroscience 3

2000
300
1800
250 1600
Document number
1400

Reference number
200
1200
150 1000
100 800
600
50
400
0 200
0
2010 2012 2014 2016 2018 2020
2010 2012 2014 2016 2018 2020
Year
Year
(a) (b)

Figure 1: Publication and citation of portfolio optimization literature. (a) Number of documents published per year. (b) Number of
citations per year.

In general, this optimization strategy can be described as


a convex quadratic programming strategy as shown in the
following equation:
Build a
To readjust
st 1
new library σ 2 � xT Qx,
2
minn
Investmen
ent platform:
Investment x∈R
data, algorithms,
Factor analysis μT x � β, (6)
In-store machine learning
monitoring
ng
eT x � β,
Figure 2: Financial investment of genetic algorithm. s.t.
x ≥ 0.
3. Method This is a convex quadratic programming policy. Given
the value of the parameter β, β is the expected return on
3.1. Quadratic Programming (QP). Quadratic programming investment with a uniquely optimal solution, as shown in the
problem with inequality constraints, as shown in the fol- following equation:
lowing formulas:
1 x∗μ � λQ− 1 e + cQ− 1 μ, (7)
min q(x) � xT Hx + fT x, (3)
2 where λ � c − βb/Δ, c � βa − b/Δ, a � eT Q− 1 e, c � μT Q− 1 μ,
and Δ � ac − b2 .
Ax ≤ b,

⎛ The main problem of the above convex quadratic pro-
s.t.⎜

⎝ Aeq · x � beq, (4) gramming model is that the mean and covariance of assets
lb ≤ x ≤ ub, are estimated from historical data and do not have sufficient
accuracy. In fact, it is difficult to estimate the mean value of
H, A, and Aeq are matrices, H is a symmetric matrix of order income, which is called mean ambiguity. In addition, the
n, and f, b, beq, lb, ub, and x are column vectors. h is a mean variance model is very sensitive to the distribution of
positive semidefinite matrix with a convex quadratic pro- input parameters, which will amplify the estimation error,
gram or a nonconvex program. For convex quadratic pro- lead to limit investment, and poor out of sample test results.
gramming, the objective function q (x) is a convex function. Later, some improved Markowitz models were proposed to
A quadratic programming strategy is the smallest solution in obtain stable investment. Later, in order to make the op-
the world if it satisfies at least one x vector limit and has a timization process of investment more diversified, addi-
lower limit in the potential range q (x). H is a positive tional investment constraints were added to the model. For
definite matrix. If there is a globally optimal solution when the investment allocation of minimizing risk, James Steiner
there is a rigid convex quadratic program, it must be unique, estimation was proposed, and then robust estimation was
as shown in the following equation: proposed. In order to reduce transaction costs and the
[x, fval, exitflag, output] complexity of investment management, a class of important
(5) portfolio problems are proposed, which achieve this goal by
� quadgrog H, f, A, b, Aeq, beq, lb, ub, x0 􏼁. limiting the amount of capital investment. Adding this
4 Computational Intelligence and Neuroscience

constraint, the model is transformed into solving the sparse objective function to obtain the individual fitness value.
portfolio problem, which remedies the high instability of the Individuals with higher adaptability to living environment
traditional portfolio model. In particular, the Markowitz often have higher survival probability. At the beginning,
model is modified by adding constraints to control the some individuals are always randomly generated, that is,
number of assets [18]. This kind of problem is called the candidate solutions. These individuals are cross combined by
portfolio problem with cardinality constraints, as shown in genetic algorithm according to the principle of “survival of
the following equation: the fittest” to produce offspring. The offspring inherit some
1 excellent shapes of the parent generation, so they are ob-
σ 2 � xT Qx, viously better than the previous generation. In this way, the
2
minn population of “chromosome” will gradually evolve towards a
x∈R better solution. Combined with genetic operations such as
μT x � β, gene mutation in the process of species evolution, offspring
(8) more adapted to the environment may be produced [19].
‖x‖0 ≤ K, Genetic algorithm is mainly composed of chromosome
coding, initial population setting, fitness function setting,
s.t. eT x � 1, genetic operation (crossover, mutation) design, and so on.
Coding refers to transforming the solution structure of
x ≥ 0, practical problems into chromosome structure. Selection
where ‖x‖0 is the zero norm of x and represents the number refers to selecting several individuals with higher fitness
of nonzero elements in vector x; parameter K is the upper from the current population according to the selection
limit of the number of investment projects. In short, the probability and the fitness value of each chromosome.
modern portfolio problem mainly includes the following Fitness determines the individual’s viability, usually roulette
three objective functions: selection or tournament selection. Crossover refers to the
mating recombination of some genes of two chromosomes
(1) Minimize investment risk xT Qx, min xT Qx according to the crossover probability and crossover strategy
(2) Maximize expected return on investment μT x, to produce new individuals. Crossover strategies generally
max μT x include single point crossover and multipoint crossover.
(3) Minimize the number of selected investment proj- Mutation refers to the mutation of some genes in the
ects ‖x‖0 , min ‖x‖0 chromosome according to the mutation probability and
mutation strategy, which is another method for genetic
The restriction on the number of investment projects in algorithm to generate new individuals. For example, under
the above cardinal constrained portfolio can be transformed the binary coding mode, the traditional mutation operation
into controlling the parameter K to a sufficiently small value; simply reverses the binary of the gene; that is, “0” becomes
that is, the mathematical model of the financial portfolio “1” and “1” becomes “0” [20].
problem mainly studied in this paper is obtained, as shown The common parameters of genetic algorithm in China
in the following equation: are shown in Table 1.
minn ‖x‖0 , Genetic algorithms for solving optimization problems
x∈R usually involve three basic operations: selection, crossover,
μT x � β, and mutation. Selection is a key function of genetic algo-
rithms. Different selection actions affect the speed of the
s.t.xT Qx ≤ a, (9) genetic algorithm. Excessive selection pressure can improve
the integration speed of the algorithm but can lead to early
eT x � 1,
mergers. Therefore, it is necessary to choose the appropriate
x ≥ 0, selection measure. Selection means selecting the most
physically fit people and passing them on to the next gen-
where μ is the rate of return of each asset, Q is the variance eration with a higher probability and selecting the less
covariance matrix of each asset, α is the upper limit of physically fit people to pass on to the next generation. The
acceptable risk of investors, and β is the expected rate of selection process can bring the fitness value of individuals in
return of investors. the population closer to the optimal solution. Crossover
operation is the process of replacing and reuniting parts of a
parent’s two personal structures to create a new individual.
3.2. Genetic Algorithm. Genetic algorithm (GA) is a global Crossover activity can create new people in next-generation
optimization algorithm formed by simulating the evolution populations and increase the efficiency of genetic algorithm
mechanism of natural selection and population “survival of search. Relying solely on the crossover operator is likely to
the fittest” and “survival of the fittest.” Each possible bring you closer to local optimization. Mutation refers to the
problem solution is expressed as a “chromosome,” so as to act of mutating an individual with a certain probability, and
obtain a “group” composed of chromosomes. This group is the value of the vector changes randomly among individuals
limited to the specific environment of the problem. Each with a low probability. Mutational activity creates a structure
individual is evaluated according to the predetermined that is unprecedented in a population and increases the
Computational Intelligence and Neuroscience 5

Table 1: Common parameters of genetic algorithm.


Control parameters Meanings
String length (L) The length of each code, including fixed length and variable length
Population capacity Number of individuals per generation
Crossover rate The probability of executing the crossover operator is recorded as PC
Variation rate The probability of executing the mutation operator is recorded as PM

Choose Cross Variation

Roulette method of choice Single point crossover Fundamental bit variation

Random competitive selection


Cross at two points Uniform variation
method

Tournament selection method Multiple crosses Boundary variation

Breeding pool selection Cross evenly Non-uniform variation trap

The best method of individual


Arithmetic crossing Gaussian approximate variation
preservation

Exclude choosing

Figure 3: Operation method of genetic algorithm.

Start choose
(5) The “best survival” process is implemented through a
selection process to select better independent groups.
Code and generate the
(6) crossover operation on better chromosomes selected
cross
initial population according to probability PC (single point crossover).
(7) Participate in a mutation process with a PM prob-
The fitness of each individual in the
population was calculated and evaluated
variation ability for a gene on the chromosome.
(8) The performance of the group determines whether it
The end of the
Yes Whether termination No meets the predetermined termination criteria.
conditions are met
Otherwise, return to 4.
Figure 4: Flowchart of genetic algorithm.

3.3. Penalty Function Decomposition Method. In order to


likelihood of approaching global optimization [21]. See consider the financial portfolio problem, the general
Figure 3. l0 -minimization problem is accompanied by the fact that the
The genetic algorithm that retains the optimal solution l0 -norm is part of the objective function or constraints.
before or after selecting the operator can converge to the Firstly, the first-order optimality condition of this kind
global optimal solution with probability 1. See Figure 4. of problem is given, and then the penalty function de-
Execution steps of genetic algorithm: composition algorithm to solve this kind of problem is
(1) Select an encoding strategy (binary encoding) and introduced; that is, the original problem is transformed into
use an appropriate encoding strategy to represent a series of penalty function subproblems, and the penalty
each possible point in the problem search space, i.e., function subproblems are solved by the block cooperative
to create a chromosome. descent method, so as to obtain the solution of the original
problem. It is proved theoretically that, under reasonable
(2) Identify population size n, crossover and mutation
assumptions, the convergence point of the sequence ob-
methods, and genetic strategies such as genetic pa-
tained by the penalty function decomposition method sat-
rameters such as selection probability PR, crossover
isfies the first-order optimality condition. In addition, l0 is
probability PC, and mutation probability PM.
the only nonconvex term in the original problem. It is
(3) Set the number of iterations to t � 0, select a random proved that the convergence point is a local minimum point,
chromosome to initiate the P (o) population, and and it can be proved that the convergence point of the
determine the fitness function f (F > 0). sequence generated by the block cooperative descent method
(4) Calculate the fitness value for each chromosome. is the saddle point of the penalty function subproblem.
6 Computational Intelligence and Neuroscience

Because l0 is the only nonconvex term, the convergence 4. Experimental Results and Discussion
point is the local minimum of the penalty function
subproblem. In this paper, we use a penalized decomposition method to
Sparse problems are now widely used. For example, with solve this problem, i.e., a block cooperative method to solve
a compressed sensor, it is possible to encode a large sparse the subproblem of the penalty function. According to some
signal with a relatively small number of linear dimensions, reasonable assumptions, the first point of the sequence
which converts the problem into a solution of a linear formed by the penalized decomposition method provides a
equation or a set of linear inequalities. Similar methods have first-order optimization of the problem. Furthermore, when
been widely used in the field of linear regression. In recent h is an affine function and f and g are convex functions, the
years, the choice of sparse reverse covariance has become an join point is a local minimum of the problem. At the same
important tool for finding conditional independent terms in time, the boundary points of the sequence formed by the
image design. The current basic approach is to increase the joint collapse of the blocks are saddle points for the children
log-probability function while finding a sparsely inverse of the penalty function. In addition, h is an affine function, f
covariance matrix. Similarly, the choice of characteristics for and g are convex functions, and the combination is a local
cluster problems suggests a promising approach to sparse minimum of the penalty function subproblem.
logistic regression that seeks to reduce sparse logistics losses
min 􏽮f(x): g(x) ≤ 0, h(x) � 0, xJ − y � 0􏽯, (14)
while seeking sparse solutions [22]. All the above applica- x∈X,y∈Y
tions can be expressed as the following l0 minimization
problem, as shown in the following formulas: where Y � 􏼈y ∈ RJ : ‖y‖0 ≤ r􏼉.
�� �� The related quadratic penalty function is defined as
min􏽮f(x): g(x) ≤ 0, h(x) � 0, ��xJ ��0 ≤ r􏽯, (10) follows, as shown in the following equation:
x∈x
ρ �� ��2 �� ��2
�� �� qp (x, y) � f(x) + 􏼒��g(x)+ �� +‖h(x)‖2 + ��xJ − y�� 􏼓,
min􏽮f(x) + ]��xJ ��0: g(x) ≤ 0, h(x) � 0􏽯, (11) 2
x∈X

where r > 0, υ > 0R > 0, υ > 0, and the sparsity of the problem ∀x ∈ X, y ∈ Y,
is controlled by adjusting the size of R and υ. X is the closed (15)
convex set of n-dimensional Euclidean space Rn .
g : Rn ⟶ R, g : Rn ⟶ Rm , h : Rn ⟶ Rp are continuously where penalty function ρ > 0.
differentiable functions. ‖xJ ‖0 refers to the cardinality of the Now a penalty function decomposition method is
subvector marked by the index set J in x. Aiming at the proposed to solve the problem, which can be treated
special situation of this kind of problem, some algorithms equivalently.
are proposed. For example, iterative threshold method and Let 􏼈εk 􏼉 be a decreasing sequence of positive terms. For
matching pursuit method are developed to solve the the given ρ0 > 0, σ > 1, choose any y00 ∈ Y, constant
l0 -regularized least squares problem in compressed sensing, c ≥ max􏼚f(xfeas ), min qpo (x, y00 )􏼛, makek � 0° .
x∈X
but they can not be used to deal with the general l0 -mini-
mization problem. A popular way to deal with the problem is (1) Let l � 0; apply the block cooperative descent
to replace ‖•‖0 with l1 − norm‖•‖1 and then solve the re- method to solve the approximate solution of the
laxation problem. In applications such as compression penalty function subproblem through steps (a), (b),
sensing, problems can be solved under some reasonable (c), and (d).
assumptions. In recent years, some other relaxation methods min􏽮qpk (x, y): x ∈ X, y ∈ Y􏽯. (16)
have been proposed, that is, replacing l0 with lp . In general,
the properties of the solutions of these methods are not very
(a) Solve
clear. The l0 regularization problem with upper and lower
bound constraints is shown in the following equation: xkl+1 ∈ arg min qρk 􏼐x, ykl 􏼑. (17)
x∈X
min􏼈f(x) + λ‖x‖0 : l ≤ x ≤ u􏼉. (12)
x
(b) Solve
The hard threshold algorithm is proposed as follows, as
ykl+1 ∈ arg min qρk 􏼐xkl+1 , y􏼑. (18)
shown in the following equation: y∈Y
T
xk+1 ∈ arg min􏼚f􏼐xk 􏼑 + ∇f􏼐xk 􏼑 􏼐x − xk 􏼑 (c) Let (xk , yk ) � (xkl+1 , ykl+1 ), if (xk , yk ) meets
x∈B �� �
(13) ��P 􏼐xk − ∇ q 􏼐xk , yk 􏼑􏼑 − xk ��� ≤ ε . (19)
L�� ��2 � x x ρk � k
+ ���x − xk ��� + λ‖x‖0 􏼛,
2 2
(d) Makel←l + 1, Turn to(a).
where λ > 0, L > Lf , Lf is the Lipschitz constant of ∇f(x), After analysis, the problem can be expressed
n
B � {x ∈ Rn : l ≤ x ≤ u}, l ∈ R− , u ∈ Rn+ . equivalently, as shown in the following equation:
Computational Intelligence and Neuroscience 7

0.012
min 􏽮f(x) + ]‖y‖0 : g(x) ≤ 0, h(x) � 0, xJ − y � 0􏽯.
x∈X,y∈R|J|
0.010
(20)
0.008
The related quadratic penalty function is defined as

The yield
follows, as shown in the following equation: 0.006
qρ (x, y) ≔ f(x) + ]‖y‖0
0.004
ρ �� ��2 �� ��2
+ 􏼒��g(x)+ �� +‖h(x)‖2 + ��xJ − y�� 􏼓, (21) 0.002
2
0.000
∀x ∈ X, y ∈ R|J| .
stock

Included is penalty parameter ρ > 0. Figure 5: Average return of stocks.


Now a penalty function decomposition method is
proposed to solve the problem, which can be treated
7.0
equivalently. Let 􏼈εk 􏼉 be a decreasing sequence of
positive terms for the given ρ0 > 0, σ > 1, q0 . 6.5
Choose any y00 ∈ Y; constant c satisfies

Return on investment
6.0

⎧ ⎬

c ≥ max⎩ f(xfeas ) + ]‖xfeas ‖0 , min pρ0 (x, y00 )⎭ ; let 5.5
x∈X
k � 0. 5.0

(2) Let l � 0, the penalty function subproblem is solved 4.5


by the block cooperative descent method described 4.0
in steps (a)–(d), as shown in the following equation:
3.5
min􏽮pρk (x, y): x ∈ X, y ∈ R|J| 􏽯. (22)
0 20 40 60 80 100
k k
Approximate solution (x , y ) ∈ X × R . |J| The number of iterations

(a) Solve FABC


IFABC
xkl+1 ∈ arg min qρk 􏼐x, yk1 􏼑. (23) QFABC
x∈X
Figure 6: Comparison of three iterative algorithms.
(b) Solve
ykl+1 ∈ arg min qρk 􏼐xkl+1 , y􏼑. decomposition method and genetic algorithm [23]. See
(24) Figures 5 and 6.
y∈R|J|
The challenge of traditional analytical approaches to
(c) Let (xk , yk ) � (xkl+1 , ykl+1 ), if (xk , yk ) meets financial securities investment strategies needs to be
�� �
��P 􏼐xk − ∇ q 􏼐xk , yk 􏼑􏼑 − xk ��� ≤ ε . (25)
addressed. During the analysis, it was found that the op-
� x x ρk � k erational process of traditional strategic analysis methods is
Turn to (2). complex and the inability to solve the problem limits the
(d) Let l←l + 1; turn to (a); scope of driving search [24]. Therefore, the advantage of the
(1) Let ρk+1 : � σρk ; powerful local search capabilities of genetic algorithms is
(2) if min pρk+1 (x, yk ) > c, makeyk+1 feas that they are used to search for parametric spaces. The
0 : � x ,
x∈X k+1 k process of analyzing the financial securities investment
otherwise, lety0 � y ;
strategy based on a genetic algorithm is shown in Figure 7.
(3) Letk←k + 1, turn to(1)°
The results of the quadratic programming algorithm, the
This part mainly tests the penalty function decompo- results of the Matlab programming solution of the genetic
sition method introduced earlier through numerical ex- algorithm, the tools of the genetic algorithm, and the results
periments, applies it to the portfolio model, and compares of the solution are compared, focusing on the above Mar-
the results with the running results of genetic algorithm. kovitz average variance model. See Figure 8.
Select the closing price (unit: yuan) of 10 constituent stocks In order to test the validity of the genetic algorithm
in the 300 index for 100 trading days from January 5, 2019, to method of financial portfolio analysis, a risk-free bank de-
June 4, 2020. The data is from Sina Financial Data Center. posit in a particular city is selected and the real data is
The optimal asset allocation proportion of investors in these analyzed [25]. Select stocks in different sectors to invest in,
10 constituent stocks is calculated by penalty function taking into account diversification risks. There are four risky
8 Computational Intelligence and Neuroscience

Compared to the quadratic programming algorithm, the


start
genetic algorithm is very good for global control, but not
good enough for local search, so the late merger speed is
reduced and decentralized investment is better than the
Enter tabu algorithm
choose
quadratic programming algorithm. Thus, genetic algorithms
are faster, more convenient, and more efficient in solving
Whether the conditions financial portfolio problems. However, because the data
are met
No
cross selected in the model is not as large as that in the actual
Yes
financial portfolio problem, the complexity of the problem is
The optimal solution
variation
greatly reduced. Therefore, in the future, quadratic pro-
gramming algorithm and genetic algorithm can be applied to
Figure 7: Analysis process of financial securities investment the financial portfolio of small-scale investment stocks.
strategy.
Data Availability
1.015
The data used to support the findings of this study are
1.014 available from the corresponding author upon request.
Fitness function value

1.013
Conflicts of Interest
1.012
The authors declare that there are no conflicts of interest.
1.011

1.010 Acknowledgments
1.009 This paper was supported by Research on Financial Science
and Technology Serving Agricultural and Rural Moderni-
-100 0 100 200 300 400 500 600 700 zation (YN21047).
The number of iterations

Analysis method of financial References


securities investment strategy
based on genetic algorithm [1] M. Moshrefi and J. Behnamian, “Multi-objective portfolio
Traditional strategy analysis methods optimization by analytic hierarchy process and genetic al-
gorithm,” Soft Computing, vol. 5, no. 1, pp. 61–80, 2019.
Figure 8: Experimental comparison results. [2] K. Michell and W. Kristjanpoller, “Strongly-typed genetic
programming and fuzzy inference system: an embedded
approach to model and generate trading rules,” Applied Soft
assets. To confirm the interpretation of the experiment, the
Computing, vol. 90, no. 1, Article ID 106169, 2020.
traditional strategic analysis method is compared with the [3] K. Michell and W. Kristjanpoller, “Generating trading rules
strategic analysis method of this model, and the final result is on us stock market using strongly typed genetic program-
obtained by repeated experiments. ming,” Soft Computing, vol. 24, no. 5, pp. 3257–3274, 2020.
Finally, the penalty function decomposition method and [4] W. Jung, “The needs of incentives on long-term listed stock’s
the convergence solution of genetic algorithm are consistent. capital gains tax in planned financial investment gains tax-
67% of the total investment assets will buy a local automobile ation,” Seoul Tax Law Review, vol. 27, no. 1, pp. 325–362, 2021.
stock and 33% will buy a wine stock. [5] A. A. Ghazarian, N. I. Simonds, G. Y. Lai, and L. E. Mechanic,
“Opportunities for gene and environment research in cancer:
an updated review of nci’s extramural grant portfolio,” Cancer
5. Conclusion Epidemiology, Biomarkers & Prevention, vol. 30, no. 3,
pp. 576–583, 2021.
This paper proposes a genetic optimization algorithm to [6] S. J. N. Kumar, S. Ravimaran, and M. Gowthul Alam, “An
solve the financial portfolio problem. The quadratic pro- effective non-commutative encryption approach with opti-
gramming algorithm (QP) and the penalty function de- mized genetic algorithm for ensuring data protection in cloud
composition algorithm are used to compare the three to computing,” Computer Modeling in Engineering and Sciences,
solve the financial portfolio problem. Experimental results vol. 125, no. 2, pp. 671–697, 2020.
show that the quadratic programming algorithm (QP) has a [7] Z. Xu, G. Zhu, N. Metawa, and Q. Zhou, “Machine learning
faster convergence rate, but the investment distribution is based customer meta-combination brand equity analysis for
marketing behavior evaluation,” Information Processing &
not so good under the influence of the initial value selection.
Management, vol. 59, no. 1, Article ID 102800, 2022.
At the same time, the penalty function decomposition al- [8] C. Wang, M. R. Sen, B. Yao, M. Certik, and
gorithm can be widely used in sparse financial portfolio K. A. Randrianarivony, “Harnessing machine learning
problems, which ensures consistency with financial portfolio emerging technology in financial investment industry: ma-
issues and provides effective value to the test results. chine learning credit rating model implementation,” Journal
Computational Intelligence and Neuroscience 9

of Financial Risk Management, vol. 10, no. 03, pp. 317–341, [25] F. Ghani, “Editorial fallow time and managing aerosol gen-
2021. eration in dental clinics-current evidence and financial in-
[9] E. P. Setiawan and D. Rosadi, “Portfolio optimisation with vestment implications,” Journal of Rawalpindi Medical
cardinality constraint based on expected shortfall,” Interna- College, vol. 24, no. 4, pp. 290-291, 2020.
tional Journal of Computing Science and Mathematics, vol. 12,
no. 3, p. 262, 2020.
[10] M. Jiang, W. Liu, W. Xu, and W. Chen, “Improved multi-
objective bat algorithm for the credibilistic multiperiod mean-
var portfolio optimization problem,” Soft Computing, vol. 25,
no. 8, pp. 6445–6467, 2021.
[11] A. Takahashi and S. Takahashi, “A new interval type-2 fuzzy
logic system under dynamic environment: application to fi-
nancial investment,” Engineering Applications of Artificial
Intelligence, vol. 100, no. 1, Article ID 104154, 2021.
[12] A. Nahvi, M. Ghorbani, M. Sabouhi SabouniSabouhi Sabouni,
and A. Dourandish, “Portfolio optimization of bank credits
with interval returns: empirical evidence from Iran,” Banks
and Bank Systems, vol. 15, no. 4, pp. 49–68, 2020.
[13] N. A. Bakar and S. Rosbi, “Robust hybrid optimization
method to reduce investment portfolio risk using fusion of
modern portfolio theory and genetic algorithm,” Interna-
tional Journal of Engineering and Advanced Technology, vol. 8,
no. 6S3, pp. 136–148, 2019.
[14] T. Cheng and J. Zhong, “An efficient memetic genetic pro-
gramming framework for symbolic regression,” Memetic
Computing, vol. 12, no. 4, pp. 299–315, 2020.
[15] F. Abbas and P. Lahore, “Impact of investment, financial and
trade freedom on bank’s risk-taking,” Studies in Business and
Economics, vol. 16, no. 3, pp. 5–23, 2021.
[16] S. Mu and Z. Xiong, “Internet financial interest rate risk
measure based on genetic rough set reduction,” Service
Oriented Computing and Applications, vol. 13, no. 4,
pp. 309–321, 2019.
[17] W. Lin, S. Wandelt, and X. Sun, “Efficient network dis-
mantling through genetic algorithms,” Soft Computing,
vol. 26, no. 6, pp. 3107–3125, 2021.
[18] X. P. Mao, “Research on residents’ consumption and financial
investment behavior in internet economy,” E3S Web of
Conferences, vol. 253, no. 7, Article ID 03081, 2021.
[19] C. Tang and H. Wu, “Joint optimization of task caching and
computation offloading in vehicular edge computing,” Peer-
to-Peer Networking and Applications, vol. 15, no. 2, pp. 854–
869, 2021.
[20] L. H. Hung, C. H. Wu, C. H. Tsai, and H. C. Huang, Mi-
gration-based Load Balance of Virtual Machine Servers in
Cloud Computing by Load Prediction Using Genetic-Based
Methods, IEEE Access, vol. 99, p. 1, Piscataway, NJ, USA, 2021.
[21] M. P. Cuéllar, J. Gómez-Torrecillas, F. J. Lobillo, and
G. Navarro, “Genetic algorithms with permutation-based
representation for computing the distance of linear codes,”
Swarm and Evolutionary Computation, vol. 60, no. 6, Article
ID 100797, 2021.
[22] J. Ni, “Evaluation of financial investment risk of enterprises,”
E3S Web of Conferences, vol. 253, no. 6, Article ID 03077,
2021.
[23] R. Mehdi and M. Nachouki, “Cost optimization of procuring
cloud computing resources using genetic algorithms,” Journal
of Theoretical and Applied Information Technology, vol. 98,
no. 8, p. 1201, 2020.
[24] H. Zhang, H. Liao, X. Wu, E. K. Zavadskas, and A. Al-Bar-
akati, “Internet financial investment product selection with
pythagorean fuzzy dnma method,” Engineering Economics,
vol. 31, no. 1, pp. 61–71, 2020.

You might also like