Enterprise Financial Early Warning Based on Lasso Regression Screening Variables

The construction of an enterprise financial warning model is very important for a listed company, and this paper uses the financial data of 2819 listed enterprises as a sample, uses the lasso method for model index screening and uses a variety of classical classification methods and machine learning methods to build the model and analyze its discriminating effect. The results show that the lasso method can effectively reduce the multicollinearity between variables while reducing dimensionality and the classification effect of machine learning method is better than the classical classification method.


Introduction
Financial risk warning is a process of predicting the likelihood of financial failure of a business and sending warning signals, while it uses a variety of mathematical models to make decisions based on a company's financial statements. The market will give special treatment to listed companies with abnormal financial or other conditions, which are also referred to as ST companies and vice versa as non-ST companies. Bradley Efron et al. (2004) proposed the least angle regression to solve the calculation problem of lasso and promote its popularity in the academic world. Hernandez et al. (2009) proposed the use of lasso to select variables and estimate parameters. Li et al. (2015) Logistic regression was used to construct a corporate financial risk prediction model and analyze the probability of corporate bankruptcy.
The selection of variables and indicators will affect the final model, after reviewing the relevant literature, this paper uses lasso regression correlation algo-rithm to screen the data variables, combining the classical methods of processing cross-sectional data and machine learning methods to build the financial early warning model and compare the prediction effect of the model through three indicators. Regarding the structure of the article: 1) the paper first introduces the basic theory of the methods and models used; 2) the LASSO method is used to screen variables on real economic data, and then different methods are used to model and compare the data; 3) finally, it is concluded that the Lasso method has good results in dimensionality reduction and that machine learning classification is generally superior to classical classification methods.

Lasso Regression
Assuming that the independent variable data matrix is an n p × matrix, ordinary least squares regression seeks those coefficients β that minimize the residual sum of squares. As a method of variable selection, lasso regression requires a penalty term to constrain the size of the coefficient, and ultimately minimize the structural risk and prevent the occurrence of "overfitting".
In the case of the penalty term in the constraint condition 1 p j j s β = ≤ ∑ , the coefficient needs to meet the following conditions: Due to the characteristics of absolute value, lasso regression will filter out some coefficients. Mallows p C is one of the criteria used to evaluate lasso regression. If ( ) p k p > is selected from the respective variables of k to participate in the regression, then the p C statistic is defined as Based on this, we choose the model with the smallest p C .

Logistic Regression
This paper assumes that the dependent variable has two possibilities: the firm is an ST firm or a non-ST firm, which are 1 and 0 respectively. The linear model does not meet its assumptions in this case, but i Y is a Bernoulli distribution, so its mean has a special meaning in the model: From this, the Y can be derived: The i π in the above formula represents the probability value, which is in line with the basic linear regression, so here you can mostly use logistic regression to fit the model. According to the principle, the following formula is obtained: Journal of Financial Risk Management Y can be expressed in another way: The logarithm of the maximum likelihood function is: Substitute the upper formula to the following equation:

Sample Selection
All the data in this article are from the CSMAR database, CSMAR database is a research-oriented accurate database in the field of economy and finance, which is based on the professional standards of CRSP, COMPUSTAT, TAQ, THOMSON and other authoritative databases, and is the largest financial and economic database with the most accurate and comprehensive information in China. The data selected the financial data of all 194 ST enterprises (hereinafter referred to as ST enterprises) and 3570 unlabeled ST enterprises (hereinafter referred to as non-ST enterprises) as of September 30, 2019. After processing the missing and abnormal values of the data, the final sample data were 33 labeled ST enterprises and 2786 unlabeled ST enterprises.

Indicator Description
On the basis of the previous research results, the data variables of solvency, profitability, management ability, development ability and cash flow are selected from five aspects: • Debt solvency: Reflects the liquidity and debt level of the company's funds, which is conducive to evaluating the company's financial status and financial risks; • Profitability: profitability is the main goal of enterprise management also reflects the comprehensive ability of the enterprise, the evaluation of the profitability of the enterprise to a certain extent can reflect the financial operation of the enterprise; • Management ability: reflects the enterprise to the asset utilization and the management situation, to a certain extent can evaluate the enterprise to maintain and increase the value; • Development ability: reflects the future of the enterprise's gold management is an important index to predict the development potential of an enterprise; • Cash flow analysis: dynamically reflects the flow of cash and cash equivalents in a certain period of time. Based on the above considerations, this paper selects 16 indexes around solvency, profitability, operating ability, development ability and cash flow, and draws them into Table 1, 17 indexes as dependent variables and initial independent variables for the financial early warning model of listed companies.

Introduction of Evaluation Indicators
Most of the samples selected in the papers on the enterprise financial warning model are equal, that is, the number of experimental groups and control groups is the same, so most of them use prediction errors to measure the quality of the model when commenting on the prediction effect of the model. That is, the product of misjudgment and total. However, when the number of different types of variables varies greatly, this evaluation method is not applicable. By consulting the relevant literature, this paper introduces three indexes that can be used to comment on the two categories of variables: accuracy rate, recall rate and F1. Rate. Recall rates R defined as: F 1 is the harmonic average of accuracy and recall, defined as:

Model Building
This paper uses the lars package in R software for lasso regression to screen the financial warning model index. Table 2 shows the partial values of p C statistics in different cases (here only the results of steps 8 to 15). And the minimum value is step 11 ( 9.5639 p C = ), and the variable selection effect is optimal. Table 3 shows the final selection of the software output lasso regression variables are x 3 , x 4 , x 5 , x 8 , x 11 , x 12 , x 13 , x 14 , x 15 , x 16 . Figure 1 gives the increase and decrease of coefficients under the asynchronous number, which can be used to visually determine the selection process of the financial indicator. The left side is the intercept, and the right side is holding all the variables. Figure 1 shows that as the estimated regression coefficients of the variables gradually increase, the coefficients of the different variables show different degrees of dispersion, with the variables showing the largest changes. Table 4 shows the results of multi-collinearity determination by characteristic root, from which we can see that the number of conditions k > 100 before the screened variables in Lasso Regression indicates that there is strong multi-collinearity between variables; the number of conditions k < 10 after the screened variables in Lasso Regression indicates that the degree of multi-collinearity between variables is small. Table 5 shows that the classification methods, in order of F1 value from largest to smallest, are: random forest and adaboost have the highest F1 value of 1; logistic regression, mixed linear discriminant, linear discriminant, and flexible linear discriminant have F1 values of 0.301, 0.232, 0.19, and 0.19, respectively;   the least effective classification is SVM and Bagging classification for 0.167 and 0.114. In summary, it seems that the classification of machine learning methods is generally better than classical methods, and the accuracy of machine learning methods is generally higher than classical methods, but the recall of SVM and Bagging classification is not as high as that of classical methods in F1 value; from F1 value it seems that the best classification among classical classification methods is logistic regression, and its four classification The F1 values of the methods are not as high as those of the machine learning methods overall, but the differences in classification performance between the methods are small.

Conclusion
Through the analysis of the financial data of 2819 listed companies as of September 2019, the lasso method is introduced to screen the data index, and the model is established by various classical classification methods and machine learning methods. Finally, the prediction effect of each method is compared by using precision rate, recall rate and F1 value, and the following two conclusions are drawn: 1) The collinearity between variables decreases obviously after the model is screened by lasso method, which indicates that lasso method can effectively reduce the multicollinearity between variables.
2) Taking into account that the collected data is unbalanced (non-ST enterprises account for most of the data), the classification effect of machine learning method is better than that of classical classification method. However, the model of SVM and bagging classification is not as good as the classical classification method.
This paper innovatively introduces the LASSO method in a variety of classical classification and machine learning methods to achieve a better prediction effect with a more streamlined model, which can not only be applied to the classification problem but also extended to the regression problem, and provide readers with a reference when choosing a classification method.