# Model Construction of Enterprise Financial Early Warning Based on Quantum FOA-SVR

Authors: Wen-Tsao Pan; Yi Liu; Huan Jiang; Ya-Ting Chen; Ting Liu; Yan Qing; Guo-Hui Huang; Rong Li
Journal: Scientific Programming
 (2021)

---

## Abstract

The sudden outbreak of COVID-19 has a great impact on human life security and global economic development. To deal with the rampant pandemic, many countries have taken strict control measures, including restricting gathering in public places and stopping the production of enterprises; as a result, many enterprises suffered great challenges in survival and development during the pandemic. In order to help enterprises monitor their own financial situation and realize their healthy development under the pandemic, this paper constructs an Enterprise Financial Early Warning Model, in which Quantum Rotation Gate is used to optimize four algorithms, namely, Fruit Fly Optimization Algorithm (QFOA), Bee Colony Optimization Algorithm (QABC), Particle Swarm Optimization (QPSO), and Ant Colony Optimization (QACO). The results show that the ability of the prediction model can be greatly improved by using the Quantum Rotation Gate to optimize these four algorithms.


---

## Body

## 1. Preface

At present, under the influence of the epidemic, many enterprises have experienced management problems. Therefore, financial early warning has become an important mean for companies to make risk predictions. In order to solve the problem of the lack of effective early warning measures and means for corporate financial risk management, Liu [1] analyzed the basic connotation and causes of marine corporate financial risk and proposed a marine corporate financial risk prevention and control strategy based on the marine economy. Tang [2] put forward some suggestions to better strengthen risk warning based on the forecast of Qingdao marine economy and pointed out that by developing future financial risk assessment models and establishing a sound financial warning mechanism, companies can effectively provide early warning.Affected by COVID-19, the whole economic market has a tendency to stagnate, and many enterprises face the pressure of tight cash flow, supply chain interruption, and general decline of market supply and demand. Under the background of global economy facing deep recession crisis, the role of financial early warning is particularly important. First, the financial data of 250 enterprises in 2018 and 2019 are collected, and then Quantum Rotation Gate is used to optimize four algorithms, namely, Fruit Fly Optimization Algorithm [3], Bee Colony Optimization Algorithm [4], Particle Swarm Optimization [5], and Ant Colony Optimization [6]. Then, the parameters of SVR neural network are optimized by these optimized algorithms. Afterward, the Financial Early Warning Model is constructed. Finally, the error convergence trend chart and ROC curve of the four models are generated, and the first group of data formed an error narrative statistical table obtained by tests repeated 100 times. The results show that the four algorithms combined with Quantum Rotation Gate can effectively reduce the prediction errors and improve the accuracy and effectiveness of financial early warning.So far, there are many relevant studies on Quantum Rotation Gate Optimization Swarm Intelligence Algorithm. Mao et al. [7] proposed a hybrid algorithm of Quantum Particle Swarm Optimization and Ant Colony Optimization through the study of glass cutting problem. The research results show that the APSO-ACO algorithm is an effective method to solve glass cutting problems because of its strong optimization ability. Zhao [8] proposed a cloud computing resource scheduling method based on the improved Quantum Particle Swarm Optimization. Through the analysis of its performance through simulation experiments, it is shown that the method can effectively improve the utilization rate of cloud computing resources. Wang [9] proposed an improved multipopulation quantum genetic algorithm and introduced a new Quantum Rotation Gate in the evolution of the algorithm. The research results show that the algorithm has better optimization performance than conventional quantum genetic algorithm and multipopulation genetic algorithm. Wu et al. [10] proposed a quantum genetic algorithm to optimize the extreme learning machine. They compared the simulation results of ELM and QGA-ELM on datasets, which showed that QGA-ELM can effectively improve the classification accuracy of ELM networks. Yan and Ye [11] proposed a Hybrid Grasshopper Optimization Algorithm based on quantum computing and carried out simulation experiments, computational complexity analysis, and global convergence proof of the algorithm. The research shows that the Hybrid Grasshopper Optimization Algorithm has stronger global search ability and better convergence accuracy. Guo et al. [12] proposed Quantum Particle Swarm Optimization Based Patch-Graph Sparse Optimization for Large Array. This method is combined with QPSO algorithm. Compared with the traditional Patch-Graph Sparse Optimization, the global search ability is improved and the convergence speed is accelerated. Their simulation results show that the method is effective.The structure of this paper is as follows: the first section briefly introduces the background and literature review; the second section describes the research methods of this paper; the third section analyzes the verification process and research findings; and the fourth section provides conclusions and suggestions.


## 2. Research Methods

### 2.1. Quantum-Optimized Fruit Fly Optimization Algorithm (QFOA)

In terms of Quantum Coding Optimization of FOA, the fly position dimension is 3L ∗ 2, in which 3 represents the three parameters of the SVR model, L represents the number of bits that each parameter needs to be expressed as a binary code, and 2 means two of the quantum gates. The position of Drosophila is the [0,1] range of the zone coordinates.(1)
Fruit fly position initialization: Randomly set a fly positionp0 within the defined domain, and use a uniform distribution method to randomly generate popsize fruit fly positions.(2)
Move: Find the current optimal fruit fly position “p,” and set p0 = p.(3)
Release: Takep0 as the center and use a uniform distribution method to randomly generate new popsize positions of fruit flies.(4)
Measure the position of the fruit fly code:In the quantum spin gate, qubits |0> and |1> represent the two base states of tiny particles. According to the principle of superposition, the superposition state of quantum information can be expressed as a linear combination of these two fundamental states; namely, |ψ ≥ a|0〉+ß|1〉, where a and ß are complex numbers, representing the probability amplitude of the qubit state, which, respectively, represent the probability that the quantum state |ψ> collapses to the |0> state and |1> state due to measurement and meet the normalization conditions.In the Quantum Fruit Fly Algorithm, fruit flies use the probability amplitude of qubits for encoding. The encoding scheme is as follows:(1)Pi=cosθi1sinθi1cosθi2sinθi2ΛΛcosθiksinθik,θij=2π×RAND,i=1,2,…n,j=1,2,…k.θ is the phase of the qubit, n is the number of fruit flies, k is the number of qubits, which means the dimension of the solution space, and RAND is a random number in the range [0,1]. Each qubit is divided into upper and lower rows, corresponding to the probability amplitudes of the two quantum basic states and satisfying the normalization condition. Therefore, each individual contains two upper and lower cultural coding chains, each of which is a candidate solution to the optimization problem. It can be seen that the Quantum Fruit Fly Algorithm has twice the number of candidate solutions of the Fruit Fly Algorithm when the population size remains unchanged, which increases the diversity of the understanding space and improves the probability of successful optimization.When measuring the code of fruit flies, the square of each bit of the code is calculated so as to get its binary code.(2)tid=1,ifxid2<RAND,0,ifxid2≥RAND.(5)
Convert binary code to decimal decision variable, which means converting the binary code of each decision variable to get the decimal value of the decision variable we need.(6)
Calculate the value of the objective function: Calculate the objective function of the fruit fly position.(7)
Quantum Rotation Gate: The Quantum Rotation Gate is used to change the phase of the qubit to update the probability range of the qubit, so as to achieve the effect of fruit fly coding mutation. For the operation mode of quantum revolving gate, please refer to [13].(3)αi′βi′=cosθi−sinθisinθicosθiαiβi.


### 2.2. Quantum-Optimized Bee Colony Algorithm (QABC)

In terms of Quantum Coding Optimization of Bee Colony Algorithm, the bee position dimension is 3L ∗ 2, in which 3 represents the three parameters of the SVR model, L represents the number of bits that each parameter needs to be expressed as a binary code, and 2 means two quantum gates. Each dimension range of bee position is the [0,1] range interval of regional coordinates.(1)
Initialization of bee position: Use random initialization of bee position.(2)
Employment stage: A honey bee corresponds to a honey source. The honey bee corresponding to theith honey source searches for a new nectar source according to the following formula:(4)xid′=xid′+φidxid−xkd.(3)
Selection and wait-and-see phase:The newly generated possible solutions are(5)xi′=xi′,xi′,…,xiD′.The original solutions arexi=xi1,xi2,…,xiD.Make comparisons, and use a greedy selection strategy to retain better solutions. Each observation bee selects a nectar source based on probability, and the probability formula is(6)Pi=fiti∑j=1SNfitj.Among them, fiti is the fitness value of the possible solution Xi. For the selected nectar source, the observation bee searches for new possible solutions according to the above probability formula.(4)
Investigation phase: When all honey bees and observer bees have searched the entire search space, and if the fitness value of a nectar source is not increased within a given step (defined as the control parameter “limit”), then the nectar source is discarded, and the honey bee corresponding to the nectar source becomes a scout bee to search for new possible solutions using the following formula:(7)xid=xdmin+rxdmax−xdmin.(5)
Measuring the position of the bee code: In quantum computing, qubits |0〉and |1〉represent the two basic states of microscopic particles. According to the Principle of Superposition, the superposition state of quantum information can be expressed as the linear combination of two basic states; namely, |ψ〉 = a〉e0〉+ß〉e1〉, where a and ß are complex numbers, representing the probability amplitudes of the qubit state, in which the sum, respectively, represents the probability that quantum state |ψ〉collapses t |o0〉and |1〉state due to measurement and satisfies the normalization conditions.In the Quantum Bee Colony Algorithm, bees use the probability amplitude of qubits for encoding. The encoding scheme is as follows:(8)Pi=cosθi1sinθi1cosθi2sinθi2ΛΛcosθiksinθik,θij=2π×RAND,i=1,2,…n,j=1,2,…k.Θ is the phase of the qubit,n is the number of bees, k is the number of qubits, which means the dimension of the solution space, and RAND is the random number in the range of [0,1]. Each qubit is divided into two lines, up line and down line, corresponding to the probability amplitudes of the two quantum fundamental states, and satisfies the normalization condition. Therefore, each individual contains two cultural coding chains, each of which is a candidate solution to the optimization problem. The results show that the number of candidate solutions of Quantum Bee Colony Algorithm is twice as large as that of Swarm Algorithm, which can increase the diversity of solution space and improve the probability of success.When measuring the code of honey bee, the square of each bit of the code ofXi is calculated.(9)tid=1,ifxid2<RAND,0,ifxid2≥RAND,so as to get its binary code.(6)
Binary code conversion to decimal decision variable: Convert the binary code of each decision variable to obtain the decimal value of the decision variable we need.(7)
Quantum Rotation Gate: The Quantum Rotation Gate is used to change the phase of the qubit to update the probability range of the qubit, so as to achieve the effect of bee encoding mutation.(10)αi′βi′=cosθi−sinθisinθicosθiαiβi.


### 2.3. Quantum-Optimized Particle Swarm Optimization (QPSO)

The steps of Quantum Coding Optimization of Particle Swarm are as follows:(1)
Set quantum particle algorithm parameters.(2)
Initialize the particle swarm position.(3)
Because the position and velocity of the particle cannot be determined together in quantum space, the wave functionf(x,t) is used to describe the state of the particle.(4)
Get the probability density function of particles appearing at a certain point in space by solving Schrodinger equation.(5)
The position equation of the particles is obtained by random simulation of Monte Carlo method:(11)xt=P±L2ln1u,whereu obeys a uniformly distributed random number on [0,1]; L(t + 1) = 2β|mbest−X(t)| is determined. Finally, the evolution equation of the Quantum Particle Algorithm is(12)mbest=1M∑i=1MPi=1M∑i=1MPi1⋯1M∑i=1MPiD,Pid=ϕ∗Pid+1−ϕ∗Pgd.


### 2.4. Quantum-Optimized Ant Colony Algorithm (QACO)

(1)
Initialize pheromone and heuristic values: Initialize the pheromone intensity of each side and the taboo table of each ant in advance. The pheromone on each edge is initialized to a smaller valuer0; for each ant, a taboo table is needed to record the nodes that it has passed, and its taboo table is initialized to the node where the ant is located. The length of taboo table is I, and the amount of pheromone released by the ants on each side is initialized to 0.(2)
Initialize quantum gate: In quantum computing, qubits |0> and |1> represent the two basic states of microscopic particles. According to the principle of superposition, the superposition state of quantum information can be expressed as a linear combination of these two basic states; namely, |ψ〉 = a〉|0〉+ß|1〉, in which a and ß are complex numbers representing the probability amplitude of the qubit state and the sum, respectively, represents the probability that the quantum state |ψ〉collapses to |0〉and |1〉states due to measurement and satisfies the normalization condition. Assign values to a and ß of each qubit 1/2 to complete the initialization.(3)
Construct a path: Each ant selects the next node to reach under the constraint of the taboo table according to certain probability rules until a legal path is finally formed. The ant determines the city to be reached next according to a certain probability. The probability is calculated as follows:(13)Pijt=τijtαηijβμj∑k∈allowedτiktαηikβμkifj∈allowed0,where the pheromone intensity between nodei and node j is τijtα, the heuristic value intensity between node i and node j is ηij, and μj is the quantum information intensity of node j, which is defined as(14)μj=1αj2,whereαj is the amplitude of the jth quantum gate.The formula of (1) represents the probability that the ant chooses city j from city i at time t. a is the weight of the pheromone in the probability calculation, and the greater its value, the more important the role the pheromone will play in choosing the next city to be visited by the ant. ß is the weight of the heuristic factor (usually expressed as the reciprocal of d in the TSP problem) in the probability calculation, and the greater its value, the more important the role of the heuristic factor in the process of choosing cities by ants. allowed is a collection of cities that are not in the ant taboo list.The formula of (1) shows that the ants will not choose the cities in the taboo list, so as to ensure the legality of understanding.(4)
Calculate the intensity of quantum information:(15)μj=1αj2wherej is the quantum information intensity node and αj is the amplitude of the jth quantum gate.(5)
Calculate the path length generated by each ant, which is the sum of the length of each side in the path.(6)
Quantum Rotation Gate.(7)
Update pheromone: The pheromone is volatilized from each side, and then the pheromone released by the ants is obtained according to the length of the path produced by each ant. After all ants have completed the pheromone update, record the current shortest path, initialize the taboo table and the pheromone increment value △T(t, t + l), and proceed to step 2. Repeat this cycle until the final condition of the Algorithm is satisfied; for example, the solution cannot be further improved or the specified number of cycles is reached.(16)τijt+1=ρτijt+Δτijt,t+1,whereτijt+1 represents the pheromone on the edge ij during t iterations. ρ is the pheromone maintenance factor, and 1−ρ is the pheromone volatilization factor. Δτijt,t+1 is the sum of the pheromones released by all ants on the edge ij, as in (16).(17)Δτijt,t+1=∑k=1mΔτijkt,t+1,whereij belongs to all feasible paths.Finally, this research uses the same four algorithms, QPSO, QFOA, QABC, and QACO, to optimize the parametergamma and C of the SVR, which greatly improves the predictive ability of the Financial Early Warning Model.


## 2.1. Quantum-Optimized Fruit Fly Optimization Algorithm (QFOA)

In terms of Quantum Coding Optimization of FOA, the fly position dimension is 3L ∗ 2, in which 3 represents the three parameters of the SVR model, L represents the number of bits that each parameter needs to be expressed as a binary code, and 2 means two of the quantum gates. The position of Drosophila is the [0,1] range of the zone coordinates.(1)
Fruit fly position initialization: Randomly set a fly positionp0 within the defined domain, and use a uniform distribution method to randomly generate popsize fruit fly positions.(2)
Move: Find the current optimal fruit fly position “p,” and set p0 = p.(3)
Release: Takep0 as the center and use a uniform distribution method to randomly generate new popsize positions of fruit flies.(4)
Measure the position of the fruit fly code:In the quantum spin gate, qubits |0> and |1> represent the two base states of tiny particles. According to the principle of superposition, the superposition state of quantum information can be expressed as a linear combination of these two fundamental states; namely, |ψ ≥ a|0〉+ß|1〉, where a and ß are complex numbers, representing the probability amplitude of the qubit state, which, respectively, represent the probability that the quantum state |ψ> collapses to the |0> state and |1> state due to measurement and meet the normalization conditions.In the Quantum Fruit Fly Algorithm, fruit flies use the probability amplitude of qubits for encoding. The encoding scheme is as follows:(1)Pi=cosθi1sinθi1cosθi2sinθi2ΛΛcosθiksinθik,θij=2π×RAND,i=1,2,…n,j=1,2,…k.θ is the phase of the qubit, n is the number of fruit flies, k is the number of qubits, which means the dimension of the solution space, and RAND is a random number in the range [0,1]. Each qubit is divided into upper and lower rows, corresponding to the probability amplitudes of the two quantum basic states and satisfying the normalization condition. Therefore, each individual contains two upper and lower cultural coding chains, each of which is a candidate solution to the optimization problem. It can be seen that the Quantum Fruit Fly Algorithm has twice the number of candidate solutions of the Fruit Fly Algorithm when the population size remains unchanged, which increases the diversity of the understanding space and improves the probability of successful optimization.When measuring the code of fruit flies, the square of each bit of the code is calculated so as to get its binary code.(2)tid=1,ifxid2<RAND,0,ifxid2≥RAND.(5)
Convert binary code to decimal decision variable, which means converting the binary code of each decision variable to get the decimal value of the decision variable we need.(6)
Calculate the value of the objective function: Calculate the objective function of the fruit fly position.(7)
Quantum Rotation Gate: The Quantum Rotation Gate is used to change the phase of the qubit to update the probability range of the qubit, so as to achieve the effect of fruit fly coding mutation. For the operation mode of quantum revolving gate, please refer to [13].(3)αi′βi′=cosθi−sinθisinθicosθiαiβi.


## 2.2. Quantum-Optimized Bee Colony Algorithm (QABC)

In terms of Quantum Coding Optimization of Bee Colony Algorithm, the bee position dimension is 3L ∗ 2, in which 3 represents the three parameters of the SVR model, L represents the number of bits that each parameter needs to be expressed as a binary code, and 2 means two quantum gates. Each dimension range of bee position is the [0,1] range interval of regional coordinates.(1)
Initialization of bee position: Use random initialization of bee position.(2)
Employment stage: A honey bee corresponds to a honey source. The honey bee corresponding to theith honey source searches for a new nectar source according to the following formula:(4)xid′=xid′+φidxid−xkd.(3)
Selection and wait-and-see phase:The newly generated possible solutions are(5)xi′=xi′,xi′,…,xiD′.The original solutions arexi=xi1,xi2,…,xiD.Make comparisons, and use a greedy selection strategy to retain better solutions. Each observation bee selects a nectar source based on probability, and the probability formula is(6)Pi=fiti∑j=1SNfitj.Among them, fiti is the fitness value of the possible solution Xi. For the selected nectar source, the observation bee searches for new possible solutions according to the above probability formula.(4)
Investigation phase: When all honey bees and observer bees have searched the entire search space, and if the fitness value of a nectar source is not increased within a given step (defined as the control parameter “limit”), then the nectar source is discarded, and the honey bee corresponding to the nectar source becomes a scout bee to search for new possible solutions using the following formula:(7)xid=xdmin+rxdmax−xdmin.(5)
Measuring the position of the bee code: In quantum computing, qubits |0〉and |1〉represent the two basic states of microscopic particles. According to the Principle of Superposition, the superposition state of quantum information can be expressed as the linear combination of two basic states; namely, |ψ〉 = a〉e0〉+ß〉e1〉, where a and ß are complex numbers, representing the probability amplitudes of the qubit state, in which the sum, respectively, represents the probability that quantum state |ψ〉collapses t |o0〉and |1〉state due to measurement and satisfies the normalization conditions.In the Quantum Bee Colony Algorithm, bees use the probability amplitude of qubits for encoding. The encoding scheme is as follows:(8)Pi=cosθi1sinθi1cosθi2sinθi2ΛΛcosθiksinθik,θij=2π×RAND,i=1,2,…n,j=1,2,…k.Θ is the phase of the qubit,n is the number of bees, k is the number of qubits, which means the dimension of the solution space, and RAND is the random number in the range of [0,1]. Each qubit is divided into two lines, up line and down line, corresponding to the probability amplitudes of the two quantum fundamental states, and satisfies the normalization condition. Therefore, each individual contains two cultural coding chains, each of which is a candidate solution to the optimization problem. The results show that the number of candidate solutions of Quantum Bee Colony Algorithm is twice as large as that of Swarm Algorithm, which can increase the diversity of solution space and improve the probability of success.When measuring the code of honey bee, the square of each bit of the code ofXi is calculated.(9)tid=1,ifxid2<RAND,0,ifxid2≥RAND,so as to get its binary code.(6)
Binary code conversion to decimal decision variable: Convert the binary code of each decision variable to obtain the decimal value of the decision variable we need.(7)
Quantum Rotation Gate: The Quantum Rotation Gate is used to change the phase of the qubit to update the probability range of the qubit, so as to achieve the effect of bee encoding mutation.(10)αi′βi′=cosθi−sinθisinθicosθiαiβi.


## 2.3. Quantum-Optimized Particle Swarm Optimization (QPSO)

The steps of Quantum Coding Optimization of Particle Swarm are as follows:(1)
Set quantum particle algorithm parameters.(2)
Initialize the particle swarm position.(3)
Because the position and velocity of the particle cannot be determined together in quantum space, the wave functionf(x,t) is used to describe the state of the particle.(4)
Get the probability density function of particles appearing at a certain point in space by solving Schrodinger equation.(5)
The position equation of the particles is obtained by random simulation of Monte Carlo method:(11)xt=P±L2ln1u,whereu obeys a uniformly distributed random number on [0,1]; L(t + 1) = 2β|mbest−X(t)| is determined. Finally, the evolution equation of the Quantum Particle Algorithm is(12)mbest=1M∑i=1MPi=1M∑i=1MPi1⋯1M∑i=1MPiD,Pid=ϕ∗Pid+1−ϕ∗Pgd.


## 2.4. Quantum-Optimized Ant Colony Algorithm (QACO)

(1)
Initialize pheromone and heuristic values: Initialize the pheromone intensity of each side and the taboo table of each ant in advance. The pheromone on each edge is initialized to a smaller valuer0; for each ant, a taboo table is needed to record the nodes that it has passed, and its taboo table is initialized to the node where the ant is located. The length of taboo table is I, and the amount of pheromone released by the ants on each side is initialized to 0.(2)
Initialize quantum gate: In quantum computing, qubits |0> and |1> represent the two basic states of microscopic particles. According to the principle of superposition, the superposition state of quantum information can be expressed as a linear combination of these two basic states; namely, |ψ〉 = a〉|0〉+ß|1〉, in which a and ß are complex numbers representing the probability amplitude of the qubit state and the sum, respectively, represents the probability that the quantum state |ψ〉collapses to |0〉and |1〉states due to measurement and satisfies the normalization condition. Assign values to a and ß of each qubit 1/2 to complete the initialization.(3)
Construct a path: Each ant selects the next node to reach under the constraint of the taboo table according to certain probability rules until a legal path is finally formed. The ant determines the city to be reached next according to a certain probability. The probability is calculated as follows:(13)Pijt=τijtαηijβμj∑k∈allowedτiktαηikβμkifj∈allowed0,where the pheromone intensity between nodei and node j is τijtα, the heuristic value intensity between node i and node j is ηij, and μj is the quantum information intensity of node j, which is defined as(14)μj=1αj2,whereαj is the amplitude of the jth quantum gate.The formula of (1) represents the probability that the ant chooses city j from city i at time t. a is the weight of the pheromone in the probability calculation, and the greater its value, the more important the role the pheromone will play in choosing the next city to be visited by the ant. ß is the weight of the heuristic factor (usually expressed as the reciprocal of d in the TSP problem) in the probability calculation, and the greater its value, the more important the role of the heuristic factor in the process of choosing cities by ants. allowed is a collection of cities that are not in the ant taboo list.The formula of (1) shows that the ants will not choose the cities in the taboo list, so as to ensure the legality of understanding.(4)
Calculate the intensity of quantum information:(15)μj=1αj2wherej is the quantum information intensity node and αj is the amplitude of the jth quantum gate.(5)
Calculate the path length generated by each ant, which is the sum of the length of each side in the path.(6)
Quantum Rotation Gate.(7)
Update pheromone: The pheromone is volatilized from each side, and then the pheromone released by the ants is obtained according to the length of the path produced by each ant. After all ants have completed the pheromone update, record the current shortest path, initialize the taboo table and the pheromone increment value △T(t, t + l), and proceed to step 2. Repeat this cycle until the final condition of the Algorithm is satisfied; for example, the solution cannot be further improved or the specified number of cycles is reached.(16)τijt+1=ρτijt+Δτijt,t+1,whereτijt+1 represents the pheromone on the edge ij during t iterations. ρ is the pheromone maintenance factor, and 1−ρ is the pheromone volatilization factor. Δτijt,t+1 is the sum of the pheromones released by all ants on the edge ij, as in (16).(17)Δτijt,t+1=∑k=1mΔτijkt,t+1,whereij belongs to all feasible paths.Finally, this research uses the same four algorithms, QPSO, QFOA, QABC, and QACO, to optimize the parametergamma and C of the SVR, which greatly improves the predictive ability of the Financial Early Warning Model.


## 3. Empirical Analysis

### 3.1. Sample Data and Variables

Considering the demand of sample size, the impact of various factors in 2018 and 2019 on 250 companies in different industries (including 75 crisis companies and 175 normal companies) is studied in this paper. There are nine influencing factors: return on net assets (X1), net profit margin (X2), gross profit margin (X3), shareholder equity growth rate (X4), net profit growth rate (X5), net asset growth rate (X6), current ratio (X7), quick ratio (X8), and asset-liability ratio (X9). Taking into account the diversity of data, the maximum, minimum, average, and variance of each influencing factor are calculated for the 250 sets of data in 2019 and 2018 in Table 1, so as to compare the differences in financial warning data in the past two years more visually.Table 1
Descriptive statistics of sample data in 2019 and 2018.
2019VarX1X2X3X4X5X6X7X8X9N250250250250250250250250250Max207.50398.1296.431217.113335.511126.4218.4917.953983Min−1909.0−10472−220.8−118.87−17362.4−473.820.030.034.26Avg−36.81−114.0531.12−4.58−110.234.262.321.8779.04Std422.417166.787.34210.3113580.29110.990.090.07991.442018VarX1X2X3X4X5X6X7X8X9N250250250250250250250250250Max169.34157.2894.30876.303108.421000.2818.7017.181879.04Min−922.79−890.59−72.85−1419.9−348922.74−1419.90.070.044.74Avg−9.89−12.8427.21−2.62−2019.640.282.191.8154.61Std90.3287.304.87141.524941745.15144.560.060.05140.41


### 3.2. Using Quantum Swarm Intelligence to Optimize SVR Steps

First, in the QFOA optimization of SVR, select the financial early warning data and set the Fruit Fly Optimization Algorithm parameters; then, initialize the position of the fruit fly swarm, takingp0 as the center, and the method of uniform distribution is applied, randomly generating new popsize positions of fruit flies. The positions of fruit flies code are measured, and the binary code is converted into a decimal decision variable. Then, the objective function value is calculated, and the qubit phase is changed by Quantum Rotation Gate. Finally, the error is calculated by SVR. In terms of quantum swarm SVR optimization SVR, by employing bees, greedy selection, wait-and-see, reconnaissance, and other stages, the quantum revolving gate is used to change the phase of the qubit and measure the fitness of the swarm. Please refer to relevant literature for details. In the aspect of Quantum Particle Swarm Optimization SVR using SVR, the particle probability density function is obtained by solving the Schrodinger equation, and finally the error is obtained by SVR. Please refer to the relevant literature for details. In the aspect of quantum ant colony using SVR to optimize SVR, each ant constructs a legal path according to a certain probability rule, then calculates the quantum information intensity, calculates the transition probability, and updates the path, that is, calculates the length of the path generated by each ant. Then, use the Quantum Rotating Gate to measure whether the ant colony search is completed. Please refer to the relevant literature for details.


### 3.3. Result Analysis

According to the convergence trend graph of the four model errors calculated by ESM in Figure1, QFOA-SVR converges earlier than the other three algorithms, indicating that the algorithm has reached the optimal algorithm. After reaching the optimal algorithm, it can be seen from the trend graph that the QFOA is better than the other three algorithms. The algorithm is more stable, indicating that the QFOA is highly stable. Using Matlab software, the last 50 sets of data in 2018 and 2019 are, respectively, fixed as test data, and the first 200 sets of data are sample; then, repeatedly run QFOA, QABC, and QABC 100 times. After running the four algorithms of QACO and QPSO, count the maximum, minimum, average, variance, and total running time of five indicators of absolute errors, and get the error table that has repeated 100 times, Table 2. It can be seen in the table that the average value of QFOA is smaller than the average of the other three algorithms, indicating that the neural network of QFOA has smaller financial forecast errors than the other three algorithms, and the predicted results are more accurate.Figure 1
Convergence trend diagram of the four models.Table 2
Descriptive statistics repeated one hundred times.
QABCParticular yearMaxMinAvgStdTotal time (s)20181.0719070.0000520.2739690.06659724.720191.0541440.0000440.2955200.06269223.9QACOParticular yearMaxMinAvgStdTotal time (s)20181.0653050.0000370.2325380.05811921.820190.9790810.0003640.2740450.04689620.7QPSOParticular yearMaxMinAvgStdTotal time (s)20181.0653050.0000370.2292760.05966715.420190.8668270.0018490.2754280.04522713.9QFOAParticular yearMaxMinAvgStdTotal time (s)20181.0483690.0016520.2282470.05738314.920190.9465890.0002470.2740330.04858813.6It can be seen from Table3 that the variance of QFOA is smaller than that of the other three algorithms, indicating that the QFOA is the most stable among the four algorithms. In terms of the total time, it can be seen that the QFOA runs for less time compared with the other three algorithms, which indicates that the responsiveness of the Fruit Fly Optimization Algorithm is more sensitive, but the five indicators calculated by the four algorithms are relatively small, and the difference is slight, because we use quantum optimization of four algorithms at the same time; the stability, accuracy, and sensitivity of the optimized algorithm have been greatly improved. The ROC curve and table for 2018 and 2019 are drawn with the SPSS software. Figure 2 is the ROC curve circle, and Table 3 is the ROC table. The ROC table includes clarity, sensitivity, area under the curve, and Gini Coefficient. From the ROC curve and ROC table in 2018, it can be seen that the area, AUC value (0.677), and Gini Coefficient (0.354) of the QFOA are large, indicating that the QFOA is the most accurate of the four algorithms. The sensitivity (0.43) and specificity (0.924) are the highest in QFOA, indicating that the QFOA is more sensitive and responds faster. Moreover, from the ROC curve and ROC table in 2019, the conclusions are the same. Based on the ROC curve of two years, it can be concluded that the QFOA is the one with the most accurate prediction and most sensitive response among the four algorithms.Table 3
ROC curve analysis results.
2019QFOAQPSOQACOQABC2018QFOAQPSOQACOQABCAUC0.6770.6710.6230.648AUC0.7010.6990.6610.664Gini0.3540.3420.2460.296Gini0.4020.3980.3220.328Sens0.430.4180.3040.43Sens0.4470.4610.3680.408Spec0.9240.9240.9420.865Spec0.9540.9370.9540.92Figure 2
ROC curves of the four models.


## 3.1. Sample Data and Variables

Considering the demand of sample size, the impact of various factors in 2018 and 2019 on 250 companies in different industries (including 75 crisis companies and 175 normal companies) is studied in this paper. There are nine influencing factors: return on net assets (X1), net profit margin (X2), gross profit margin (X3), shareholder equity growth rate (X4), net profit growth rate (X5), net asset growth rate (X6), current ratio (X7), quick ratio (X8), and asset-liability ratio (X9). Taking into account the diversity of data, the maximum, minimum, average, and variance of each influencing factor are calculated for the 250 sets of data in 2019 and 2018 in Table 1, so as to compare the differences in financial warning data in the past two years more visually.Table 1
Descriptive statistics of sample data in 2019 and 2018.
2019VarX1X2X3X4X5X6X7X8X9N250250250250250250250250250Max207.50398.1296.431217.113335.511126.4218.4917.953983Min−1909.0−10472−220.8−118.87−17362.4−473.820.030.034.26Avg−36.81−114.0531.12−4.58−110.234.262.321.8779.04Std422.417166.787.34210.3113580.29110.990.090.07991.442018VarX1X2X3X4X5X6X7X8X9N250250250250250250250250250Max169.34157.2894.30876.303108.421000.2818.7017.181879.04Min−922.79−890.59−72.85−1419.9−348922.74−1419.90.070.044.74Avg−9.89−12.8427.21−2.62−2019.640.282.191.8154.61Std90.3287.304.87141.524941745.15144.560.060.05140.41


## 3.2. Using Quantum Swarm Intelligence to Optimize SVR Steps

First, in the QFOA optimization of SVR, select the financial early warning data and set the Fruit Fly Optimization Algorithm parameters; then, initialize the position of the fruit fly swarm, takingp0 as the center, and the method of uniform distribution is applied, randomly generating new popsize positions of fruit flies. The positions of fruit flies code are measured, and the binary code is converted into a decimal decision variable. Then, the objective function value is calculated, and the qubit phase is changed by Quantum Rotation Gate. Finally, the error is calculated by SVR. In terms of quantum swarm SVR optimization SVR, by employing bees, greedy selection, wait-and-see, reconnaissance, and other stages, the quantum revolving gate is used to change the phase of the qubit and measure the fitness of the swarm. Please refer to relevant literature for details. In the aspect of Quantum Particle Swarm Optimization SVR using SVR, the particle probability density function is obtained by solving the Schrodinger equation, and finally the error is obtained by SVR. Please refer to the relevant literature for details. In the aspect of quantum ant colony using SVR to optimize SVR, each ant constructs a legal path according to a certain probability rule, then calculates the quantum information intensity, calculates the transition probability, and updates the path, that is, calculates the length of the path generated by each ant. Then, use the Quantum Rotating Gate to measure whether the ant colony search is completed. Please refer to the relevant literature for details.


## 3.3. Result Analysis

According to the convergence trend graph of the four model errors calculated by ESM in Figure1, QFOA-SVR converges earlier than the other three algorithms, indicating that the algorithm has reached the optimal algorithm. After reaching the optimal algorithm, it can be seen from the trend graph that the QFOA is better than the other three algorithms. The algorithm is more stable, indicating that the QFOA is highly stable. Using Matlab software, the last 50 sets of data in 2018 and 2019 are, respectively, fixed as test data, and the first 200 sets of data are sample; then, repeatedly run QFOA, QABC, and QABC 100 times. After running the four algorithms of QACO and QPSO, count the maximum, minimum, average, variance, and total running time of five indicators of absolute errors, and get the error table that has repeated 100 times, Table 2. It can be seen in the table that the average value of QFOA is smaller than the average of the other three algorithms, indicating that the neural network of QFOA has smaller financial forecast errors than the other three algorithms, and the predicted results are more accurate.Figure 1
Convergence trend diagram of the four models.Table 2
Descriptive statistics repeated one hundred times.
QABCParticular yearMaxMinAvgStdTotal time (s)20181.0719070.0000520.2739690.06659724.720191.0541440.0000440.2955200.06269223.9QACOParticular yearMaxMinAvgStdTotal time (s)20181.0653050.0000370.2325380.05811921.820190.9790810.0003640.2740450.04689620.7QPSOParticular yearMaxMinAvgStdTotal time (s)20181.0653050.0000370.2292760.05966715.420190.8668270.0018490.2754280.04522713.9QFOAParticular yearMaxMinAvgStdTotal time (s)20181.0483690.0016520.2282470.05738314.920190.9465890.0002470.2740330.04858813.6It can be seen from Table3 that the variance of QFOA is smaller than that of the other three algorithms, indicating that the QFOA is the most stable among the four algorithms. In terms of the total time, it can be seen that the QFOA runs for less time compared with the other three algorithms, which indicates that the responsiveness of the Fruit Fly Optimization Algorithm is more sensitive, but the five indicators calculated by the four algorithms are relatively small, and the difference is slight, because we use quantum optimization of four algorithms at the same time; the stability, accuracy, and sensitivity of the optimized algorithm have been greatly improved. The ROC curve and table for 2018 and 2019 are drawn with the SPSS software. Figure 2 is the ROC curve circle, and Table 3 is the ROC table. The ROC table includes clarity, sensitivity, area under the curve, and Gini Coefficient. From the ROC curve and ROC table in 2018, it can be seen that the area, AUC value (0.677), and Gini Coefficient (0.354) of the QFOA are large, indicating that the QFOA is the most accurate of the four algorithms. The sensitivity (0.43) and specificity (0.924) are the highest in QFOA, indicating that the QFOA is more sensitive and responds faster. Moreover, from the ROC curve and ROC table in 2019, the conclusions are the same. Based on the ROC curve of two years, it can be concluded that the QFOA is the one with the most accurate prediction and most sensitive response among the four algorithms.Table 3
ROC curve analysis results.
2019QFOAQPSOQACOQABC2018QFOAQPSOQACOQABCAUC0.6770.6710.6230.648AUC0.7010.6990.6610.664Gini0.3540.3420.2460.296Gini0.4020.3980.3220.328Sens0.430.4180.3040.43Sens0.4470.4610.3680.408Spec0.9240.9240.9420.865Spec0.9540.9370.9540.92Figure 2
ROC curves of the four models.


## 4. Conclusions and Recommendations

The main contribution of this paper lies in the use of a relatively new Quantum Rotation Gate to optimize algorithms, namely, Fruit Fly Optimization Algorithm, Particle Swarm Optimization, Swarm Optimization Algorithm, and Ant Colony Optimization Algorithm. The results of the study show that the ROC curve is obtained by iterative trend graphs, repeated test data, and ROC curves. In this paper, we find that the Quantum Fruit Fly Optimization Algorithm and the optimized SVR Financial Early Warning Model are superior to the other three algorithms in convergence speed, optimization stability, and financial early warning stability. In addition, it is found that the four models are very close to each other in terms of convergence rate, model stability, and prediction error. Therefore, the Quantum Rotation Gate is superior in the ability to optimize the four algorithms. Therefore, it is suggested that Fruit Fly Optimization Algorithm can be used to optimize SVR to construct Financial Early Warning Model in the future. In this paper, we use Quantum Rotation Gate to optimize the four algorithms, and propose other methods to optimize the four algorithms in the future, such as chaos theory or wavelet theory.



---

*Source: 5018917-2021-09-15.xml*