# 基于Elman_Adaboost算法的财务预警器的设计The Design of the Financial Early Warning System Based on Elman-Adaboost

Abstract: In order to effectively overcome the limitations of traditional financial forecasting methods and further improve the accuracy of financial situation prediction, a financial combination forecasting method based on Adaboost algorithm and Elman neural network is proposed. This method makes full use of the dynamic characteristics of Elman network and Adaboost algorithm can improve the accuracy of weak predictors to improve the accuracy of prediction. Through the analysis of the financial data of a listed company, the results show that the method proposed in this paper is economical and effective, improves the prediction accuracy to a great extent, and can reflect the crisis state of financial data timely and reasonably.

1. 引言

2. Elman网络模型

Elman网络是一种动态神经网络，该网络相比较于BP网络是在其结构单元中引入了反馈环节，这样就对数据的处理具有了很强的时变性和实时性能力。也正是由于承接层中反馈通道的存在，使得Elman网络具有了很强的检测识别能力和记忆能力。这些特点都在很大程度上提升了系统的动态变化能力，可以更好预测动态数据，其预测性能要优于BP神经网络 [9]。Elman神经网络的结构一共有4层，分别包括输入层、隐含层、承接层和输出层。信号从输入层传入，隐含层使用的传递函数具有线性和非线性特点，除了传递数之外，隐含层的层数也能改变训练模型的精度，一般隐含层数量越多，精度也会相应提高，但是训练时间会变长。承接层主要就是起承接的作用，能将隐含层的输出再反馈给隐含层，能用来记忆上一时刻的数值，这样就使得Elman具有动态记忆特性。输出层线性函数可以起到线性加权的作用。其网络结构如图1所示。

Figure 1. Elman network structure

Elman网络学习过程以图1为例，Elman网络的非线性状态空间表达式为：

$y\left(k\right)=g\left({w}^{3}x\left(k\right)\right)$ (1)

$x\left(k\right)=f\left({w}^{1}{x}_{c}\left(k\right)+{w}^{2}\left(u\left(k-1\right)\right)\right)$ (2)

${x}_{c}\left(k\right)=x\left(k-1\right)$ (3)

Elman神经网络学习指标函数采用误差平方和函数，是通过误差的反向传递来逐步调整权值的。

$E\left(w\right)=\underset{k=1}{\overset{n}{\sum }}{\left({y}_{k}\left(w\right)-{\stackrel{˜}{y}}_{k}\left(w\right)\right)}^{\text{2}}$ (4)

Boost算法主要出自于PAC学习模型，PAC学习模型主要探索的就是到底哪些问题是可以通过学习得到改善的和解决这些问题的具体算法又是什么的问题。

${D}_{1}=\left({w}_{11},{w}_{12},\cdots ,{w}_{1i},\cdots ,{w}_{1N}\right),{w}_{1i}=\frac{1}{N},i=1,2,\cdots ,N$ (5)

${G}_{m}\left(x\right):\chi \to \left\{-1,+1\right\}$ (6)

${e}_{m}=P\left({G}_{m}\left({x}_{i}\right)\ne {y}_{i}\right)=\underset{i=1}{\overset{N}{\sum }}{w}_{mi}I\left({G}_{m}\left({x}_{i}\right)\ne {y}_{i}\right)$ (7)

${\chi }_{m}=\frac{1}{2}\mathrm{ln}\frac{1-{e}_{m}}{{e}_{m}}$ (8)

${D}_{m+1}=\left({w}_{m+1,1},{w}_{m+1,2},\cdots ,{w}_{m+1,i},\cdots ,{w}_{m+1,N}\right)$ (9)

${w}_{m+1,i}=\frac{{w}_{mi}}{{Z}_{m}}\mathrm{exp}\left(-{\partial }_{m}{y}_{i}{G}_{m}\left({x}_{i}\right)\right),i=1,2,\cdots ,N$ (10)

${Z}_{m}=\underset{i=1}{\overset{N}{\sum }}{w}_{mi}\mathrm{exp}\left(-{\alpha }_{m}{y}_{i}{G}_{m}\left({x}_{i}\right)\right)$ (11)

$f\left(x\right)=\underset{m=1}{\overset{M}{\sum }}{\alpha }_{m}{G}_{m}\left(x\right)$ (12)

$G\left(x\right)=sign\left(f\left(x\right)\right)=sign\left(\underset{m=1}{\overset{M}{\sum }}{\alpha }_{m}{G}_{m}\left(x\right)\right)$ (13)

${e}_{t}=\underset{i}{\sum }{D}_{i}\left(i\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}i=1,2,\cdots ,m\text{\hspace{0.17em}}\left(g\left(t\right)\ne y\right)$ (14)

${a}_{t}=\frac{1}{2}\mathrm{ln}\left(\frac{1-{e}_{t}}{{e}_{t}}\right)$ (15)

${D}_{t+1}\left(i\right)=\frac{{D}_{i}\left(i\right)}{{B}_{t}}\ast \mathrm{exp}\left[-{a}_{t}{y}_{i}{g}_{t}\left({x}_{i}\right)\right]$ (16)

$h\left(x\right)=sign\left[\underset{t=1}{\overset{T}{\sum }}{\alpha }_{t}\cdot f\left({g}_{t},{a}_{t}\right)\right]$(17)

5. 案例分析

5.1. 数据来源

Table 1. Partial raw data

5.2. 网络结构的选择

Figure 3. Elman Adaboost network training curve

Figure 4. Accuracy of strong predictor under different K and H

Table 2. Prediction accuracy

Figure 5. Comparison between forecast category and actual category

5.3. 与其它方法对比

BP神经网络在预测识别领域被广泛运用 [15]，也可以用来解决该公司财务预测问题，故同样可采用该方法在数据处理之后进行预测，最后得到最好的预测正确率为93.5%。Elman神经网络具有比BP神经网络更好的动态性能，所以用Elman神经网络对公司财务状况进行预测，最后得到最好的预测正确率为94.6%。同样的，也可以选取BP神经网络作为弱预测器，组合成BP_Adaboost算法的强预测器对该公司财务状况进行预测，根据上章节的选取方式，从中选择了隐含层H = [5 7 10 12 14]来训练网络，来寻找最优隐含层数目。为了选择最合适的弱预测器的个数，假设生成K个弱预测器，可以取K = [5 10 15 20]进行实验。最后经过实验可得：当H = 10，K = 10时，预测的平均最大预测率为96.0%。此方法预测错误的样本在预测类别与实际类别比较图的标记如图6所示。各种方法的预测平均正确率如表3所示。

Figure 6. Comparison between forecast category and actual category

Table 3. Prediction accuracy of each network algorithm

6. 结论

[1] Mehedi, M., Shujat, A., Ouyang, Q., Chen, Q.S., Wu, X.Y., Xu, Z.L., et al. (2019) Rapid Quantitative Analysis of Hg2+ Residue in Dairy Products Using SERS Coupled with ACO-BP-AdaBoost Algorithm. Spectrochimica Acta. Part A, Molecular and Biomolecular Spectroscopy, 223, Article ID: 117281.
https://doi.org/10.1016/j.saa.2019.117281

[2] 温君. 中小企业财务危机预警指标体系研究[J]. 现代营销(信息版), 2019(8):46.

[3] Yuan, Z.Y. and Hou, Y. (2019) Research on Intelligent Decision-Making Method of Enterprise Financial Crisis Early Warning. Journal of Phys-ics: Conference Series, 1213, Article ID: 022026.
https://doi.org/10.1088/1742-6596/1213/2/022026

[4] Beaver, W.H. (1966) Financial Ratios as Predictors of Failures. Journal of Accounting Research, 4, 71-111.

[5] Hartman, A.E. and Coslor, E. (2019) Earning While Giving: Rhetorical Strategies for Navigating Multiple Institutional Logics in Reproductive Commodification. Journal of Business Research, 105, 405-419.
https://doi.org/10.1016/j.jbusres.2019.05.010

[6] Asteasuain, M. (2019) Efficient Modeling of Distributions of Polymer Properties Using Probability Generating Functions and Parallel Computing. Computers and Chemical Engi-neering, 128, 261-284.
https://doi.org/10.1016/j.compchemeng.2019.06.009

[7] 马旭辉. 基于机器学习的上市公司财务风险智能识别研究[D]: [硕士学位论文]. 南京: 南京大学, 2019.

[8] 支慧. 基于BP神经网络的乐视网财务风险预警研究[D]: [硕士学位论文]. 石河子: 石河子大学, 2018.

[9] 叶茂华. 基于遗传算法优化神经网络的财务预警系统研究[J]. 黑龙江科学, 2017, 8(18): 24-25.

[10] 冯旭日, 崔洁. 基于灰色Elman神经网络的股价预测[J]. 辽宁工程技术大学学报(社会科学版), 2019, 21(4): 246-252.

[11] Chen, T., Tu, S.X., Wang, H.L., Liu, X.S., Li, F.H., Jin, W., Liang, X.W., Zhang, X.Q. and Wang, J. (2019) Computer-Aided Diagnosis of Gallbladder Polyps Based on High Resolution Ultrasonography. Computer Methods and Programs in Biomedicine, 185, Article ID: 105118.
https://doi.org/10.1016/j.cmpb.2019.105118

[12] 王改革, 郭立红, 段红, 刘逻, 王鹤淇. 基于Elman_AdaBoost强预测器的目标威胁评估模型及算法[J]. 电子学报, 2012, 40(5): 901-906.

[13] 汤荣志, 段会川, 孙海涛. SVM训练数据归一化研究[J]. 山东师范大学学报(自然科学版), 2016, 31(4): 60-65.

[14] 王凯, 唐诗华, 王江波, 肖阳, 容静, 王文贯. 基于GA-BP-AdaBoost强预测模型的大坝变形应用[J]. 桂林理工大学学报, 2019, 39(2): 415-419.

[15] 徐明鹃, 王本有. BP神经网络集成挖掘方法在财务预警中的应用[J]. 长春工业大学学报, 2016, 37(3): 236-240.

[16] 韩韬, 陈晓辉. 基于预测模型的BP-Adaboost算法改进[J]. 桂林理工大学学报, 2014, 34(3): 589-594.

Top