# Forecast of Chemical Export Trade Based on PSO-BP Neural Network Model

Authors: Na Li; Meng Li
Journal: Journal of Mathematics
 (2022)

---

## Abstract

With the gradual deepening of China’s reform and opening up, the degree of foreign development has been deepened, and its dependence on foreign trade has increased. The “export-oriented” economic development has achieved results. Export trade is introducing advanced technology and equipment, expanding employment opportunities, and increasing government revenue. The export trade is affected by various domestic and international factors and is a complex nonlinear system. Although the traditional linear prediction method has the advantages of intuitiveness, simplicity, and strong interpretability, it is difficult to deal with the prediction problem of dynamic and complex nonlinear systems. The neural network is a nonlinear dynamic system, with strong nonlinear mapping ability, strong robustness, and fault tolerance. It has unique advanced advantages for solving nonlinear problems and is very suitable for solving nonlinear problems.


---

## Body

## 1. Introduction

Since World War II, the international situation has changed a lot. Peace and development have become the theme of the world. With the advancement of science and technology, human material civilization has developed to an unprecedented height, and the world economy is moving towards internationalization, globalization, international trade, and international division of labor. Cooperation is the trend of world economic development, and the economic development and technological progress of a country (region) is increasingly influenced and dependent on other countries (regions). International trade encourages products, technologies, and resources of all countries to enter international exchanges, complementing each other. The exchange of international commodities has promoted the division of labor and cooperation among countries and promoted the process of global economic integration. At the same time as the development of international trade, theoretical and empirical research related to international trade has developed vigorously. These studies have played a very important role in promoting and regulating the development of international trade. Among them, the research content of export trade can be summarized into three aspects: research on the relationship between export trade and economic growth, research on export product structure, and research on export trade forecasting and decision-making. In terms of export trade forecasting research, there are traditional econometric forecasting methods, nonlinear forecasting methods, and combined forecasting methods. Because export trade is affected by many domestic and international factors, nonlinear forecasting has become the mainstream trend of export trade forecasting research [1–7].Deep learning is the core algorithm in machine learning. This definition first appeared in 2006. Researchers such as Geoffrey proposed a technique to reduce the dimensionality of data with the help of neural networks and published this result in the journal Science. This concept is one of the most important advances in artificial intelligence technology in the past decade. It has made great breakthroughs in many technologies, including image and video analysis, audio discrimination, natural language processing, computer hearing, and multimedia. In the current use of neural network models, it teaches computers to think and understand the world in a human way. In 1940, the concept of neural networks began to appear, which is a study of the formation mechanism of brain consciousness and simulations to answer various types of machine learning questions. In 1986, Rumelhart et al. discovered that the backpropagation algorithm can be used in the process of training neural networks. This famous discovery was published in the journal Nature and has been widely used so far.The principle of BP neutral network is shown in Figure1. Adamantios Diamantopoulos et al., in order to verify the impact of potential influencing factors such as enterprise and export characteristic values ​​on the accuracy of export sales forecasts under a diversified structure, investigated the empirical data of UK manufacturing exporters and used multiple analysis methods to obtain historical exports and export environments. Changes are a key factor affecting the accuracy of export sales forecasts, and it is believed that in the short- and medium-term export sales forecasts, the forecasting accuracy is higher [8–15]. Particle swarm optimization is a metaheuristics algorithm, which belongs to a subclass of population-based metaheuristics. This means placing multiple particles in an n-dimensional solution space and moving them around to obtain the optimal solution.Figure 1
BP neural network.In the development of neural networks, there are mainly the following influential events: ① W. McCulloch and W. Pitts used simple mathematical models to imitate biological systems for the first time based on the basic characteristics of biological neurons. The activity function of neurons, and the connection relationship between neurons are expressed through mathematical relations, and the first neuron calculation model, namely, the threshold component model of neurons, referred to as MP neuron model, created artificial the history of neural network research. ② In 1949, D.O.Hebb proposed a Hebb learning rule that adjusts the connection weights of neural networks. The basic idea of Hebb’s learning rules is as follows: neurons have two activity states—excited and inhibited. When two neurons are excited or inhibited at the same time, the strength of the connection between the two neurons increases. Hebb learning rules are still used in some neural network models. ③ In 1958, computer scientist F. Rosenblatt promoted the MP model. He added a learning mechanism to the MP model, and researched and designed a simplified model for biological systems to perceive external sensor information, called a perceptron. This type of model is mainly used for pattern classification, and the current types of perceptrons include linear perceptrons, nonlinear perceptrons, high-order perceptrons, and fuzzy perceptrons. ④ In 1969, M.Miskey and S.Papert pointed out that a simple linear perceptron (single-layer perceptron) can only perform current classification, but cannot solve the XOR classification problem. As a result, neural networks were questioned, and the research on neural networks in the 1970s was at a low ebb. BP algorithm puts forward the learning algorithm of error backpropagation based on the multi-layer forward neural network model [16–22].The foreign trade development status of a country or region is often the economic content that the local management and decision-making departments focus on. The evaluation results obtained using the above methods often contain a certain degree of subjectivity and arbitrariness, because these methods rely on expert scoring to determine the weight [23–27]. The evaluation model of foreign trade development status constructed by BP neural network can reduce the influence of uncertain, multifactor, nonlinear, and other factors in the evaluation index, and can describe the complex nonlinear relationship existing in the evaluation index data, thereby improving the evaluation accuracy. However, the evaluation model also has shortcomings. First, neural networks often have overfitting problems. When used in actual predictions, the prediction accuracy of neural networks is not ideal; second, because the calculation process is a black box, the calculation results are often difficult to understand [28–33].


## 2. Image Preprocessing

Artificial neural network is usually abbreviated as neural network. Neural network has the ability of distributed parallel processing, can process massive data and noise data, and can self-organize and self-learn. It is used in pattern recognition, knowledge processing, sensor technology, control engineering, bioengineering, image processing, economic forecast analysis, artificial intelligence, and other fields. BP neural network belongs to feedforward neural network. The mathematical meaning of BP neural network is clear, the algorithm steps are clear, and it has good promotion ability. Its nonlinear mapping ability is superior to solving highly nonlinear problems. Therefore, it is widely used in stock market forecasting, securities forecasting, and foreign exchange forecasts, financial alarms, inventory demand forecasts, product cost pricing, gross national product forecasts, sales forecasts, real estate forecasts, risk forecasts, and other economic management areas of forecasting and decision-making issues. The prediction results made by BP neural network are reliable and credible. Therefore, this paper chooses BP neural network to establish a forecast model of foreign trade exports and solves the model empirically. In view of the shortcomings of previous studies, in order to effectively overcome the above shortcomings, the PSO-BP neural network evaluation model constructed in this paper, due to the optimization of the weights of the neural network, is faster than the pure BP neural network evaluation model. The result is also more accurate.(1)
Step function:(1)hσ=fσ=1,σ≥0,0,σ<0,whereσ is the variable.(2)
Quasi-linear function:(2)y=fσ=1,σ≥α,σ,0≤σ<α,0,σ<0,whereα is threshold.(3)
Sigmoid function:(3)fσ=11+e−σ.The sigmoid function is a commonly used function that uses the mode of this curve function to approximate various mathematical relationships.(4)
Hyperbolic tangent function:(4)fσ=1+thσi/σ02.The transfer function of the hidden layer in the BP neural network is a Gaussian function:(5)uix=exp−x−ciTx−ci2σi2.As the core of artificial intelligence disciplines, machine learning is the basis for making computers intelligent. It has interoperability and tolerance of disciplines and can organically integrate multiple types of theories. The principle of the PSO-BP neural network model is shown in Figure2. With reference to this figure, the data prediction method based on the improved PSO-BP neural network proposed in this article can be analyzed. The method includes the following steps:(1)
BP neural network model construction, the process is as follows:In this paper, we use several consecutive data obtained from previous years to predict the next data, compare the predicted data with previous years, and determine whether this data is a “bad point” in the data. Therefore, the number of nodes in the input layer depends on the actual situation, and the number of nodes in the output layer is 1. The neural network model is(6)Tout=fTin1,Tin2,…,Tinn,whereTout is the data value that the neural network needs to predict and Tin1-Tinn are the n data values input to the input layer of the neural network.The next step is hidden nodes. Use formula (7) to determine the selection. The evaluated amplitude is shown in Figure 3.(7)p=n+q+a,wheren is the number of input layer nodes, q is the number of output layer nodes, and a is a constant between 1 and 10. The basic structure formula of the BP neural network model is shown below:(8)Y=SigmoidW2SigmoidW1X−O1−O2,whereX is the input matrix; Y is the output matrix; W and w are the connection weight matrices; and O1 and O2 are the threshold matrix.Then,(9)fx=11+e−x.(2)
Use the improved particle swarm algorithm to optimize the construction of the BP neural network model, the process is as follows.The main content is to use algorithms to enable the machine to have a certain simulation ability, to independently complete some behaviors that only humans can complete before, to establish its own knowledge structure and skill system, and to update and improve its knowledge structure in real time. Particle swarm algorithm particle speed improvement. The particle speed adjustment formula is(10)vidk+1=wvidk+c1r1pid−zidk+c2r2pgd−zidk+c3r3zidk,wherez is the k-th generation position vector of the particle that needs speed adjustment; c is the learning factor; r is a random number between [0, 1]; Inertia weight w is used to adjust the influence degree of the particle’s previous velocity on the current velocity is derived from the quadratic function fitting, and the following weight adjustment formula is proposed:(11)w=wmax−wminkkmax2−kkmax+wmax,wherew is the initial inertia weight win is the final inertia weight k is the maximum number of iterations k is the current number of iterations. Determine the particle dimension in the particle swarm algorithm. Determine the connection weight in the BP neural network according to the determined BP neural network prediction model the total number of values and domain values, the total number of connection weights, and threshold formulas:(12)d=np+pq+p+q,whered is the total number of connection weights and thresholds, n is the number of input layer nodes, p is the number of hidden layer nodes, and q is the number of output layer nodes. The evaluated data are shown in Figure 4.Figure 2
PSO-BP neural network.Figure 3
Amplitude.Figure 4
Evaluated data.As one of the most important technologies of artificial intelligence, it is the basis for the realization of mechanical intelligence. Generally speaking, machine learning is mainly used to summarize and integrate information, which is then deduced by artificial intelligence. Improve the particle swarm algorithm to optimize the implementation of the BP neural network. By adjusting the particle speed and position, the connection weight and or value of the BP neural network are continuously updated to make the total error of the BP neural network less than the set value or the number of iterations. The process is as follows: the threshold and weight of the BP neural network determine the particle dimension and generate the initial particle swarm; the fitness valuef is calculated by the fitness degree:(13)f=1n∑j=1n∑k=1myk−tk2.Then according to the principle that the fitness valuef is less than the set value or the number of iterations is reached, all individuals in each generation of the particle swarm are evaluated, and the current optimal position p is found from it and then compared with the obtained optimal position p to generate a new p. After many generations, until the global optimal position Pg is found; determine the initial connection weight and threshold of the BP neural network according to p; train the BP neural network to obtain the final BP neural network prediction model: the training ends here. The prediction is shown in Figure 5.Figure 5
Prediction.


## 3. Forecast of Chemical Export Trade Based on PSO-BP Neural Network Model

Export trade is affected by various domestic and international factors, and has the characteristics of time-varying, complexity, randomness, and regionality. The export trade of each region has different characteristics and influence indicators because of its own environment and conditions. Factors affecting export trade can be divided into domestic and international factors according to different classification standards; economic and political factors, conventional and unexpected factors and other classification factors. In their research paper, Wang Zhenquan et al. divided the main factors affecting my country’s foreign trade exports into four categories of 53 variables according to the country, trading partners and competitors, but did not specify the 53 variables. In their research, Lu Zhongyuan and others believed that international market demand is the basis of export growth, and technological progress, price advantage and trade policy are important factors to promote export growth. In their research, Xu Helian and others directly selected 10 influencing factors, such as the investment in fixed assets of the whole society, total consumption, exchange rate, and foreign direct investment, as independent variables to analyze the national export trade. In her research, Yao Lifang divided the factors affecting China’s foreign trade import and export into 11 indicators in 5 categories: domestic environmental factors, direct action factors, external environmental factors, trade conditions factors and basic preparation factors. In the existing research, the main research is on the impact index of my country’s foreign trade import and export, and there is no comprehensive and systematic index system that affects the export trade system. With the development of the economy and my country’s entry into the WTO, the international and domestic situation has changed. Therefore, Chinese export trade system has new characteristics, and the impact indicators of export trade have also changed. Export trade has different impact indicators because of its own characteristics. Aiming at the special geographical environment, congenital conditions and preferential policy environment of China’s export trade system, this paper divides the macro factors affecting the export trade volume into five categories: national macroeconomic factors, regional economic factors, regional natural conditions, policy factors, and international economic factors. Among them, the national macroeconomic factors mainly include the national economic growth of the country and other regions, the export trade volume of the country and other regions, the consumption index and household savings of the country and other regions, and the industrial production index of the country and other regions.Since 1950, countries around the world have started to develop artificial intelligence machines. When programs have certain judgment standards and systems, they can be used to replace human resources in certain situations, which is what we call AI today (artificial intelligence) and cognitive computing. By 1980, after everyone had a general understanding of the definition of artificial intelligence, this milestone attempt was stopped due to the limitations of technological development. Today, with the rapid development of high and new technology, the continuous innovation of mechanical components, and the cutting-edge research of computer science, many emerging technologies can be integrated into a single mechanical entity to realize the upgrading of hardware equipment. Due to the continuous innovation of computer technology and the integration of multidisciplinary and multifield technologies, we can see applications of deep learning everywhere in our daily lives, such as face recognition and recommendation systems. Artificial intelligence is considered to be a “discipline about knowledge” due to its comprehensiveness of disciplines, and due to its integration of high-precision technology, it is considered to be used to realize intelligent activities that replace humans with machines, which also represents relevant the center and core idea of the field. That is, through the frame-by-frame study of human motion trajectories, many commands are given to the machine, and even the machine’s own knowledge system is cultivated to replace humans in handling some behaviors/businesses. The research content is mainly to control the machine through code to imitate and learn the characteristics of humans. The act of consciousness conducts learning and knowledge theory and operation. Figure6 shows the amplitude and magnitude.Figure 6
Amplitude and magnitude.After preprocessing the original data, the next step is to determine the parameters of the empirical prediction model, that is, to determine the network topology of the BP model. The steps of empirical prediction are as follows: ① preprocess the data; ② determine the model parameters, ③ select prediction tools, learn and train the network; ④ adjust the network parameters and determine the final network structure; ⑤ simulation prediction; and ⑥ analysis of the prediction results. This paper uses linear functions to standardize the preprocessing of the data, configures the topology of the network according to the principle of practicality and simplicity, and determines the number of hidden layers of the model. Then the learning samples are substituted into the network for repeated learning and training, the network structure is adjusted according to the results of the experiment, and the optimal network is selected as the network structure of the final prediction model. Finally, the optimal network obtained by the test is used for the prediction of all data, the prediction result is obtained, and the prediction result is analyzed.The purpose of data preprocessing is to standardize and standardize data, unify measurement standards, and improve model prediction accuracy. The power analysis is shown in Figure7.Figure 7
Power analysis.Research has proved that any continuous function can establish an arbitrary mapping relationship with a BP neural network containing an S-type hidden layer and a linear output layer. In this paper, when multiple hidden layers are added during the experiment, the performance of the network is not significantly improved. Therefore, a single hidden layer BP feedforward neural network prediction model is established, which is also called a three-layer BP network model. Reveal the regularity of the sample, but the number of neurons in the hidden layer is too large, and the irregular information in the sample such as noise may be learned and stored, resulting in the problem of “overfitting.” Therefore, on the premise of meeting the accuracy requirements, the hidden layer should choose the smallest possible number of neuron nodes.After determining the parameters of the model, the specific algorithm of the model needs to be designed. Neural network model as the number of neurons increases, the mathematical operation process to solve the problem becomes more complicated, which is usually completed with the aid of a computer. At present, many companies, research units and even individuals in the world have researched and designed neural network tool model libraries, which are applied to various neural network models and corresponding operations. The neural network toolbox (ANN) under the Matlab environment is one of the representative ones. The selection of the number of hidden layers should adopt practical and concise configuration principles. When the actual problem can be solved, the scale of the network should be reduced as much as possible, and the complexity of the system should be reduced.Aiming at the specific background of China’s chemical export trade, this article summarizes the special characteristics of export trade, and establishes two BP neural network forecasting models. One is an export trade forecast model under the influence of multiple factors, and the other is a single time series of export trade volume. Forecast model. And make empirical predictions on the established model. The data for empirical predictions are historical data from 1987 to 2004. Finally, the prediction results of these two prediction models and the prediction results of traditional prediction models are compared, which shows that the export trade volume prediction based on neural network has higher prediction accuracy and is more in line with the development trend of actual data. The forecast results also show that the forecast accuracy of the export trade volume forecast model based on a single time series is higher than the forecast accuracy of the export trade volume forecast model based on multiple factors. The reason is that the multifactor forecast cannot cover all the qualitative and quantitative factors that affect the export trade volume, thereby reducing the prediction accuracy of the model; and the single time series of the export trade volume is the result of all the influencing factors, so the accuracy of the single time series forecast is better. high. However, the prediction of a single time series may also use sudden and irregular interference factors as the law of the data and store it in the connection weight matrix through learning and training, resulting in the distortion of the model, and the economic significance of the single time series prediction model is explained. The two forecasting models of multifactor forecasting and single time series have their own advantages and disadvantages. In actual forecasting applications, they can be used in combination.The results show that the special fluctuations in export trade volume have caused serious distortions in traditional actual sequence forecasting methods such as exponential smoothing and moving average, and traditional linear regression forecasting methods have also suffered varying degrees of distortion. When the export trade volume data fluctuates, the three traditional linear forecasting methods of exponential smoothing forecasting, moving average forecasting and autoregressive forecasting cannot accurately fit the actual data trend of export trade volume, and there is a hidden layer. Because of its nonlinear mapping ability and fault tolerance, the BP neural network forecasting model has a better fitting effect, accurately fitting the actual development trend of export trade, and fully embodies the forecasting advantages. It should be pointed out that when the series of actual data shows a linear upward trend, the prediction effects of exponential smoothing prediction, moving average prediction and autoregressive prediction are significantly improved. For example, during the period from 1987 to 1992 and from 2002 to 2004, the two Within this period of time, the export trade volume series showed a linear upward trend, and the corresponding prediction results of exponential smoothing prediction, moving average prediction, and autoregressive prediction were also closer to the true value. That is, in the linear prediction process, the BP neural network did not have obvious results. Advantages, and in the nonlinear prediction process, the advantages of BP neural network have been fully utilized. The prediction results of the two BP neural network prediction models established in this paper are closer to the true value in each time period, the prediction error is within 4%, the prediction accuracy is high, and the degree of data fitting is significantly better than moving average prediction and exponential smoothing Prediction, autoregressive prediction. Comparing the prediction results of the BP neural network prediction model and the traditional linear prediction method, it shows that the prediction of the export trade volume based on the neural network has higher prediction accuracy and is more in line with the development trend of actual data. Moreover, the forecast accuracy of the export trade volume forecasting model based on a single time series is higher than the forecasting accuracy of the export trade volume forecasting model based on multiple factors. The reason is that the multifactor forecast cannot cover all the qualitative and quantitative factors that affect the export trade volume, thereby reducing the prediction accuracy of the model; and the time series of the export trade volume is the result of all factors, so the single time series forecast has a higher Accuracy. However, the prediction of a single time series may also use sudden and irregular interference factors as the law of the data and store it in the connection weight matrix through learning and training, resulting in the distortion of the model, and the economic significance of the single time series prediction model is explained. Not as clear as multifactor forecasting. The export trade volume forecast based on BP neural network is better than traditional linear forecasting methods. The forecast accuracy and data fitting effect of multifactor BP forecasting and single time series BP forecasting are significantly better than traditional linear forecasting methods, so this paper can be considered as established the export forecast model based on BP neural network conforms to the actual development trend of export trade volume, and the predicted result can be used as the forecast value of the relevant department’s estimated export trade volume.


## 4. Conclusion

The neural network is a nonlinear dynamic system, with strong nonlinear mapping ability, strong robustness, and fault tolerance. It has unique advanced advantages for solving nonlinear problems and is very suitable for solving nonlinear problems. Therefore, based on the PSO-BP neural network, this paper establishes a multifactor forecast model and a single time series forecast model for China’s chemical export trade volume and conducts an empirical forecast.(1)
The multifactor forecasting model of China’s export trade volume established in this paper takes into account the effects of GDP, total fixed asset investment, actual utilization of foreign capital, urban and rural residents’ savings, and exchange rate indicators on chemical export trade volume that are more concerned by relevant departments and researchers.(2)
The impact reflects the actual economic significance. The established single time series forecast model of chemical export trade volume uses past export trade data to describe the development law of export trade volume.(3)
Compared with the prediction results of traditional prediction methods, the prediction results of the prediction model in this paper have higher prediction accuracy and better fitting effect and are more in line with the development trend of the actual data of chemical export trade volume.



---

*Source: 1487746-2022-03-10.xml*