# E-Commerce Enterprises Financial Risk Prediction Based on FA-PSO-LSTM Neural Network Deep Learning Model

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

#### 2.1. Traditional Variable Determination Model

#### 2.2. Machine Learning Model

#### 2.3. Deep Learning Model

## 3. Theoretical Overview

#### 3.1. Factor Analysis

#### 3.2. Particle Swarm Optimization

_{1}, X

_{2}, …, X

_{m}) of m particles in the D-dimensional search space. The velocity of the i-th particle is V

_{i}= [V

_{i}

_{1}, V

_{i}

_{2}, …, V

_{iD}] and the position X

_{i}= [X

_{i}

_{1}, X

_{i}

_{2}, …, X

_{iD}], i = 1, 2, …, m. Record the best position P

_{ibest}= [P

_{i}

_{1}, P

_{i}

_{2}, …, P

_{iD}] searched by the i-th particle and the best position G

_{best}= [G

_{1}, G

_{2}, …, G

_{D}] searched by all particles in the population. The i-th particle updates its flight speed and position iteratively precisely by tracking the individual pole position and the global pole position, and its iterative Equations (5) and (6):

_{max}, X

_{max}], [−V

_{max}, V

_{max}].

#### 3.3. Long Short-Term Memory Neural Network

## 4. Data Preprocessing

#### 4.1. Experimental Environment and Data Sources

#### 4.2. Factor Analysis

#### 4.3. Determine the Dependent and Independent Variables

## 5. Predictive Model

#### 5.1. Experimental Idea

#### 5.2. Model Parameters Setting

## 6. Experiment and Analysis

#### 6.1. Evaluation Indicators

^{2}), Mean Square Error (MSE), Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE), which are calculated as shown in Table 5.

#### 6.2. Analysis of the Optimal Number of Layers of the Model

#### 6.3. Comparison of Intelligent Optimization Algorithms

_{1}is set at 0.5, the whole acceleration factor C

_{2}is set at 0.5, and the inertia weight ω is set at 0.5. The number of hidden layer neurons and the learning rate in the LSTM neural network are optimized using the PSO with the set parameters, and the variation of the fitness value (minimum) in the process of finding the global optimal solution is shown in Figure 6.

#### 6.4. Comparison of Prediction Performance of Different Algorithms

#### 6.5. Experimental Forecast of Debt Assets Ratio for the Next Four Quarters

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Li, R.; Sun, T. Assessing factors for designing a successful B2C E-Commerce website using fuzzy AHP and TOPSIS-Grey methodology. Symmetry
**2020**, 12, 363. [Google Scholar] [CrossRef][Green Version] - Simjanović, D.J.; Zdravković, N.; Vesić, N.O. On the Factors of Successful e-Commerce Platform Design during and after COVID-19 Pandemic Using Extended Fuzzy AHP Method. Axioms
**2022**, 11, 105. [Google Scholar] [CrossRef] - Gao, J. Analysis of enterprise financial accounting information management from the perspective of big data. Int. J. Sci. Res.
**2022**, 11, 1272–1276. [Google Scholar] [CrossRef] - Pouyanfar, S.; Sadiq, S.; Yan, Y.; Tian, H.; Tao, Y.; Reyes, M.P.; Shyu, M.-L.; Chen, S.-C.; Iyengar, S.S. A survey on deep learning: Algorithms, techniques, and applications. ACM Comput. Surv.
**2018**, 51, 1–36. [Google Scholar] [CrossRef] - Ul Hassan, E.; Zainuddin, Z.; Nordin, S. A review of financial distress prediction models: Logistic regression and multivariate discriminant analysis. Indian-Pac. J. Account. Financ.
**2017**, 1, 13–23. [Google Scholar] [CrossRef] - Nobre, J.; Neves, R.F. Combining principal component analysis, discrete wavelet transform and XGBoost to trade in the financial markets. Expert Syst. Appl.
**2019**, 125, 181–194. [Google Scholar] [CrossRef] - Huang, X.; Zhang, C.Z.; Yuan, J. Predicting extreme financial risks on imbalanced dataset: A combined kernel FCM and kernel SMOTE based SVM classifier. Comput. Econ.
**2020**, 56, 187–216. [Google Scholar] [CrossRef] - Zhu, W.; Zhang, T.; Wu, Y.; Li, S.; Li, Z. Research on optimization of an enterprise financial risk early warning method based on the DS-RF model. Int. Rev. Financ. Anal.
**2022**, 81, 102140. [Google Scholar] [CrossRef] - Agarap, A.F. Statistical analysis on E-commerce reviews, with sentiment classification using bidirectional recurrent neural network (RNN). arXiv
**2018**, arXiv:1805.03687. [Google Scholar] - Xu, Y.-Z.; Zhang, J.-L.; Hua, Y.; Wang, L.-Y. Dynamic credit risk evaluation method for e-commerce sellers based on a hybrid artificial intelligence model. Sustainability
**2019**, 11, 5521. [Google Scholar] [CrossRef][Green Version] - Teng, S. Route planning method for cross-border e-commerce logistics of agricultural products based on recurrent neural network. Soft Comput.
**2021**, 25, 12107–12116. [Google Scholar] [CrossRef] - Li, Q.; Li, X.; Lee, B.; Kim, J. A hybrid CNN-based review helpfulness filtering model for improving e-commerce recommendation Service. Appl. Sci.
**2021**, 11, 8613. [Google Scholar] [CrossRef] - Fitzpatrick, P.J. A Comparison of Ratios of Successful Industrial Enterprises with Those of Fialedfirms; The Accountants Publishing Co.: Washington, DC, USA, 1932; pp. 589–605. [Google Scholar]
- Beaver, W.H. Financial ratios as predictors of failure. J. Account. Res.
**1966**, 4, 71–111. [Google Scholar] [CrossRef] - Altman, E.I. Financial Ratios, Discriminant Analysis and the Prediction of Corporate Bankruptcy. J. Financ.
**1968**, 23, 589–609. [Google Scholar] [CrossRef] - Martin, D. Early warning of bank failure: A logit regression approach. J. Bank. Financ.
**1977**, 1, 249–276. [Google Scholar] [CrossRef] - Vapnik, V. The Nature of Statistical Learning Theory; Springer Science & Business Media: New York, NY, USA, 1999. [Google Scholar]
- Min, J.H.; Lee, Y.C. Bankruptcy prediction using support vector machine with optimal choice of kernel function parameters. Expert Syst. Appl.
**2005**, 28, 603–614. [Google Scholar] [CrossRef] - Halteh, K.; Kumar, K.; Gepp, A. Financial distress prediction of Islamic banks using tree-based stochastic techniques. Manag. Financ.
**2018**, 44, 759–773. [Google Scholar] [CrossRef][Green Version] - Yao, J.; Pan, Y.; Yang, S.; Chen, Y.; Li, Y. Detecting Fraudulent Financial Statements for the Sustainable Development of the Socio-Economy in China: A Multi-Analytic Approach. Sustainability
**2019**, 11, 1579. [Google Scholar] [CrossRef][Green Version] - Siami-Namini, S.; Namin, A.S. Forecasting economics and financial time series: ARIMA vs. LSTM. arXiv
**2018**, arXiv:1803.06386. [Google Scholar] - Cao, J.; Li, Z.; Li, J. Financial time series forecasting model based on CEEMDAN and LSTM. Phys. A Stat. Mech. Its Appl.
**2019**, 519, 127–139. [Google Scholar] [CrossRef] - Kamara, A.F.; Chen, E.; Liu, Q.; Zhen, P. A hybrid neural network for predicting Days on Market a measure of liquidity in real estate industry. Knowl. Based Syst.
**2020**, 208, 106417. [Google Scholar] [CrossRef] - Jang, Y.; Jeong, I.; Cho, Y.K. Business Failure Prediction of Construction Contractors Using a LSTM RNN with Accounting, Construction Market, and Macroeconomic Variables. J. Manag. Eng.
**2020**, 36, 04019039. [Google Scholar] [CrossRef] - Ling, T.; Cai, Y. Financial Crisis Prediction Based on Long-Term and Short-Term Memory Neural Network. Wirel. Commun. Mob. Comput.
**2022**, 2022, 5728470. [Google Scholar] [CrossRef] - Lei, Y.; Li, Y. Construction and Simulation of the Market Risk Early-Warning Model Based on Deep Learning Methods. Sci. Program.
**2022**, 2022, 4733220. [Google Scholar] [CrossRef] - Brown, T.A. Confirmatory Factor Analysis for Applied Research; Guilford Publications: New York, NY, USA, 2015. [Google Scholar]
- Shrestha, N. Factor analysis as a tool for survey analysis. Am. J. Appl. Math. Stat.
**2021**, 9, 4–11. [Google Scholar] [CrossRef] - Banks, A.; Vincent, J.; Anyakoha, C. A review of particle swarm optimization. Part I: Background and development. Nat. Comput.
**2007**, 6, 467–484. [Google Scholar] [CrossRef] - Jain, N.K.; Nangia, U.; Jain, J. A review of particle swarm optimization. J. Inst. Eng. Ser. B
**2018**, 99, 407–411. [Google Scholar] [CrossRef] - Staudemeyer, R.C.; Morris, E.R. Understanding LSTM--a tutorial into long short-term memory recurrent neural networks. arXiv
**2019**, arXiv:1909.09586. [Google Scholar] - Yu, Y.; Si, X.; Hu, C.; Zhang, J. A review of recurrent neural networks: LSTM cells and network architectures. Neural Comput.
**2019**, 31, 1235–1270. [Google Scholar] [CrossRef] - Smagulova, K.; James, A.P. A survey on LSTM memristive neural network architectures and applications. Eur. Phys. J. Spec. Top.
**2019**, 228, 2313–2324. [Google Scholar] [CrossRef] - Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. Pytorch: An imperative style, high-performance deep learning library. Adv. Neural Inf. Process. Syst.
**2019**, 32, 1–12. [Google Scholar] [CrossRef] - He, Y.; Xu, X.; Cai, Y. An evaluation of the effectiveness of three early-warning models on financial indexes. Appl. Econ. Lett.
**2022**, 29, 1880–1884. [Google Scholar] [CrossRef] - Wang, Z. A Study on Early Warning of Financial Indicators of Listed Companies Based on Random Forest. Discret. Dyn. Nat. Soc.
**2022**, 2022, 1314798. [Google Scholar] [CrossRef] - Singh, D.; Singh, B. Investigating the impact of data normalization on classification performance. Appl. Soft Comput.
**2020**, 97, 105524. [Google Scholar] [CrossRef] - Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Comput. Sci.
**2021**, 7, e623. [Google Scholar] [CrossRef] - Cao, Y.; Shao, Y.; Zhang, H. Study on early warning of E-commerce enterprise financial risk based on deep learning algorithm. Electron. Commer. Res.
**2022**, 22, 21–36. [Google Scholar] [CrossRef] - Kachitvichyanukul, V. Comparison of Three Evolutionary Algorithms: GA, PSO, and DE. Ind. Eng. Manag. Syst.
**2012**, 11, 215–223. [Google Scholar] [CrossRef][Green Version] - Qiu, Y.Y.; Zhang, Q.; Lei, M. Forecasting the railway freight volume in China based on combined PSO-LSTM model. J. Phys. Conf. Series
**2020**, 1651, 012029. [Google Scholar] [CrossRef] - Suddle, M.K.; Bashir, M. Metaheuristics based long short term memory optimization for sentiment analysis. Appl. Soft Comput.
**2022**, 131, 109794. [Google Scholar] [CrossRef] - Zhang, Y.; Yang, S. Prediction on the highest price of the stock based on PSO-LSTM neural network. In Proceedings of the2019 3rd International Conference on Electronic Information Technology and Computer Engineering (EITCE), Xiamen, China, 18–20 October 2019; pp. 1565–1569. [Google Scholar]
- Ji, Y.; Liew AW, C.; Yang, L. A novel improved particle swarm optimization with long-short term memory hybrid model for stock indices forecast. IEEE Access
**2021**, 9, 23660–23671. [Google Scholar] [CrossRef]

Indicators | Symbol | Sd | Mean | Max | Min |
---|---|---|---|---|---|

Debt Assets Ratio | X_{1} | 0.1742 | 0.3483 | 0.8859 | 0.0404 |

Current Ratio | X_{2} | 4.3657 | 3.7387 | 39.5532 | 0.4862 |

Quick Ratio | X_{3} | 4.3657 | 3.3728 | 39.5525 | 0.3080 |

Cash to Current Ratio | X_{4} | 3.5961 | 1.8316 | 33.4801 | 0.0087 |

Receivables Turnover Ratio | X_{5} | 15.5147 | 9.2308 | 109.8722 | 0.0080 |

Current Asset Turnover Ratio | X_{6} | 0.7355 | 0.8360 | 4.8895 | 0.0017 |

Total Asset Turnover Ratio | X_{7} | 0.5540 | 0.5344 | 4.3719 | 0.0002 |

Return On Assets | X_{8} | 0.0706 | 0.0390 | 0.5206 | −0.5511 |

Rate of Return on Common Stockholders’ Equity | X_{9} | 0.2073 | 0.0236 | 0.4777 | −3.1507 |

Operation Cash into Asset | X_{10} | 0.0638 | 0.0135 | 0.3295 | −0.1601 |

Total Assets Grow Ratio | X_{11} | 0.4132 | 0.1573 | 3.3908 | −0.6754 |

Growth Rate of Owner’s Equity | X_{12} | 0.5788 | 0.2047 | 4.4381 | −0.7756 |

Net Cash Flow from Operating Activities Per Share | X_{13} | 0.5748 | 0.1828 | 3.2749 | −1.5598 |

Registered Capital * | X_{14} | 80.2547 | 78.3284 | 245.4870 | 11.7500 |

KMO Measure of Sampling Adequacy | 0.646 | |

Bartlett’s Test of Sphericity | Approx. Chi-Square | 8063.462 |

df | 91 | |

Sig. | 0.000 |

Components | Initial Eigenvalue | Extraction of the Sum of Squares of Loads | ||||
---|---|---|---|---|---|---|

Total | Percentage of Variance | Accumulation (%) | Total | Percentage of Variance | Accumulation (%) | |

1 | 3.872 | 27.660 | 27.660 | 3.288 | 23.489 | 23.489 |

2 | 3.081 | 22.006 | 49.666 | 2.639 | 18.850 | 42.339 |

3 | 1.821 | 13.005 | 62.671 | 1.903 | 13.590 | 55.929 |

4 | 1.589 | 11.347 | 74.017 | 1.892 | 13.513 | 69.442 |

5 | 1.220 | 8.714 | 82.732 | 1.861 | 13.290 | 82.732 |

6 | 0.918 | 6.554 | 89.286 | |||

7 | 0.595 | 4.251 | 93.537 | |||

8 | 0.425 | 3.035 | 96.572 | |||

9 | 0.147 | 1.053 | 97.625 | |||

10 | 0.117 | 0.833 | 98.458 | |||

11 | 0.105 | 0.747 | 99.205 | |||

12 | 0.066 | 0.472 | 99.677 | |||

13 | 0.042 | 0.303 | 99.981 | |||

14 | 0.003 | 0.019 | 100.000 |

Parameter | Value | Parameter | Value |
---|---|---|---|

Number of LSTM layers | 1 | Number of neurons in the hidden layer | 32 |

Loss Function | MSE | Learning rate | 0.001 |

Optimizer | Adam | Epoch | 500 |

Evaluation Indicators | Calculation Formula |
---|---|

R^{2} | $1-\frac{{\sum}_{n=1}^{N}\left({y}_{n}-{\widehat{y}}_{n}\right)}{{\sum}_{n=1}^{N}\left({y}_{n}-\overline{y}\right)}$ |

MSE | $\frac{1}{N}{\sum}_{n=1}^{N}{\left({y}_{n}-{\widehat{y}}_{n}\right)}^{2}$ |

RMSE | ${\left(\frac{1}{N}{\sum}_{n=1}^{N}{\left({y}_{n}-{\widehat{y}}_{n}\right)}^{2}\right)}^{\frac{1}{2}}$ |

MAE | $\frac{1}{N}{\sum}_{n=1}^{N}\left|{y}_{n}-{\widehat{y}}_{n}\right|$ |

MAPE | $\frac{100\%}{N}{\sum}_{n=1}^{N}\left|\frac{{y}_{n}-{\widehat{y}}_{n}}{{y}_{n}}\right|$ |

^{2}values indicate better model fit; smaller MSE, RMSE, MAE, and MAPE values indicate that the model has better prediction accuracy.

Number of LSTM Layers | Type of Data Set | R2 (%) | MSE | MAE |
---|---|---|---|---|

1 | Train set | 99.8730% | 0.003447 | 0.041523 |

Test set | 0.010199 | 0.079564 | ||

2 | Train set | 99.9582% | 0.001133 | 0.022468 |

Test set | 0.010015 | 0.079308 | ||

3 | Train set | 99.9349% | 0.001766 | 0.029125 |

Test set | 0.011930 | 0.085097 | ||

4 | Train set | 99.9409% | 0.001604 | 0.028291 |

Test set | 0.014227 | 0.084467 |

Optimization Algorithm | Number of Neurons in the Hidden Layer | Learning Rate |
---|---|---|

PSO | 109 | 0.022 |

GA | 53 | 0.058 |

DE | 169 | 0.016 |

Model | Evaluation Indicators | Optimal Ranking | ||
---|---|---|---|---|

MSE | MAE | MAPE (%) | ||

FA-SVM | 0.03718 | 0.23474 | 19.482 | 5 |

FA-LSTM | 0.02825 | 0.13597 | 10.304 | 4 |

FA-PSO-RNN | 0.02425 | 0.11777 | 8.979 | 3 |

FA-PSO-GRU | 0.01875 | 0.10906 | 8.443 | 2 |

FA-PSO-LSTM | 0.00738 | 0.06283 | 4.887 | 1 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chen, X.; Long, Z. E-Commerce Enterprises Financial Risk Prediction Based on FA-PSO-LSTM Neural Network Deep Learning Model. *Sustainability* **2023**, *15*, 5882.
https://doi.org/10.3390/su15075882

**AMA Style**

Chen X, Long Z. E-Commerce Enterprises Financial Risk Prediction Based on FA-PSO-LSTM Neural Network Deep Learning Model. *Sustainability*. 2023; 15(7):5882.
https://doi.org/10.3390/su15075882

**Chicago/Turabian Style**

Chen, Xiangzhou, and Zhi Long. 2023. "E-Commerce Enterprises Financial Risk Prediction Based on FA-PSO-LSTM Neural Network Deep Learning Model" *Sustainability* 15, no. 7: 5882.
https://doi.org/10.3390/su15075882