# Regional Economic Forecasting Method Based on Recurrent Neural Network

Authors: E. Liu; Haiou Zhu; Qing Liu; Thomas Bilaliib Udimal
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Macroeconomic situation is the overall performance of the economic situation of a country and region. Making accurate forecasts of macroeconomic trends is of great significance for analyzing the success or failure of macroeconomic control policies, evaluating the quality of economic system operation, and correctly formulating future development planning strategies. The macroeconomic system is a nonlinear system, the environment is constantly changing, and additional disturbing factors directly affect the operation of the macroeconomic system, which has a great impact on the forecast results. The historical information required for macroeconomic modeling is unstable, unclear, and incomplete, which makes it very difficult to solve such problems with traditional forecasting methods. In response to the multivariate and nonlinear characteristics of macroeconomic forecasting, this paper proposes the application of artificial neural networks for forecasting. This paper introduces the recurrent neural network into the field of economic forecasting to solve the problems of the traditional BP (back propagation) neural network method. The experimental data are verified and the experimental results prove that the studied scheme based PSO-GRU improve the performance of economic forecasting.


---

## Body

## 1. Introduction

Macroeconomic system is the comprehensive performance of the overall economic situation of a country or region; finance is an important part of the national economy and an important macro-control tool [1]; macro-control is a complex system project, and to make active and effective regulation, we must first make forecasts. Forecasting is based on historical information and the current situation and infers the development trend of things according to certain theories and methods [2].Economic phenomena can be recognized and used. Economic forecast is a scientific forecast based on the knowledge of the inner laws of economic phenomena. The development of economic phenomena is influenced by many factors, which are intrinsically linked and will continue to have an impact on the development of economic phenomena for a long period of time, which makes the occurrence and development of economic phenomena have objective regularity [3, 4]. The degree of accuracy of economic forecasting is relative and limited. The development of economic phenomena is influenced not only by factors that people already know and can grasp, but also by factors that people have not yet recognized and cannot grasp, such as sudden changes in major economic policies, huge natural disasters and other events that have a great impact on economic life [5]. Therefore, the future development of economic phenomena has uncertainty, and due to the existence of uncertainty, there are inevitable deviations in economic forecasting, coupled with the fact that sometimes the statistics and economic information available are insufficient or not accurate enough, and the forecasting methods chosen are not appropriate, which may also cause the failure of economic forecasting [6, 7]. As the development of economic phenomena change both by chance and necessity, the changes affected by chance are random fluctuations, and the necessity behind the chance determines the development process of things. Therefore, under the premise of ensuring the accuracy and completeness of survey statistics and economic information, the accuracy of economic forecasting can be maximized by constantly studying and improving the forecasting methods [8].The deviation of the results of economic forecasting from the actual economic operation does not necessarily mean the failure of forecasting [9]. The purpose of economic forecasting is to guide economic production activities by making appropriate economic decisions. In other words, by analyzing the results of economic forecasts, government departments or individual entities make necessary adjustments and interventions in economic activities and take corresponding economic measures to make economic activities develop in the direction of profit and avoid harm, which inevitably leads to the situation that the forecast results are not consistent with the actual economic operation [10–12]. However, in this case, the deviation of the forecast results from the actual economic operation indicates the usefulness of the forecast, which is a kind of inconsistency beneficial to economic life.Among the existing forecasting methods, time series forecasting and regression forecasting are the two most commonly used statistical methods. The macroeconomic system is essentially a nonlinear system, and the environment in which it is located is in a state of constant change, and additional disturbances act directly on the operating process of the macroeconomic system, which has a great impact on the forecasting results [13–15]. The historical information required for macroeconomic modeling is unstable, unclear, and incomplete, which makes it very difficult to solve such problems using traditional forecasting methods, and the application of artificial neural networks is proposed for forecasting [16].Artificial neural network is a nonlinear dynamic system that can realize nonlinear relationships between variables within arbitrary accuracy [17–20]. It has the ability to solve nonlinear problems, network learning ability, and system fitting ability, and can meet the macroeconomic pointer forecasting requirements, so that the system has the ability to deal with nonlinear and uncertainty problems. Macroeconomic system is a complex system, and under the guidance of economic theory, the characteristics of macroeconomic system are analyzed and the macroeconomic pointer is discussed [21–23]. Under the guidance of economic theory, the characteristics of macroeconomic system are analyzed, and the macroeconomic pointer system is discussed. Based on the characteristics of macroeconomic system such as nonlinearity and uncertainty, a comprehensive and integrated approach combining qualitative and quantitative analysis is proposed to analyze macroeconomics [24]. A system modeling method combining polynomial fitting and BP neural network is proposed to improve the accuracy of system forecasting. The system modeling method combining polynomial fitting and BP neural network is proposed to improve the forecast accuracy of the system, realize the forecast of regional macroeconomic pointers, and describe the macroeconomic development trend.


## 2. Methodology

### 2.1. GRU

Recurrent neural network (RNN) is a neural network structure for sequential data, the core of which is to recycle the parameters of network layers to avoid the parameter surge caused by the increase of time step, and to introduce the hidden state for recording historical information to effectively deal with the before and after correlation of data [25–28]. RNN is very effective for data with sequential characteristics, and it can mine the temporal information as well as semantic information in the data. Using this capability of RNN, it enables deep learning models to make a breakthrough in solving problems in NLP fields such as speech recognition, language modeling, machine translation, and temporal analysis.Gated recurrent units (GRU) is a typical RNN model [29–31]; the GRU network model and its structure is shown in Figure 1. Please rephrase the part for clarity, the structure of GRU is similar to the LSTM, but much simpler than the LSTM, which only contains two kinds of gates: the reset gate and the update gate. The reset gate is responsible for getting the short-term dependencies in the temporal data, i.e., the reset gate controls how much information in the past is forgotten and the update gate controls the state information of the previous moment, which is substituted into the current state and is helpful to get the long-term dependencies in the temporal data and it updates all candidate implicit states.Figure 1
GRU model structure.


### 2.2. PSO

Particle swarm optimization (PSO) is a population intelligence optimization algorithm inspired by the feeding process of birds, also known as flock foraging algorithm [26, 32]. In PSO, each potential solution of the optimization problem is considered as a particle, similar to a bird in a flock. Each particle has a velocity that determines its flight direction and distance [19], as well as a fitness value, and then all particles find the optimal value in the solution space using the current optimal particle as the criterion. Suppose that in a D-dimensional search space, the number of particles is N and a particle x in the particle population, the velocity of a particle X in the swarm can be expressed as follows:(1)Xi=xi1,xi2,…,xiN,Vi=vi1,vi2,…,viN.The optimal position found by an individual particle is called the individual pole, denoted bypid, and the optimal position found by the whole particle swarm is called the global pole, denoted by pgd, after which the particles are updated according to equation:(2)vidt=Λ⋅vidt+c1r1tpidt−xidt+c2r2tpgdt−xidt,xidt+1=xidt+vidt,where c1andc2 denotes the learning factor,Λ denotes the inertia factor, larger Λ means stronger global search ability and weaker local search ability, and smaller Λ means stronger local search ability and weaker global search ability. The particle swarm algorithm requires fewer parameters to be adjusted, is easy to implement, and has strong generality by using real numbers to solve [33]. At present, the particle swarm algorithm is widely used in pattern recognition, image processing, neural network training, decision scheduling, and other related industries.


### 2.3. PSO-GRU

The basic idea is to optimize the initial weights of GRU by using PSO, which makes the network converge faster and achieve better prediction. Figure2 shows the detail design of the PSO-GRU model for regional economic forecasting.Figure 2
PSO-GRU model structure.The specific steps are described as follows:Step 1: Initialize the GRU model and determine the model parameters.Step 2: Process the data, and this paper adopts the maximum-minimum method to normalize the data, so that the range of the data after processing falls between [0, 1].Step 3: Initialize the parameters of the particle swarm algorithm.Step 4: Initialize the velocity and position of the particles.Step 5: Determine the fitness function of the particles,(3)fxi=1N∑Iy˜i∗−yi∗,wherey˜i∗ and yi∗ denote the desired output and the actual output of the training set, respectively.Step 6: Calculate the corresponding fitnessfitxi of each particle X; and compare the fits with the individual extremes Pest, if fitxi < Pest, then replace Pest with fitxi to complete the update of Pest.Step 7: Compare the best fitness (individual extreme value)Pest of each particle with the global extreme value gest, if Pest < gest, then replace gest with Pest to complete the update of gest.Step 8: Update the velocity and position of the particle itself. Calculate the fitness of the new particle and find the individual extreme value and global extreme value of the new particle here.Step 9: After satisfying the termination condition of PSO algorithm (usually the maximum number of iterations or the minimum fitness value), the optimal particles are input to the GRU model as their initialized weights and thresholds, and the PSO-GRU model is trained.


## 2.1. GRU

Recurrent neural network (RNN) is a neural network structure for sequential data, the core of which is to recycle the parameters of network layers to avoid the parameter surge caused by the increase of time step, and to introduce the hidden state for recording historical information to effectively deal with the before and after correlation of data [25–28]. RNN is very effective for data with sequential characteristics, and it can mine the temporal information as well as semantic information in the data. Using this capability of RNN, it enables deep learning models to make a breakthrough in solving problems in NLP fields such as speech recognition, language modeling, machine translation, and temporal analysis.Gated recurrent units (GRU) is a typical RNN model [29–31]; the GRU network model and its structure is shown in Figure 1. Please rephrase the part for clarity, the structure of GRU is similar to the LSTM, but much simpler than the LSTM, which only contains two kinds of gates: the reset gate and the update gate. The reset gate is responsible for getting the short-term dependencies in the temporal data, i.e., the reset gate controls how much information in the past is forgotten and the update gate controls the state information of the previous moment, which is substituted into the current state and is helpful to get the long-term dependencies in the temporal data and it updates all candidate implicit states.Figure 1
GRU model structure.


## 2.2. PSO

Particle swarm optimization (PSO) is a population intelligence optimization algorithm inspired by the feeding process of birds, also known as flock foraging algorithm [26, 32]. In PSO, each potential solution of the optimization problem is considered as a particle, similar to a bird in a flock. Each particle has a velocity that determines its flight direction and distance [19], as well as a fitness value, and then all particles find the optimal value in the solution space using the current optimal particle as the criterion. Suppose that in a D-dimensional search space, the number of particles is N and a particle x in the particle population, the velocity of a particle X in the swarm can be expressed as follows:(1)Xi=xi1,xi2,…,xiN,Vi=vi1,vi2,…,viN.The optimal position found by an individual particle is called the individual pole, denoted bypid, and the optimal position found by the whole particle swarm is called the global pole, denoted by pgd, after which the particles are updated according to equation:(2)vidt=Λ⋅vidt+c1r1tpidt−xidt+c2r2tpgdt−xidt,xidt+1=xidt+vidt,where c1andc2 denotes the learning factor,Λ denotes the inertia factor, larger Λ means stronger global search ability and weaker local search ability, and smaller Λ means stronger local search ability and weaker global search ability. The particle swarm algorithm requires fewer parameters to be adjusted, is easy to implement, and has strong generality by using real numbers to solve [33]. At present, the particle swarm algorithm is widely used in pattern recognition, image processing, neural network training, decision scheduling, and other related industries.


## 2.3. PSO-GRU

The basic idea is to optimize the initial weights of GRU by using PSO, which makes the network converge faster and achieve better prediction. Figure2 shows the detail design of the PSO-GRU model for regional economic forecasting.Figure 2
PSO-GRU model structure.The specific steps are described as follows:Step 1: Initialize the GRU model and determine the model parameters.Step 2: Process the data, and this paper adopts the maximum-minimum method to normalize the data, so that the range of the data after processing falls between [0, 1].Step 3: Initialize the parameters of the particle swarm algorithm.Step 4: Initialize the velocity and position of the particles.Step 5: Determine the fitness function of the particles,(3)fxi=1N∑Iy˜i∗−yi∗,wherey˜i∗ and yi∗ denote the desired output and the actual output of the training set, respectively.Step 6: Calculate the corresponding fitnessfitxi of each particle X; and compare the fits with the individual extremes Pest, if fitxi < Pest, then replace Pest with fitxi to complete the update of Pest.Step 7: Compare the best fitness (individual extreme value)Pest of each particle with the global extreme value gest, if Pest < gest, then replace gest with Pest to complete the update of gest.Step 8: Update the velocity and position of the particle itself. Calculate the fitness of the new particle and find the individual extreme value and global extreme value of the new particle here.Step 9: After satisfying the termination condition of PSO algorithm (usually the maximum number of iterations or the minimum fitness value), the optimal particles are input to the GRU model as their initialized weights and thresholds, and the PSO-GRU model is trained.


## 3. Results and Analysis

### 3.1. Experimental Data and Settings

Economic forecasts generally need to follow: the larger the amount of data the more accurate the results, the shorter the time the more accurate, the need to estimate in advance the possibility of, the forecasting method should be tested before use, and so on. Based on these principles, the prediction experiments in this paper are designed. The ultimate purpose of economic forecasting is to meet the needs of decision making and management, and the two major economic indicators, Gross Domestic Product (GDP) and Consumer Price Index (CPI), are selected as the forecasting targets. In order to ensure the accuracy as well as the credibility of the forecast results, we must first ensure the accuracy, reliability, and timeliness of the data. In order to ensure the accuracy and credibility of the forecast results, we must first ensure the accuracy, reliability, and timeliness of the data. The data used in this paper are all from the official website of the National Bureau of Statistics, which are released by the state and are true and reliable. Secondly, we need to standardize the data units, values, and scales to ensure the consistency of the data, and preprocess the collected data to ensure the smooth conduct of the experiments afterwards. In this paper, the experiments are normalized and preprocessed by using the standardized method of deviation for the economic forecasting data.


## 3.1. Experimental Data and Settings

Economic forecasts generally need to follow: the larger the amount of data the more accurate the results, the shorter the time the more accurate, the need to estimate in advance the possibility of, the forecasting method should be tested before use, and so on. Based on these principles, the prediction experiments in this paper are designed. The ultimate purpose of economic forecasting is to meet the needs of decision making and management, and the two major economic indicators, Gross Domestic Product (GDP) and Consumer Price Index (CPI), are selected as the forecasting targets. In order to ensure the accuracy as well as the credibility of the forecast results, we must first ensure the accuracy, reliability, and timeliness of the data. In order to ensure the accuracy and credibility of the forecast results, we must first ensure the accuracy, reliability, and timeliness of the data. The data used in this paper are all from the official website of the National Bureau of Statistics, which are released by the state and are true and reliable. Secondly, we need to standardize the data units, values, and scales to ensure the consistency of the data, and preprocess the collected data to ensure the smooth conduct of the experiments afterwards. In this paper, the experiments are normalized and preprocessed by using the standardized method of deviation for the economic forecasting data.


## 4. Numerical Results and Analysis

In order to quantitatively compare the forecasting performance of BP LSTM GUR PSO-GRU, we applied the mean absolute error (MAE), mean square error (MSE), and mean relative error to measure the forecasting accuracy, and the formulas of the above three indicators are defined as follows:(4)MAE=1n∑i=1nyi−y^i,MSE=1n∑i=1nyi−y^i2,RMSE=1n∑i=1nyi−y^i2.From Table1 and Figure 3, we can see that the errors of the three methods are not large, and they can predict the consumer price index of Guangdong Province with a certain degree of accuracy, reflecting the pattern of changes in the price index. The PSO-GUR model has the best performance in terms of mean absolute error (MAE) and mean relative error, reflecting the better modeling accuracy of PSO-GUR. However, the LSTM and BP models perform better in the mean squared error (MSE), which is an indicator of the volatility of the prediction error, which also reflects that the linear model like VAR is more difficult to capture the part of drastic changes, while the BP neural network is worse in all indicators. It indicates that PSO-GRU can tap the complex change patterns inherent in the data to improve the prediction accuracy and is a better nonlinear prediction method than BP neural network, while it can make up for the shortcomings of traditional linear time series models.Table 1
Detail of performance comparison of different method.
MethodMAEMSERSMEBP0.670.740.65LSTM0.520.690.56GRU0.470.450.52PSO-GRU0.410.350.38Figure 3
Performance comparison of different method.From Figure4, the actual consumer price index in Guangdong Province showed a slight decline and then stabilized during the forecast period from June 2014 to February 2015, and the forecast results of PSO-GRU model could follow the downward trend of the consumer price index in Guangdong Province more closely in the first six months, which is consistent with the actual situation, while the forecasts of BP all showed the downward trend of the consumer price index in Guangdong Province in the first seven months. The former is good for the government to prevent inflation in time, while the latter may lead to the loss of timely control of possible inflation.Figure 4
Performance comparison of different method on growth ratio of CPI.Figure5 gives the error convergence curves of the PSO-GRU deep learning model and the BP neural network in the training and learning phase. In terms of convergence speed, PSO-GRU is faster than the BP, LSTM, and GRU model and does not show oscillation. This is mainly because the pretraining learning method used by PSO-GRU can well provide a good initial value for the network; while the BP, LSTM, and GRU model use random parameters to initialize the network, thus its error curve has a higher starting point, longer convergence time, and may show oscillations, which is a reason for the poor performance of the final BP prediction.Figure 5
Performance comparison of different method on CPI.The aforementioned experiments show that the PSO-GRU deep learning method can effectively forecast the consumer price index in Guangdong Province, and the objective indicators such as mean absolute error (MAE), mean square error (MSE), and mean relative error show that the PSO-GRU method has higher forecasting accuracy compared with BP, LSTM, and GRU model. At the same time, PSO-GRU method has faster convergence speed and stronger generalization ability, especially when there are fewer labeled training samples, and it is a more superior economic forecasting modeling tool.


## 5. Conclusions

In response to the multivariate and nonlinear characteristics of macroeconomic forecasting, this paper proposes the application of artificial neural networks for forecasting. This paper introduces the recurrent neural network into the field of economic forecasting to solve the problems of the traditional BP network economic forecasting method. The experimental data are verified and the experimental results prove that the studied scheme based PSO-GRU improve the performance of economic forecasting.



---

*Source: 3058947-2022-10-06.xml*