Abstract

Enterprise financial crisis prediction analysis can predict the business process of enterprises, so that enterprises can take corresponding strategies in time. The financial crisis prediction of listed companies can effectively reflect the business situation, so as to give investors reasonable investment advice. In order to supervise the sustainable management ability of enterprises efficiently and accurately, this paper proposed a financial crisis prediction method based on long-term and short-term memory neural network, so as to provide valuable information for decision-makers. Firstly, the data in the enterprise financial system is analyzed and extracted, and the original data is cleaned and dimensionalized by normalization and feature selection. Then, the long-term and short-term memory neural network is used to build the financial early warning model, and the wolf pack algorithm is used to optimize the initial weight and bias parameters, so as to improve the efficiency of parameter optimization. Finally, the financial data of 20 large- and medium-sized enterprises from 2019 to 2021 are verified and analyzed. The experimental results show that compared with other common machine learning methods, the constructed wolf pack-optimized long-term and short-term memory neural network has the highest prediction performance in terms of root mean square error and goodness of fit, with the goodness of fit reaching 94.2%.

1. Introduction

In an expanding global market, enterprises have more opportunities for growth but at the same time face more serious challenges and crises. At present, there are many cases of enterprises falling into difficulties due to financial crises. On the other hand, with the rapid development of information technology, databases, networks, data mining, and other technologies are becoming increasingly mature, making it possible to build an efficient financial forecasting system. In today’s era of big data, it has become an inevitable trend to maintain the survival of enterprises and social stability by accurately and objectively digging out the financial situation of enterprises from the vast amount of enterprise data.

However, the amount of enterprise financial data is huge, and it will change rapidly with time, which makes the analysis of enterprise financial data very difficult. In recent years, due to the wide use of big data platform, the method of solving complex problems through big data analysis technology has been deeply applied in enterprise financial analysis [15]. Financial analysis based on big data learning can complete the training and analysis of high-dimensional financial data and obtain effective training results. More importantly, the big data learning algorithm can not only solve the problem of timeliness of forecasting but also keep the relationship between historical time series (financial data) and current financial indicators, so as to obtain more accurate financial crisis forecasting results. In order to get a more accurate financial crisis prediction model, many researchers have done in-depth research on crisis prediction by using machine learning technology [6, 7]. However, up to now, there is still no general model that can predict the financial crisis well. However, in order to avoid huge economic losses and market shocks caused by frequent financial crises, the demand for reliable financial crisis prediction is increasingly urgent.

With the rise of deep learning technology, some scholars apply deep learning technology to financial crisis prediction and get better performance on test data sets than traditional neural networks. However, the advantages of this technology have not been fully explored by previous methods and models. Among the current depth models, the recurrent neural network (RNN) model based on long short-term memory (LSTM) [8, 9] is more suitable for the processing of financial-related data because it can effectively utilize the long-distance dependent information in serial data. Therefore, this paper tries to apply LSTM model to the field of financial crisis prediction and adopts swarm intelligence algorithm to optimize the bias parameters, so as to improve the efficiency of parameter optimization.

The current mainstream approach to financial crisis forecasting is to improve financial management systems to automate data analysis of finances through server-side records, statistics, and calculations in order to quickly obtain value data from the vast amount of financial information and make forecasts.

Machine learning technology, as a hot direction in the computer field, has been closely integrated and applied with the financial field. Using reasonable machine learning technology can solve the problem of efficient and automatic data analysis in financial industry and provide valuable forecast information for managers, thus providing reliable forecast for healthy organization operation. For example, Zhu et al. [10] proposed to use -score index decision tree to build a financial crisis prediction model, and the accuracy rate of predicting financial crisis three years in advance reached 75.37%. Ismanto et al. [11] proposed C4.5 decision tree mining algorithm to forecast and analyze the flow of enterprise’s operating capital, which is more accurate than the traditional ID3 decision tree algorithm. Yao et al. [12] proposed a financial crisis prediction model based on genetic algorithm and least squares support vector machine, which effectively verified the effectiveness of machine learning technology in financial prediction. However, using the traditional machine learning technology mentioned above to predict the financial situation still has unsatisfactory accuracy, especially for the long-term prediction of complex data samples [1315].

Long-term memory (LSTM) network, as a deep learning model, can dig out the inherent laws in time series data by learning historical data and is more suitable for processing software failure time data. At present, LSTM is mainly used in image recognition, natural language processing, and other fields. For example, Marcella et al. [16] proposed a remarkable attention model based on LSTM network, which can be used to predict the gaze direction of human eyes. Alhagry et al. [17] proposed an EEG emotion recognition model based on LSTM recurrent neural network. Kim H et al. [18] combined LSTM-RNN with computational fluid dynamics simulation to realize rapid and automatic tracking of harmful substances. The above research has shown that LSTM networks are temporally recurrent neural networks suitable for processing and predicting the internal patterns of time series data, which fits well with the characteristics of financial data.

Therefore, this paper attempts to use LSTM neural network to predict the financial crisis of enterprises. The main innovations and contributions include the following: (1) try to apply LSTM recurrent neural network architecture, which is excellent in the field of deep learning, to the field of financial crisis prediction, so as to make full use of LSTM’s advantages in dealing with historical time series. The time series data of enterprise financial history and the current input data samples are used as the input of activation operation to improve the prediction accuracy of enterprise financial crisis. (2) The wolf pack algorithm is used to optimize the initial weight and bias parameters of LSTM, so as to avoid falling into the local minimum, thus improving its crisis prediction performance.

3. Data Preprocessing and Sample Generation

In order to continue effective forecast analysis, it is necessary to analyze and extract all kinds of tables and report data in the financial system. The main method is to clean the data, so as to generate data in comma-separated values (CSV) format. This is because the use and format of data in the financial management system are quite different among departments. In addition, there are a lot of redundant data unrelated to financial forecast. Therefore, all the existing reports in the system must be cleaned before data analysis.

3.1. Data Cleaning

Aiming at the problems of missing values, inconsistent formats and repeated contents in financial data, this study adopts four processes to realize data cleaning, as follows:

Step 1: complete the missing values. According to the empirical analysis, the condition for judging whether there is a defect is set to 0.8, and the input financial data feature sequence is classified according to the condition of 0.8. And filter and keep the feature column with the condition less than 0.8. It should be noted that the missing value of the deletion sequence here needs to be filled with “0” value

Step 2: standardize the format. Standardize the format of the input financial data; for example, the format of the input time of each piece of data is changed to “2020-11-08”

Step 3: duplicate content deletion. After the end of step 2, the data is screened for the second time. The purpose of this screening is to eliminate the feature columns with duplicate contents [1820]. It should be noted that one feature column must be kept when eliminating multiple duplicate feature columns in the process, so as to avoid excessive deletion

Step 4: delete unnecessary data: Delete the data characteristic columns in the data sample that are not in the financial forecast cycle, thus greatly reducing the data scale to be processed

Finally, comma is used to separate the processed data by a fixed length, so as to form text data. This method is beneficial to data dimensionality reduction.

3.2. Feature Selection

The features of each column in the data samples need to be reasonably selected, so as to reflect the required prediction mapping and avoid overfitting, thus strengthening the generalization ability of the model with multiple samples.

As the financial forecasting task is a nonlinear application problem, this study tries to use L1 norm regularization which performs well in nonlinear problems to complete feature selection. Firstly, the L1 norm score value of the feature sequence after data cleaning is calculated. Then, the threshold of fitness is set to 0.6, that is to say, the features whose score value is less than 0.6 are filtered out, thus further promoting data dimensionality reduction. Finally, only the key information related to financial business is left in the filtered feature sequence.

3.3. Normalization Treatment

After cleaning and feature selection, the financial data has been effectively dimension-reduced, but the data features still have different value ranges, so the subsequent model prediction cannot be carried out. Therefore, in this study, the samples after cleaning and feature selection are normalized by a simple and quick mean variance normalization method, and the specific calculation formula is as follows: where represents the lower bound, represents the upper bound, represents the input eigenvalue, and represents the normalized eigenvalue.

3.4. Sliding Sample Generation

As financial forecasting is a time-periodic work, it is necessary to set the time span, which is similar to the window frame in graphic image processing mechanism. In this paper, one year is set as the time span to select the data samples by sliding. Too short or too long time span will have certain influence on the prediction performance. One year is the selected value from many experiments. The specific operation process is shown in Figure 1.

4. Financial Crisis Prediction Based on LSTM

4.1. Structure of LSTM Neural Network

The LSTM neural network structure is based on the recurrent neural network (RNN) structure [2123], which is shown in Figure 2.

U, V, and W in Figure 2 are the connection weights of neurons in each layer. As can be seen from Figure 2, the output at time is related to the hidden layer output at time and and the input at current time . The output at each time takes into account the influence of historical time series. The LSTM neural network is generated by improving the recurrent neural network. Compared with RNN, LSTM neural network is more complex in cyclic operation, and it introduces memory nodes and related operations of forgetting gate, as shown in Figure 3.

In Figure 3, represents sigmoid function. and represent hidden layer output and memory node values at time , respectively. and represent hidden layer output and memory node output values at time , respectively.

The expression of forget gate is as follows: where and represent the forget gate weight matrix and bias, respectively.

The expression of the input gate is as follows: where and , respectively, represent the weight and offset of the input gate.

The candidate memory value of the memory node is represented as follows [24]: where and are the weights and offsets of memory nodes, respectively.

Use the result of the forgetting gate at the last moment and the sum of the candidate memory nodes to obtain a new memory node . The expression method is as follows:

The expression of the output gate is as follows: where and are the weight and offset of output gate, respectively.

Then, the propagation method is optimized according to the wolf pack algorithm, and the weights and offsets are continuously optimized to obtain a stable LSTM neural network model.

4.2. Wolf Pack Optimization of Weight Parameters

In order to reduce the output error of LSTM neural network model, the traditional method mainly uses gradient decreasing method to iterate the initial weight and offset parameters for many times, so as to find the best network architecture. However, the traditional method is easy to fall into the local minimum, which leads to the fact that the accuracy and work efficiency cannot meet the actual requirements.

In order to solve the above problems, this study proposes to adopt the wolf pack algorithm [25] in swarm intelligence algorithm to effectively improve the efficiency of bias parameter optimization. Assume that the average value of the estimation error of personal medical expenses is expressed as follows: where represents the prediction error of the -th financial index.

For the financial forecasting model, the required fitness function should be the reciprocal of the mean of each financial index (). Let represent the number of offset parameters in the prediction model, represent the total number of wolves, and represent the coordinate set of other wolves except the head wolf.

wolves are randomly selected as leaders in set ; then, the migration process of leaders is as follows: where is the direction of migration and is the weight value. , and .

According to the leader’s direction, the migration process of other wolves is as follows: where is the distance between the -th wolf and the head wolf and . . where is the distance weight. The distance is the basis for wolves to judge whether prey has entered the siege range.

Finally, all wolves began to gather towards the target, and the migration process was as follows: where represents a random constant, and the range of values is . .

Finally, if meets the error threshold of the financial prediction model, and meet the constraint conditions, the wolf pack optimization process is stopped.

4.3. Process of Financial Crisis Prediction

According to the enterprise financial index data, obtain the enterprise financial crisis forecast sample. Firstly, the sample of enterprise financial crisis prediction is initialized by noise reduction, and then, the enterprise financial crisis prediction model is obtained by training wolf pack-optimized LSTM neural network. The specific process is shown in Figure 4.

5. Experimental Results and Analysis

5.1. Experimental Setup

In order to analyze and verify the financial crisis prediction method proposed in this paper, a concrete experiment was carried out. The experimental hardware environment is as follows: the processor is Intel Core i7 2.2GHz, the graphics and image processing equipment is GTX970@2G memory, and the memory is 8 G. The experimental software environment is Windows 7 operating system and Matlab7.0 simulation software.

The data set used in the experiment is the real operations of 20 companies for 3 years (2019-2021). The selected 20 enterprises are from manufacturing, financial, and service industries. The financial data of 2019 and 2020 are selected as training samples, and the data of 2021 is selected as testing samples. By comparing the predicted value with the actual financial value in 2021, the accuracy of the financial crisis prediction method is verified. The parameters of LSTM neural network are set as follows: the time step is 12, the latitude of each time cloth is 4, the weights and offsets of memory nodes are 0.3 and 0.1, respectively, and the weights and offsets of the three gate are all 0.2.

5.2. Evaluation Indicators

In order to quantitatively evaluate the performance of financial forecast, this paper selects root mean square error (RMSE) and goodness of fit () as evaluation indicators [26].

RMSE is calculated as follows: where it represents the predicted value and the actual value.

The calculation method of is as follows: where the value range of is [0,1]. A smaller RMSE and a larger indicate better model prediction results.

5.3. Analysis of the Best Layers of the Model

The comparison of predicted performance under different network layers is shown in Table 1.

As can be seen from Table 1, with the increase of layers, the prediction performance of test set gradually improves. When the number of layers is 3, it is the best, is 98.57%, and RMSE is 1.012e-6. When the number of layers is 4, it begins to decrease again. Therefore, the optimal number of layers is set to 3, and the number of layers of LSTM neural network is set to 3 in subsequent experiments.

5.4. Forecast Performance of Asset-Liability Ratio and Gross Profit Margin of Sales

The realization of financial forecast is mainly based on historical financial data. The financial operation of an enterprise can be judged by the prediction results of important financial indicators. This paper chooses to compare two important indicators of corporate finance in 2021: (1) asset-liability ratio and (2) gross profit margin of sales, and the forecast results are shown in Figures 5 and 6, respectively.

From Figures 5 and 6, it can be seen that the prediction performance of LSTM neural network optimized by wolf pack on the test data set is better for the asset-liability ratio and gross profit margin. It is found that the prediction effect of asset-liability ratio is better than that of sales gross profit margin. In the asset-liability ratio forecast of Figure 5, the deviations of asset-liability ratio forecast of enterprises No. 5, No. 10, and No. 11 are obvious, and the errors of other enterprises are small. On the other hand, in the gross profit margin forecast of Figure 6, the deviation between the forecast and the actual situation is very small.

In the forecasting model, the asset-liability ratio and sales gross profit margin threshold can be set separately. In this paper, the asset-liability ratio threshold is set to 1.0, and the sales gross profit margin threshold is set to 0.2. According to the prediction results and threshold setting of LSTM neural network optimized by wolves, the warning tips of crisis are given. For example, enterprises with asset-liability ratio greater than 1.0 should pay attention to debt crisis, while enterprises with gross profit margin lower than 0.2 should pay attention to market competition crisis and need to increase product R&D investment to improve product competitiveness.

5.5. Comparison of Prediction Accuracy

Next, the wolf pack optimization LSTM neural network is used to test the financial samples of 20 listed enterprises in 2021. Ten indicators such as property right ratio, business growth rate, asset-liability ratio, and sales gross profit margin are selected as the prediction targets, and the corresponding thresholds are set for early warning. The predicted value exceeds or falls below a set threshold; i.e., a crisis is determined to exist. Enterprise financial crisis prediction results are shown in Table 2.

Table 2 shows that the lowest and highest prediction accuracy rates of wolves optimizing LSTM neural network are 85.71% and 100%, respectively. Although the prediction performance of the 13-th enterprise was the worst, from the perspective of RMSE, the enterprise financial crisis prediction stability of wolf pack optimization LSTM neural network was high.

5.6. Prediction Accuracy Performance of Different Algorithms

In order to further verify the performance of wolf pack optimization LSTM neural network in the financial crisis prediction of large-scale enterprises, SVM [27], convolutional neural network (CNN) [28], and LSTM neural network [29] were used to predict the financial crisis with 417 alarm data from 300 enterprises, and the results are shown in Figure 7.

As shown in Figure 7, the wolf pack-optimized LSTM neural network had the highest prediction accuracy, LSTM neural network took second place, and SVM was the worst. Compared with other models, the wolf pack optimization LSTM neural network has the largest (94.2%) result, which shows that it has obtained the best prediction result, which is completely consistent with the business development trend of the enterprise.

6. Conclusions

This paper presents a financial crisis prediction method based on wolf pack optimization LSTM neural network. The pretreated financial data were trained using LSTM neural network, and the historical financial data were forgotten and filtered using the forgetting gate and the memory node, so that part of the retained data was substituted into the next neural network training. The optimal initial weights and bias parameters were obtained by the wolf pack optimization algorithm. Taking the accuracy of enterprise financial risk early warning as the fitness function, a stable enterprise financial crisis prediction model is obtained. The proposed method has achieved good prediction results on various evaluation criteria and verified its feasibility. However, the number (dimension) of features in the training and test sample sets is still large, and more efficient dimension reduction using principal component analysis will be considered in the future to further improve the performance of the prediction model.

Data Availability

The experimental data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest to report regarding the present study.

Acknowledgments

This work supported by the Humanities and Social Science research project of Chongqing Education Commission, “Study on the evaluation system and control path of the formation mechanism of Education cost in Local Colleges and universities in Chongqing,” 17SKG216.