Financial crisis prediction method and device for listed company, storage medium and product
By using BERT and TextCNN models to extract deep-level features of listed companies' financial texts, it solves the shortcomings of existing financial crisis prediction methods in capturing dynamic changes and deep-level features, and achieves more accurate financial crisis prediction and decision support.
Patent Information
- Application Number
- CN202410759107.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-20
AI Technical Summary
Existing financial crisis prediction methods are difficult to accurately capture the dynamic changes within the enterprise and the impact of the external environment, and the method based on a single neural network model ignores the deep features of the text, resulting in biased prediction results.
The BERT model is used to extract the document vector matrix of management discussion and analysis documents, and combined with the TextCNN model for training to form a financial crisis label information category recognizer, and deeply extract text information features to improve prediction accuracy.
By combining the BERT and TextCNN models, it can more accurately identify whether listed companies are in financial crisis, improve the accuracy and effect of prediction, and provide better decision support.
Smart Images

Figure CN118674464A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial crisis prediction of listed companies, and in particular to a method, device, storage medium and product for predicting financial crisis of listed companies. Background Art
[0002] The monitoring and analysis of the financial status of an enterprise is crucial to the survival and development of the enterprise. Traditional financial crisis prediction methods are mainly based on financial statement analysis and statistical models. Although these methods can predict the financial status of an enterprise to a certain extent, it is difficult to accurately capture the dynamic changes within the enterprise and the impact of the external environment. Although many traditional text processing methods have been applied to financial crisis prediction, such as sentiment models based on word frequency statistics. These methods are usually based on the surface information of the text, such as frequency of occurrence, emotional color, etc., to predict the financial status of the enterprise. However, these methods often ignore the deep semantic information in the text, which makes the accuracy and effect of the prediction unsatisfactory.
[0003] With the continuous development of deep learning technology, some neural network-based text processing methods have gradually been applied to the field of financial crisis prediction. These methods can automatically learn the features in the data, better capture the semantic information in the text, and improve the accuracy and effect of the prediction. However, these methods often only focus on a single neural network model and ignore the synergy between different models. At the same time, they often only focus on the surface features of the text and ignore the deep features of the text, which often leads to certain deviations in the prediction results.
[0004] Therefore, there is an urgent need for a method that can perform deep feature extraction on financial text information to improve prediction accuracy and effectiveness. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, storage medium and product for predicting financial crisis of listed companies, which can perform deep feature extraction on financial text information and improve prediction accuracy and effect.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for predicting financial crisis of listed companies, comprising:
[0008] Obtain management discussion and analysis documents of target listed companies;
[0009] Based on the BERT model, a document vector matrix of the management discussion and analysis documents of the target listed company is obtained;
[0010] Inputting the document vector matrix of the management discussion and analysis document of the target listed company into a financial crisis label information category identifier to obtain a predicted probability value of the target listed company; the financial crisis label information category identifier is obtained by training a TextCNN model;
[0011] The category of the financial crisis label information of the target listed company is determined according to the predicted probability value of the target listed company; the category of the financial crisis label information is falling into financial crisis or not falling into financial crisis.
[0012] Optionally, a document vector matrix of the management discussion and analysis document of the target listed company is obtained based on the BERT model, specifically including:
[0013] Segmenting the management discussion and analysis document of the target listed company to obtain a target sentence set; the target sentence set includes all sentences in the management discussion and analysis document of the target listed company;
[0014] Using the BERT model to perform sentence embedding processing on all sentences in the target sentence set to obtain a sentence embedding vector for each sentence in the target sentence set;
[0015] According to the sentence embedding vector of each sentence in the target sentence set, a document vector matrix of the management discussion and analysis document of the target listed company is obtained.
[0016] Optionally, the specific process of training the TextCNN model is as follows:
[0017] Obtaining an original data set; the original data set includes annual reports of multiple training listed companies and the stock names of each training listed company T years later; the stock names of the training listed companies T years later are the stock names of the training listed companies T years later than the target year; the target year is the year corresponding to the annual reports of the training listed companies;
[0018] Based on the BERT model, a document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained;
[0019] The stock names of each training listed company T years later in the original data set are marked to obtain the categories of the financial crisis label information of each training listed company;
[0020] Taking the document vector matrix of the management discussion and analysis documents of each training listed company as input, the category of the financial crisis label information of each training listed company as output, and the minimum loss function as the goal, the gradient descent method is used to train the TextCNN model to obtain the financial crisis label information category identifier.
[0021] Optionally, a document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained based on the BERT model, specifically including:
[0022] Obtaining the management discussion and analysis documents of each training listed company according to the annual report of each training listed company in the original data set, and respectively dividing the management discussion and analysis documents of each training listed company into sentences to obtain a training sentence set of each training listed company; the training sentence set includes all sentences in the management discussion and analysis documents of the training listed company;
[0023] The BERT model is used to perform sentence embedding processing on each sentence in the training sentence set of each training listed company, and the sentence embedding vector of each sentence in the training sentence set of each training listed company is obtained;
[0024] According to the sentence embedding vector of each sentence in the training sentence set of each training listed company, the document vector matrix of the management discussion and analysis document of each training listed company is obtained.
[0025] Optionally, determining the category of the financial crisis label information of the target listed company according to the predicted probability value of the target listed company specifically includes:
[0026] If the predicted probability value of the target listed company is greater than or equal to the probability threshold, then determining that the category of the financial crisis label information of the target listed company is in financial crisis;
[0027] If the predicted probability value of the target listed company is less than the probability threshold, the category of the financial crisis label information of the target listed company is determined as not falling into financial crisis.
[0028] Optionally, the stock names of each training listed company T years later in the original data set are marked to obtain the categories of financial crisis label information of each training listed company, specifically including:
[0029] If the stock name of the training listed company contains "ST" after T years, the category of the training listed company's financial crisis label information is in financial crisis;
[0030] If the stock name of the training listed company does not contain "ST" T years later, the category of the financial crisis label information of the training listed company is not in financial crisis.
[0031] Optionally, the probability threshold is 0.5.
[0032] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for predicting financial crisis of listed companies.
[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for predicting financial crisis of listed companies.
[0034] A computer program product includes a computer program, which implements the above-mentioned method for predicting financial crisis of listed companies when executed by a processor.
[0035] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0036] The present invention obtains a document vector matrix of management discussion and analysis documents of a target listed company based on a BERT model; inputs the document vector matrix of management discussion and analysis documents of the target listed company into a financial crisis label information category identifier to obtain a predicted probability value of the target listed company; the financial crisis label information category identifier is obtained by training a TextCNN model; and the category of the financial crisis label information of the target listed company is determined according to the predicted probability value of the target listed company. The present invention combines the advantages of the two neural network models, BERT and TextCNN, and can deeply extract text information features, thereby improving the accuracy and effect of prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A flow chart of a method for predicting financial crisis of listed companies provided by an embodiment of the present invention;
[0039] Figure 2 A flowchart of the financial crisis prediction system for listed companies provided by an embodiment of the present invention;
[0040] Figure 3 This is a diagram of the internal structure of a computer device. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] The embodiment of the present invention discloses a method for predicting financial crisis of listed companies, which is a method for predicting financial crisis of listed companies based on deep text feature extraction, and is used to identify whether a listed company will fall into a financial crisis in the future, so as to provide decision support for investors or corporate managers. The method comprises the following steps: S1, data collection: collecting annual reports and corresponding company stock names from the official websites of listed companies to obtain the original data set; S2, data preprocessing: extracting management discussion and analysis documents from the annual reports of the original data set, and marking the stock names of the companies corresponding to the original data set after T years, thereby obtaining the preprocessed data set; S3, document vector matrixing: segmenting the management discussion and analysis documents, using the BERT word embedding technology to perform sentence embedding processing on the sentences in the management discussion and analysis documents, obtaining the sentence embedding vector of each sentence, and superimposing the sentence embedding vectors of each sentence to obtain the document vector matrix of the management discussion and analysis documents; forming a training data set with the document vector matrix and the corresponding financial crisis label information; S4, financial crisis prediction and identification: establishing an enterprise financial crisis prediction method characterized by the document embedding vector, using the training data set to train TextCNN, and obtaining the trained financial crisis label information category identifier; using the identifier, according to the newly input document vector matrix and the corresponding financial crisis label, to further identify and output the category of the corresponding label information as being in financial crisis or not in financial crisis. The present invention first obtains annual reports from the official websites of listed companies, and after data preprocessing, vectorizes the documents through BERT, and then uses TextCNN to perform deep feature extraction on the vector matrix to achieve the prediction of the financial crisis of listed companies. Figure 1 As shown, the specific steps are:
[0044] Step 101: Obtain the management discussion and analysis document of the target listed company. Specifically, obtain the annual report of the target listed company and obtain the management discussion and analysis document based on the annual report.
[0045] Step 102: Obtain a document vector matrix of the management discussion and analysis document of the target listed company based on the BERT model.
[0046] Step 103: Input the document vector matrix of the management discussion and analysis document of the target listed company into a financial crisis label information category identifier to obtain the predicted probability value of the target listed company. The financial crisis label information category identifier is obtained by training the TextCNN model.
[0047] Step 104: Determine the category of the financial crisis label information of the target listed company according to the predicted probability value of the target listed company. The category of the financial crisis label information is falling into financial crisis or not falling into financial crisis.
[0048] In practical applications, the document vector matrix of the management discussion and analysis document of the target listed company is obtained based on the BERT model, which specifically includes:
[0049] The management discussion and analysis document of the target listed company is divided into sentences to obtain a target sentence set; the target sentence set includes all sentences in the management discussion and analysis document of the target listed company.
[0050] The BERT model is used to perform sentence embedding processing on all sentences in the target sentence set to obtain a sentence embedding vector for each sentence in the target sentence set.
[0051] According to the sentence embedding vector of each sentence in the target sentence set, a document vector matrix of the management discussion and analysis document of the target listed company is obtained.
[0052] In practical applications, the specific process of training the TextCNN model is as follows:
[0053] Obtain an original data set; the original data set includes annual reports of multiple training listed companies and the stock names of each training listed company T years later; the stock names of the training listed companies T years later are the stock names of the training listed companies T years later in the target year; the target year is the year corresponding to the annual reports of the training listed companies.
[0054] Based on the BERT model, the document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained.
[0055] The stock names of each training listed company T years later in the original data set are marked to obtain the categories of the financial crisis label information of each training listed company.
[0056] Taking the document vector matrix of the management discussion and analysis documents of each training listed company as input, the category of the financial crisis label information of each training listed company as output, and the minimum loss function as the goal, the gradient descent method is used to train the TextCNN model to obtain the financial crisis label information category identifier.
[0057] In practical applications, the specific steps to obtain the original data set are:
[0058] Download the annual reports of listed companies from the official websites of listed companies in Shanghai and Shenzhen, and collect the stock names of the corresponding listed companies T years later, and use the annual reports of the listed companies and the stock names of the corresponding listed companies T years later as the original data set; among them, the stock names of the corresponding listed companies 3 years later can be collected. The stock names are the abbreviations of the stocks, which can be divided into stock names containing "ST" and stock names not containing "ST".
[0059] In practical applications, the document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained based on the BERT model, specifically including:
[0060] The management discussion and analysis documents of each training listed company are obtained according to the annual reports of each training listed company in the original data set, and the management discussion and analysis documents of each training listed company are respectively divided into sentences to obtain a training sentence set of each training listed company; the training sentence set includes all sentences in the management discussion and analysis documents of the training listed companies.
[0061] The BERT model is used to perform sentence embedding processing on each sentence in the training sentence set of each training listed company, and the sentence embedding vector of each sentence in the training sentence set of each training listed company is obtained. The BERT model is a Chinese pre-training model developed by Google.
[0062] According to the sentence embedding vector of each sentence in the training sentence set of each training listed company, the document vector matrix of the management discussion and analysis document of each training listed company is obtained.
[0063] In practical applications, the management discussion and analysis document is obtained based on the annual report, and the management discussion and analysis document is divided into sentences, including:
[0064] Extract the management discussion and analysis document based on the starting and ending page numbers of the management discussion and analysis section in the annual report. Separate the management discussion and analysis document into sentences based on the Chinese punctuation marks “.!?:”.
[0065] In practical applications, the BERT model is used to perform sentence embedding processing on the sentences after segmentation. The specific method to obtain the sentence embedding vector is as follows:
[0066] The management discussion and analysis document consists of several sentences, so the management discussion and analysis document can be expressed as W = {s1, s2, ..., s n}, where W represents the management discussion and analysis document, n represents the number of sentences in the management discussion and analysis document, and s i represents the i-th sentence in the management discussion and analysis document.
[0067] The ith sentence s in the MD&A document i It is composed of several characters and can be expressed as where k i Represents the i-th sentence s i The number of Chinese characters, w ij represents the i-th sentence s in the management discussion and analysis document i The jth word in .
[0068] Each sentence in the management discussion and analysis document is processed by adding the [CLS] identifier at the beginning of the sentence and the [SEP] identifier at the end of the sentence, and converted into a format that can be processed by the BERT model, that is, Where S' i represents the processed sentence of the ith sentence in the management discussion and analysis document, w iCLS represents the [CLS] identifier added at the beginning of the i-th sentence, w iSEP represents the [SEP] identifier added at the end of the i-th sentence, then the management discussion and analysis document can be represented as W = {s'1, s'2, ..., S' n}.
[0069] The i-th sentence s' i Input into the BERT model and get the sentence S' i The vector of each word in and the vector corresponding to the [CLS] identifier and the [SEP] identifier can be represented by the symbol where v iCLS The vector of [CLS] identifiers corresponding to the i-th sentence, v iSEP The vector of [SEP] identifiers corresponding to the ith sentence, v ij Represents the vector corresponding to the j-th word in the ith sentence, and the dimension of the vector is 768.
[0070] The vector v of [CLS] identifiers corresponding to the i-th sentence in the management discussion and analysis document iCLS It can be regarded as the sentence embedding vector of the i-th sentence, which can be expressed as sv i =v iCLS ; where sv i is the sentence embedding vector of the i-th sentence.
[0071] In practical applications, the document vector matrix is obtained based on the sentence embedding vector of each sentence, which is:
[0072] The sentence embedding vectors of each sentence in a management discussion and analysis document are concatenated in the second dimension to obtain the document vector matrix corresponding to the management discussion and analysis document, which can be expressed as D = {sv1, sv2, ..., sv n}, where D is the document vector matrix, sv i is the sentence embedding vector of the i-th sentence in the processed management discussion and analysis document.
[0073] In practical applications, the training process of the TextCNN model includes input layer, convolution layer, pooling layer, concatenation layer, neural network layer and back propagation. The calculation of each layer is as follows:
[0074] 41) Input layer: The document vector matrix in the training data set is used as the input of the TextCNN model. The training data set includes the document vector matrix and the corresponding financial crisis label information. The shape of the document vector matrix is n*768, where n is the number of sentences in the management discussion and analysis document, and 768 is the dimension of the sentence embedding vector.
[0075] 42) Convolution layer: Use 4 one-dimensional convolution kernels to convolve with the text vector matrix to extract text features, and the convolution direction is the sentence direction. The width of the convolution kernel of the one-dimensional convolution is the same as the word vector dimension, and the heights are 2, 3, 4, and 5 respectively. The convolution kernel at each height has 20 channels. The input shape of the TextCNN model is n*768, so the width of the convolution kernel is 768. Assuming that the height of the convolution kernel is h, the weight matrix is W, and the bias is b, the feature a obtained by one convolution operation is i The calculation formula is:
[0076] a i =W Input i:i+h-1 +b
[0077] Where i = 1, 2, ..., n-h + 1, "·" represents the dot product operation, Input i:i+h-1 Represents the data from the i-th to the i+h-1th rows of the TextCNN model input. The convolution kernel slides with a step size of 1 in the direction of the sentence and generates features, and finally obtains a feature vector generated by the convolution kernel, which is expressed as:
[0078] A i ={a1,a2,......,a n-h+1}.
[0079] Among them A i represents the feature vector generated by the i-th convolution kernel, a j Represents the result of the dot product operation when the i-th convolution kernel runs to the j-th step.
[0080] 43) Pooling layer: The pooling layer used by the TextCNN model is the maximum pooling, and the calculation formula is:
[0081] V i =max(A i )
[0082] Where max(A i ) represents the feature vector A generated by the i-th convolution kernel i Extract the maximum value, V i Represents the result after maximum pooling.
[0083] 44) Splicing: Perform a maximum pooling operation on the feature vectors obtained by the four one-dimensional convolution kernels, and splice the results of the maximum pooling operation to obtain the final text feature vector. The formula is expressed as:
[0084] F=Concat(V1,V2,……,V m )
[0085] Concat represents the concatenation operation, and F represents the concatenated result. Further, it can be expressed as F = {V1, V2, ..., V m}. Where m is the dimension of the concatenated result, 4×20, 4 is the number of convolution kernels, and 20 is the number of channels of each convolution kernel.
[0086] 45) Neural Network Layer:
[0087] The dimension of the neural network input layer is 80 dimensions, the dimension of the hidden layer is 10 dimensions, and the dimension of the output layer is 2 dimensions. The output of the output layer is normalized by the softmax function to obtain the probability of falling into a financial crisis or not falling into a financial crisis.
[0088] The softmax function formula is expressed as:
[0089]
[0090] where z i is the output value of the i-th node, and C is the number of output nodes, that is, the number of categories, two.
[0091] 46) Back Propagation:
[0092] After using the softmax function to output the probability of each category, the parameters in the entire model are updated by calculating the loss function of the predicted value and the actual value through gradient descent.
[0093] The loss function is a cross entropy function, and its formula is:
[0094]
[0095] Where y is the real financial crisis label information in the training data set, To represent the probability of being classified as 1 output by the TextCNN model, It is expressed as the probability of being classified as 0.
[0096] The TextCNN is trained 500 times to obtain a trained TextCNN model, i.e., a financial crisis label information category identifier.
[0097] In practical applications, the category of the financial crisis label information of the target listed company is determined according to the predicted probability value of the target listed company, specifically including:
[0098] If the predicted probability value of the target listed company is greater than or equal to the probability threshold, the category of the financial crisis label information of the target listed company is determined to be in financial crisis.
[0099] If the predicted probability value of the target listed company is less than the probability threshold, the category of the financial crisis label information of the target listed company is determined as not falling into financial crisis.
[0100] In practical applications, the stock names of each training listed company T years later in the original data set are marked to obtain the categories of financial crisis label information of each training listed company, including:
[0101] If the stock name of the training listed company T years later contains "ST", the category of the financial crisis label information of the training listed company is in financial crisis (marked as 1).
[0102] If the stock name of the training listed company does not contain "ST" T years later, the category of the financial crisis label information of the training listed company is not in financial crisis (marked as 0).
[0103] In practical applications, the specific implementation of the identifier, based on the newly input document vector matrix and the corresponding financial crisis label, to identify and output the corresponding label information as being in financial crisis or not in financial crisis is as follows:
[0104] The newly input document vector matrix is input into the trained TextCNN model (financial crisis label information category identifier) to obtain the predicted probability value. According to the predicted probability value, the category of the financial crisis label information is judged as being in financial crisis or not in financial crisis. If the probability value is greater than or equal to 0.5, the financial crisis label information is in financial crisis; if the probability value is less than 0.5, the financial crisis label information is not in financial crisis. The formula is:
[0105]
[0106] Where p represents the predicted probability value of the TextCNN recognizer, The category of information labeling for financial crisis.
[0107] The embodiment of the present invention also provides a listed company financial crisis prediction system corresponding to the above method, such as Figure 2 As shown, including:
[0108] Data acquisition module, data preprocessing module, document vector matrix module and financial crisis label information category identifier.
[0109] The data acquisition module is used to acquire the annual report of the listed company input by the user and send it to the data preprocessing module.
[0110] The data preprocessing module is used to receive the annual report of the listed company sent by the data acquisition module, extract the management discussion and analysis document from the annual report of the listed company, and send the management discussion and analysis document to the document vector matrixing module.
[0111] The document vector matrixing module is used to receive the management discussion and analysis document sent by the data preprocessing module, divide it into sentences, process it through BERT to obtain a document vector matrix, and send the document vector matrix to the financial crisis label information category identifier.
[0112] The financial crisis label information category identifier is a trained TextCNN model, which receives the document vector matrix sent by the document vector matrixing module, and identifies and outputs the category of the financial crisis label information as being in financial crisis or not in financial crisis.
[0113] In order to verify the performance of the method provided in the above embodiment in predicting the financial crisis of listed companies, an empirical experiment was conducted in the embodiment of the present invention, and annual report data of multiple listed companies were collected from the official websites of Chinese listed companies. The data sample size was 4132 annual reports and corresponding stock names.
[0114] In order to verify the performance, three commonly used machine learning classification methods were selected as comparison methods, namely BERT and Word2Vec, and compared with the method proposed in this invention. The judgment indicators of financial crisis prediction performance adopted include AUC (area under the ROC curve), accuracy (Accuracy) and KS indicator (Kolmogorov-Smirnov).
[0115] In order to avoid the randomness that may be caused by one experiment, 30 experiments were conducted by random sampling, in which the ratio of training samples to test samples was 80% and 20% respectively. Finally, the average results of the 30 experiments were taken to judge the performance of the method. The results of the method proposed by the present invention and the results of the comparative method are listed in Table 1:
[0116] Table 1: Performance comparison of BERT-TextCNN and comparison methods (BERT and Word2Vec) (training set: test set = 80:20)
[0117] index BERT-TextCNN BERT Word2Vec AUC 0.8473 0.7724 0.7913 Accuracy 0.7611 0.6880 0.7117 KS 0.5594 0.4208 0.4621
[0118] From the classification results in Table 1, it can be seen that BERT-TextCNN has achieved the best financial crisis prediction and recognition effect. Compared with the other four methods, BERT-TextCNN has achieved very good classification results in AUC, accuracy and KS indicators, reaching 84.7%, 76.1% and 55.9% respectively, all exceeding BERT and Word2Vec models by more than 5%. The experimental results show that the present invention has excellent financial crisis prediction performance. Therefore, this type of method proposed in the present invention has a very good role in predicting the financial crisis of listed companies.
[0119] Compared with the prior art, the advantages of the present invention are:
[0120] (1) It combines the advantages of BERT and TextCNN neural network models, and can simultaneously capture deep semantic features, improving the accuracy and effect of prediction.
[0121] (2) It can automatically learn useful feature information from large amounts of text data without the need for manually designed feature extraction methods. It is also highly scalable and can adapt to text data of different types and sizes.
[0122] In one embodiment, a computer device is also provided, including a memory and a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for predicting the financial crisis of listed companies described in the above method embodiments is implemented. The computer device may be a database, and its internal structure diagram may be as shown in FIG. Figure 3As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.
[0123] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for predicting financial crisis of listed companies described in the above method embodiments is implemented.
[0124] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method for predicting financial crisis of listed companies described in the above method embodiments is implemented.
[0125] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, and programmable logic devices, etc., but are not limited thereto.
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for predicting financial crisis of listed companies, characterized in that: include: Obtain management discussion and analysis documents of target listed companies; Based on the BERT model, a document vector matrix of the management discussion and analysis documents of the target listed company is obtained; Inputting the document vector matrix of the management discussion and analysis document of the target listed company into a financial crisis label information category identifier to obtain a predicted probability value of the target listed company; the financial crisis label information category identifier is obtained by training a TextCNN model; The category of the financial crisis label information of the target listed company is determined according to the predicted probability value of the target listed company; the category of the financial crisis label information is falling into financial crisis or not falling into financial crisis.
2. The method for predicting financial crisis of listed companies according to claim 1, characterized in that: Based on the BERT model, the document vector matrix of the management discussion and analysis document of the target listed company is obtained, which specifically includes: Segmenting the management discussion and analysis document of the target listed company to obtain a target sentence set; the target sentence set includes all sentences in the management discussion and analysis document of the target listed company; Using the BERT model to perform sentence embedding processing on all sentences in the target sentence set to obtain a sentence embedding vector for each sentence in the target sentence set; According to the sentence embedding vector of each sentence in the target sentence set, a document vector matrix of the management discussion and analysis document of the target listed company is obtained.
3. The method for predicting financial crisis of listed companies according to claim 1, characterized in that: The specific process of training the TextCNN model is as follows: Obtaining an original data set; the original data set includes annual reports of multiple training listed companies and the stock names of each training listed company T years later; the stock names of the training listed companies T years later are the stock names of the training listed companies T years later than the target year; the target year is the year corresponding to the annual reports of the training listed companies; Based on the BERT model, a document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained; The stock names of each training listed company T years later in the original data set are marked to obtain the categories of the financial crisis label information of each training listed company; Taking the document vector matrix of the management discussion and analysis documents of each training listed company as input, the category of the financial crisis label information of each training listed company as output, and the minimum loss function as the goal, the gradient descent method is used to train the TextCNN model to obtain the financial crisis label information category identifier.
4. The method for predicting financial crisis of listed companies according to claim 3, characterized in that: Based on the BERT model, the document vector matrix of the management discussion and analysis documents of each training listed company in the original data set is obtained, specifically including: Obtaining the management discussion and analysis documents of each training listed company according to the annual report of each training listed company in the original data set, and respectively dividing the management discussion and analysis documents of each training listed company into sentences to obtain a training sentence set of each training listed company; the training sentence set includes all sentences in the management discussion and analysis documents of the training listed company; The BERT model is used to perform sentence embedding processing on each sentence in the training sentence set of each training listed company, and the sentence embedding vector of each sentence in the training sentence set of each training listed company is obtained; According to the sentence embedding vector of each sentence in the training sentence set of each training listed company, the document vector matrix of the management discussion and analysis document of each training listed company is obtained.
5. The method for predicting financial crisis of listed companies according to claim 1, characterized in that: Determining the category of the financial crisis label information of the target listed company according to the predicted probability value of the target listed company specifically includes: If the predicted probability value of the target listed company is greater than or equal to the probability threshold, then determining that the category of the financial crisis label information of the target listed company is in financial crisis; If the predicted probability value of the target listed company is less than the probability threshold, the category of the financial crisis label information of the target listed company is determined as not falling into financial crisis.
6. The method for predicting financial crisis of listed companies according to claim 3, characterized in that: The stock names of each training listed company T years later in the original data set are marked to obtain the categories of financial crisis label information of each training listed company, including: If the stock name of the training listed company contains "ST" after T years, the category of the training listed company's financial crisis label information is in financial crisis; If the stock name of the training listed company does not contain "ST" T years later, the category of the financial crisis label information of the training listed company is not in financial crisis.
7. The method for predicting financial crisis of listed companies according to claim 5, characterized in that: The probability threshold is 0.
5.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for predicting financial crisis of listed companies as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting financial crisis of listed companies described in any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting financial crisis of listed companies described in any one of claims 1 to 7 is implemented.
