Financial risk prediction method and device, storage medium and electronic equipment

Financial risk prediction is carried out through the RL-GAN model, which solves the problem of inaccurate prediction of traditional methods, and achieves efficient prediction of complex changes in the financial market and sudden risks, which improves the accuracy of risk management.

CN119295220APending Publication Date: 2025-01-10YINBAOXIN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411343882.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Traditional financial risk prediction methods rely on manual analysis and simple statistics, making it difficult to accurately predict changes and emergencies in complex financial markets, resulting in inaccurate predictions.

Method used

Using the financial risk prediction method based on the RL-GAN model, the target financial indicators are determined, the initial feature data is obtained, the stationary detection and exception processing are performed, and the data prediction is used to generate the current and future financial periods. The index predicts the data curve and calculates the probability of risk occurrence based on the actual data.

Benefits of technology

It improves the accuracy and accuracy of financial risk prediction, can accurately determine the probability of financial risks in the future period, and enhances the risk management capabilities of the financial market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295220A_ABST
    Figure CN119295220A_ABST
Patent Text Reader

Abstract

The invention discloses a financial risk prediction method and device, a storage medium and electronic equipment. The method comprises the steps of determining a target financial index based on a to-be-predicted target financial risk, and obtaining initial feature data of a plurality of feature types; for each initial feature data of the same feature type, performing stability detection to obtain a target feature data set including each target feature data of each feature type; based on the target feature data set, utilizing a target RL-GAN model to perform data prediction of the target financial index, and obtaining a prediction data curve of the target financial index in the current time period and a prediction data curve of the target financial index in the future time period; and determining the occurrence probability of the target financial risk based on the prediction data curve of the current time period and the actual data of the current time period, and taking the prediction data curve in the future time period as a prediction result of the target financial risk when the occurrence probability is greater than a predetermined probability threshold. According to the invention, the precision of the financial prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial data processing, and in particular to a financial risk prediction method, device, storage medium and electronic equipment. Background Art

[0002] With the increasing development of financial markets and the continuous advancement of financial technology, financial institutions are facing unprecedented risks and challenges. Traditional risk prediction and management methods rely too much on manual analysis and experience, which makes them inadequate in dealing with complex and changing financial environments.

[0003] The increasing complexity and volatility of financial markets make the prediction and management of financial risks extremely important. Traditional risk prediction is usually based on historical data and simple statistical analysis, which makes it difficult to accurately predict complex changes in the market and unexpected risk events.

[0004] Therefore, there is an urgent need for a financial risk prediction method to solve the problem of inaccurate financial risk prediction in the prior art. Summary of the invention

[0005] In view of this, the present invention provides a financial risk prediction method, device, storage medium and electronic device, the main purpose of which is to solve the problem that the current financial risk prediction method is not accurate enough in predicting financial risks.

[0006] To solve the above problems, the present application provides a financial risk prediction method, comprising:

[0007] Based on the target financial risk to be predicted, determine a target financial indicator for characterizing the target financial risk, and obtain initial feature data of several feature types corresponding to the target financial indicator within a predetermined target historical period;

[0008] For each initial feature data of the same feature type, a stationarity test is performed according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set including each target feature data of each feature type;

[0009] Based on the target feature data set, using the pre-trained target RL-GAN model to perform data prediction of the target financial indicator, and obtain a predicted data curve of the target financial indicator for the current period and a predicted data curve of the target financial indicator for the future period;

[0010] Based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, the probability of occurrence of the target financial risk is determined, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0011] Optionally, before performing a stationarity test on each initial feature data of the same feature type according to the corresponding historical moment, the method further includes:

[0012] Anomaly detection is performed on each initial feature data of the same feature type to convert the abnormal initial feature data to obtain the abnormally processed initial feature data for stationarity detection.

[0013] Optionally, the initial feature data of the same feature type are subjected to a stationarity test at corresponding historical moments to obtain a number of target feature data meeting a preset stationarity condition, specifically including:

[0014] The initial feature data of the same feature type are sorted in chronological order to obtain time series data;

[0015] Testing the time series data based on a predetermined unit root test ADF method to determine a unit root statistic;

[0016] Based on the unit root statistic and a predetermined critical value, determine whether the time series data meets the preset stationarity condition, and when the time series data does not meet the preset stationarity condition, perform differential processing on the time series data to obtain a number of target feature data that meet the preset stationarity condition.

[0017] Optionally, determining whether the time series data meets the preset stationarity condition based on the unit root statistic and a predetermined critical value specifically includes:

[0018] When the unit root statistic is less than or equal to a predetermined critical value, determining that the time series data meets the preset stationarity condition;

[0019] When the unit root statistic is greater than a predetermined critical value, it is determined that the time series data does not meet the preset stationarity condition.

[0020] Optionally, the target RL-GAN model adopts a three-layer architecture, including: a generator, a discriminator, and a reinforcement learning agent module;

[0021] The generator comprises: a convolutional neural network, a recurrent neural network or a variational autoencoder; the generator is used to generate a prediction data curve of the target financial indicator of the current period corresponding to the target feature data set, and a prediction data curve of the target financial indicator of the future period corresponding to the target feature data set based on each target feature data in the target feature data set, a first correspondence between the feature data of the historical period and the financial indicator of the current period, and a second correspondence between the feature data of the historical period and the financial indicator of the future period;

[0022] The discriminator comprises: a convolution layer, a LeakyReLU activation function and a Dropout layer connected in sequence; the discriminator is used to discriminate the prediction data curve generated by the generator to obtain the authenticity of each prediction data in the prediction data curve;

[0023] The reinforcement learning agent module includes: a deep Q network, a deep deterministic policy gradient or an actor-critic algorithm; the reinforcement learning agent module is used to update the model parameters of the generator in real time based on the authenticity of each predicted data in the predicted data curve to obtain an updated current target RL-GAN model.

[0024] Optionally, before using the pre-trained target RL-GAN model to perform data prediction of the target financial indicator based on the target feature data set, the method further includes: training the target RL-GAN model, specifically including:

[0025] Based on the target financial risk, obtaining a target feature data sample set corresponding to the target financial indicator in the first historical period;

[0026] Acquire a first label data curve of a target financial indicator in a second historical period corresponding to the first historical period, and simultaneously acquire a second label data curve of a target financial indicator in a third historical period corresponding to the first historical period, so as to associate the first label curve and the second label curve with a target feature data sample set corresponding to the first historical period; the first historical period is earlier than the second historical period, and the second historical period is earlier than the third historical period;

[0027] Based on each target feature data sample in each target feature data sample set, the initial RL-GAN model is used to perform data prediction of the target financial indicator to obtain a predicted data curve of the target financial indicator for the second historical period and a predicted data curve of the target financial indicator for the third historical period; and based on the predicted data curve for the second historical period, the label data curve for the second historical period, the first label curve and the second label curve associated with the target feature data sample set, the model parameters of the initial RL-GAN model are adjusted until the predicted data curve for the second historical period and the predicted data curve for the third historical period predicted by the adjusted current RL-GAN model meet the predetermined training stop condition, the model training is stopped to obtain the target RL-GAN model.

[0028] Optionally, before determining the target financial indicator for characterizing the target financial risk, the method further includes:

[0029] Establishing in advance a first correspondence between each financial risk and each financial indicator, and establishing a second correspondence between each financial indicator and each characteristic type;

[0030] The financial risks include any one or more of the following: industry development trend risk, credit risk, liquidity risk and operational risk;

[0031] The financial indicators include any one or more of the following: GDP growth rate, unemployment rate, industry growth rate, inflation rate, balance of payments and gross domestic product;

[0032] The types of characteristics include any one or more of the following: changes in consumer demand, the number of technological innovations, the number of policies and regulations issued, and changes in cost amounts.

[0033] To solve the above problems, the present application provides a financial risk prediction device, comprising:

[0034] An acquisition module, used to determine a target financial indicator for characterizing the target financial risk based on the target financial risk to be predicted, and to acquire initial feature data of a plurality of feature types corresponding to the target financial indicator within a predetermined historical period;

[0035] A detection module is used to perform a stationarity detection on each initial feature data of the same feature type according to the corresponding historical moment, and obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set including each target feature data of each feature type;

[0036] A data prediction module, based on the target feature data set, uses a pre-trained target RL-GAN model to perform data prediction of the target financial indicator, and obtains a predicted data curve of the target financial indicator for the current period and a predicted data curve of the target financial indicator for the future period;

[0037] The risk prediction module determines the probability of occurrence of the target financial risk based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0038] In order to solve the above problems, the present application provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned financial risk prediction methods are implemented.

[0039] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein a computer program is stored on the memory, and the processor implements the steps of any one of the above financial risk prediction methods when executing the computer program on the memory.

[0040] A financial risk prediction method, device, storage medium and electronic device in the present application can accurately predict the predicted data curves of target financial indicators in the current period and future periods based on the financial feature data in the historical period by utilizing the pre-trained target RL-GAN model, so that the predicted data curve of the target financial indicator corresponding to the current period and the actual data curve of the target financial indicator in the current period can be compared / calculated, and then the probability of occurrence of the target financial risk in the future period can be accurately and reasonably determined based on the comparison / calculation results, and subsequently the financial risk can be accurately predicted based on the occurrence probability and the predicted data curve of the future period, thereby improving the accuracy of the financial prediction results.

[0041] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0043] Figure 1 This is a flowchart of a financial forecasting method according to an embodiment of the present application;

[0044] Figure 2 This is a structural block diagram of a financial risk prediction device according to another embodiment of the present application;

[0045] Figure 3 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0046] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0047] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0048] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0049] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0050] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0051] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0052] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0053] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0054] The present application embodiment provides a financial risk prediction method, such as Figure 1 As shown, the following steps are included:

[0055] Step S101, based on the target financial risk to be predicted, determining a target financial indicator for characterizing the target financial risk, and acquiring initial feature data of several feature types corresponding to the target financial indicator within a predetermined historical period;

[0056] In this step, a first correspondence between various financial risks and various financial indicators can be established in advance, and a second correspondence between various financial indicators and various feature types can be established.

[0057] The financial risks include any one or more of the following: industry development trend risk, credit risk, liquidity risk and operational risk. The financial indicators include any one or more of the following: GDP growth rate, unemployment rate, industry growth rate, inflation rate, balance of payments and gross domestic product. The characteristic types include any one or more of the following: changes in consumer demand, the number of technological innovations, the number of policies and regulations issued, and changes in cost amounts.

[0058] Specifically, in this embodiment, the target financial indicators corresponding to the industry development trend risk include the industry growth rate. The target financial indicators corresponding to the credit risk include: unemployment rate. The target financial indicators corresponding to the liquidity risk include: inflation rate, balance of payments or gross domestic product. The target financial indicators corresponding to the operational risk include: GDP growth rate, inflation rate or gross domestic product.

[0059] The types of characteristics corresponding to the industry growth rate include: changes in consumer demand, the number of technological innovations, the number of policies and regulations issued, and changes in the amount of costs. The types of characteristics corresponding to the GDP growth rate include: retail prices of goods, industrial structure, growth momentum, resource allocation, economic well-being, etc. The types of characteristics corresponding to the unemployment rate include: industry production quantity, demand quantity, prices, trade quantity, interest rate bonds, etc. The types of characteristics corresponding to the inflation rate can be: price level, excess money supply, rising production costs, international raw material price fluctuations, policy adjustments, and social psychological expectations. The types of characteristics corresponding to the balance of payments include: economic development level, international investment and trade policies, exchange rate policies, and international financial market fluctuations.

[0060] In the specific implementation process of this step, the data source can be determined according to the target financial risk, such as stock exchange websites, financial news websites, official announcements, etc., and the crawler can be written in Python to detect various financial data in real time. Scrapy is used for large-scale data collection. By obtaining the web page content, the required data is extracted using the hypertext markup language HTML / extensible markup language XML parsing library, and the extracted data is saved in a database or file, thereby realizing the collection of financial data. Subsequently, feature extraction can be performed based on the collected financial data to obtain various initial feature data related to the target financial indicators.

[0061] Step S102, for each initial feature data of the same feature type, a stationarity test is performed according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity condition, so as to obtain a target feature data set including each target feature data of each feature type;

[0062] In the specific implementation process of this step, the time series data composed of the initial feature data can be tested by using a predetermined unit root test ADF method to obtain a unit root statistic, that is, to obtain an ADF statistic. Then, the ADF statistic is used to determine whether the time series data is stationary to determine whether it meets the stationarity condition. In this embodiment, the time series data actually refers to a data sequence composed of feature data of the same feature type sorted in chronological order.

[0063] Step S103, based on the target feature data set, using the pre-trained target RL-GAN model to perform data prediction of the target financial indicator, and obtain a predicted data curve of the target financial indicator for the current period and a predicted data curve of the target financial indicator for the future period;

[0064] In this step, the RL-GAN model target RL-GAN model adopts a three-layer architecture, including: generator, discriminator and reinforcement learning agent module.

[0065] The generator comprises: a convolutional neural network, a recurrent neural network or a variational autoencoder; the generator is used to generate a prediction data curve of the target financial indicator of the current period corresponding to the target feature data set, and a prediction data curve of the target financial indicator of the future period corresponding to the target feature data set based on each target feature data in the target feature data set, a first correspondence between the feature data of the historical period and the financial indicator of the current period, and a second correspondence between the feature data of the historical period and the financial indicator of the future period;

[0066] The discriminator comprises: a convolution layer, a LeakyReLU activation function and a Dropout layer connected in sequence; the discriminator is used to discriminate the prediction data curve generated by the generator to obtain the authenticity of each prediction data in the prediction data curve;

[0067] The reinforcement learning agent module includes: a deep Q network, a deep deterministic policy gradient or an actor-critic algorithm; the reinforcement learning agent module is used to update the model parameters of the generator in real time based on the authenticity of each predicted data in the predicted data curve to obtain an updated current target RL-GAN model.

[0068] Step S104, based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, determine the probability of occurrence of the target financial risk, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0069] In this step, several deviation values ​​can be determined based on the actual data of the target financial indicator in the current period and the predicted data in the predicted data curve, and then the probability of occurrence of the target financial risk can be determined based on each deviation value. That is to say, when each deviation value is smaller, it means that the predicted data in the predicted data curve is closer to the actual data, indicating that the probability of occurrence of the target financial risk is higher, and the predicted data curve in the next period can be used as the prediction result of the target financial risk. On the contrary, if each deviation value is larger, it means that the predicted data in the predicted data curve is closer to the actual data, indicating that the probability of occurrence of the target financial risk is lower, and the data prediction of the target financial indicator can be re-performed. In the specific implementation process, the mapping relationship between each predetermined deviation interval and the probability value can be established in advance, and then the average deviation value can be calculated based on the absolute value of each deviation value, and then the average deviation value can be compared with each predetermined deviation interval to determine the target deviation interval corresponding to the average deviation value, so as to use the probability value corresponding to the target deviation interval as the probability of occurrence of the target financial risk. For example, the deviation interval can be set to [0, 3), [3, 5), [5, 7), [7, 10], etc., the deviation interval [0, 3) can be set to a corresponding probability of 95%, the deviation interval [3, 5) can be set to a corresponding probability of 80%, the deviation interval [5, 7) can be set to a corresponding probability of 70%, and so on, each deviation interval corresponds to a probability value. In this embodiment, the numerical value of the deviation interval can be set and adjusted according to actual needs, and can be a 10-point system or a 100-point system. The probability values ​​corresponding to each deviation interval can also be set and adjusted according to actual needs.

[0070] In the specific implementation process of this embodiment, after obtaining the prediction results, the prediction results can be further sent to the target user in a predetermined output mode to provide risk warnings. The predetermined output mode can be SMS, email, etc. In this embodiment, by delivering the prediction results to the relevant users in a timely manner, targeted delivery is achieved, that is, the risk information is delivered to the relevant users in a timely manner using the prediction results of the model library. It is necessary to combine technology and strategies to ensure the accuracy, timeliness and security of the information. Choose appropriate communication channels, such as email, SMS, mobile application notifications, etc., to ensure real-time protection: ensure that the system can quickly and accurately transmit risk information, design an easy-to-use and intuitive user interface so that users can easily obtain and understand risk information, ensure that all transmitted and stored data is safe, use encryption and security protocols, and comply with relevant data protection and privacy regulations. And it can also allow users to customize risk management strategies and alert settings according to their needs to achieve more personalized risk management.

[0071] A financial risk prediction method, device, storage medium and electronic device in the present application can accurately predict the predicted data curve of the target financial indicator in the current period and the future period based on the financial feature data in the historical period by utilizing the pre-trained target RL-GAN model, so that the predicted data curve of the target financial indicator corresponding to the current period and the actual data curve of the target financial indicator in the current period can be compared / calculated, and then the probability of occurrence of the target financial risk in the future period can be accurately and reasonably determined based on the comparison / calculation results, and subsequently the financial risk can be accurately predicted based on the occurrence probability and the predicted data curve of the future period, thereby improving the accuracy of the financial prediction results.

[0072] Another embodiment of the present application provides a financial risk prediction method. In this embodiment, before performing stationarity detection for each initial feature data of the same feature type according to the corresponding historical moment, the method further includes: performing anomaly detection for each initial feature data of the same feature type to convert the abnormal initial feature data to obtain the initial feature data after anomaly processing for stationarity detection. That is to say, before performing stationarity detection, it is necessary to perform anomaly detection on the initial feature data to clean the initial feature data. Specifically, the Z-score method can be used to identify and process outliers, and perform necessary conversions on the abnormal feature data, such as logarithmic transformation, to stabilize the variance and ensure data quality. In this embodiment, Z-score is also called a standard score, which represents the distance between the data point and the average value, and is measured in standard deviation units. Specifically, the average value X' and the standard deviation S can be calculated for each initial feature data of the same feature type, and then the initial feature data X and X' of the same feature type are added to obtain the difference, and finally the difference is divided by the standard deviation S to obtain the Z score corresponding to the initial feature data. Thus, each initial feature data will correspond to a Z score, and then the Z scores corresponding to each initial feature data will be compared with the corresponding Z-score threshold, so as to determine whether each initial feature data is an outlier. In this embodiment, the Z-score threshold can be specifically set to 3 or -3, and can also be adjusted according to actual needs. If the Z score corresponding to the initial feature data is greater than 3 or less than -3, it means that the data point is more than 3 standard deviations away from the mean value, then the initial feature data corresponding to the Z score can be determined as an outlier, and then further deletion, conversion and other methods can be adopted to perform abnormal processing to obtain the initial feature data after abnormal processing. In this embodiment, by performing data processing on the initial feature data, the initial feature data after processing can be made more accurate and reliable, which lays the foundation for subsequent accurate data prediction based on the initial feature data. In the specific implementation process, each initial feature data can also be processed for missing values ​​before performing abnormal detection.

[0073] Another embodiment of the present application provides a financial risk prediction method. In this embodiment, for each initial feature data of the same feature type, a stationarity test is performed according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity condition. The specific process is as follows: for each initial feature data of the same feature type, the time series data is sorted in chronological order to obtain time series data; the time series data is tested based on the predetermined unit root test ADF method to determine the unit root statistic; based on the unit root statistic and the predetermined critical value, it is determined whether the time series data meets the preset stationarity condition, and when the time series data does not meet the preset stationarity condition, the time series data is differentially processed to obtain a number of target feature data that meet the preset stationarity condition. Specifically, when the unit root statistic is less than or equal to the predetermined critical value, it is determined that the time series data meets the preset stationarity condition; when the unit root statistic is greater than the predetermined critical value, it is determined that the time series data does not meet the preset stationarity condition.

[0074] In this embodiment, by drawing a time series graph based on each initial feature data, the trend and seasonality of the feature data are observed in turn, and a stationarity test is performed subsequently. Differential processing can be performed for non-stationary time series to obtain target feature data that meets the preset stationarity conditions. In this embodiment, the ADF test can first be used to test the stationarity of time series (such as stock prices, market indices, etc.). If it is found that the time series is non-stationary, it is usually necessary to perform differential or other transformations on it to make it stationary, so as to obtain a number of target feature data that meet the preset stationarity conditions. A stationary time series helps to improve the accuracy and reliability of the prediction model.

[0075] Another embodiment of the present application provides a financial risk prediction method. In this embodiment, before using the pre-trained target RL-GAN model to predict the data of the target financial indicator based on the target feature data set, the target RL-GAN model can be trained first. The specific model training process is as follows:

[0076] Step 1: Based on the target financial risk, a target characteristic data sample set corresponding to a target financial indicator in a first historical period is obtained; the target financial indicator is a financial indicator used to characterize the target financial risk;

[0077] Step (1), sample data collection. Based on the target financial risk, obtain initial feature data samples of several feature types corresponding to the target financial indicator within the sample historical period; the target financial indicator is a financial indicator used to characterize the target financial risk; the sample historical period in this step can be 2 years, 1 year, half a year, 3 months, 1 month, etc., which can be adjusted and set as needed.

[0078] Step (2), sample data processing. For each initial feature data sample of the same feature type, a stationarity test is performed according to the corresponding historical moment to obtain a number of target feature data samples that meet the preset stationarity conditions, so as to obtain a target feature data sample set containing each target feature data sample of each feature type;

[0079] In this step, since several types of features are collected, and each type of feature contains several initial feature data samples, a stationarity test can be performed on each initial feature data sample of the same type of feature. In this step, before performing a stationarity test, an anomaly test can be performed on several initial feature data samples of the same type of feature to convert the abnormal initial feature data samples and obtain the abnormally processed initial feature data samples for stationarity test. The specific anomaly detection process is the same as the anomaly detection process for the initial feature data in the above embodiment, and will not be repeated here.

[0080] In this embodiment, after obtaining the initial feature data sample after exception processing, a stationarity test can be further performed. The specific process of the stationarity test is the same as the detection process for the initial feature data in the above embodiment, and will not be repeated here.

[0081] Step (3) Sample data segmentation: The data set is divided into a training set, a validation set, and a test set. The data set is usually segmented in chronological order. The training set is mostly historical data, and the ratio is usually 70-15-15.

[0082] Taking the target historical period as 1 year as an example, the training set after segmentation in this step can include the first 70% of the sample data within the whole year, the validation set can include the middle 15% of the sample data within the whole year, and the verification set can include the last 15% of the sample data within the whole year.

[0083] Step (4), for each target feature data sample of each feature type in the training set, the validation set, and the test set, obtain the target feature data sample set of the first historical period corresponding to the training set, the target feature data sample set of the first historical period corresponding to the validation set, and the target feature data sample set of the first historical period corresponding to the test set.

[0084] In this step, since the time range of the first historical period can be set according to actual needs, the training set, the test set, and the validation set can contain one or more first historical periods, so that the target feature data samples in the training set can be divided into one target feature data sample set or multiple target feature data sample sets. For example, the time span of the training set is January-December of x year, and thus several first historical periods are determined according to the predetermined time range. For example, January, February, March, April...November of x year can be respectively used as the first historical period, thereby obtaining several first historical periods. January-March, April-June, July-September, and October-December of x year can also be used as the first historical periods. The time range of the first historical period can be adjusted according to actual needs. After determining several first historical periods, the target feature data sample set corresponding to the first historical period can be obtained.

[0085] In this embodiment, taking the target financial risk as the industry development trend risk as an example, when the industry growth rate is negative, it indicates that the industry has a downside risk. Therefore, the target financial indicator corresponding to the target financial risk is the industry growth rate. Then the feature types in the target feature data sample set may include: consumer demand, number of technological innovations, number of policies and regulations issued, and cost amount. Each feature type will correspond to a number of target feature data samples.

[0086] Step 2: Obtain a first label data curve of a target financial indicator in a second historical period corresponding to the first historical period, and simultaneously obtain a second label data curve of a target financial indicator in a third historical period corresponding to the first historical period, so as to associate the first label curve and the second label curve with a target feature data sample set corresponding to the first historical period; the first historical period is earlier than the second historical period, and the second historical period is earlier than the third historical period.

[0087] In this step, when the training set, the test set, and the validation set respectively contain several target feature data sample sets, the corresponding second historical period and the third historical period can be determined for the first historical period corresponding to each feature data sample set, and then the label data curve of the target financial indicator in the second historical period and the label data curve of the target financial indicator in the third historical period are obtained. Thus, each feature data sample set corresponds to two label data curves.

[0088] For example, if January of year x is taken as the first historical period, then February of year x is the second historical period corresponding to the first historical period, and March is the third historical period corresponding to the first historical period. Alternatively, January-March, April-June, and July-September of year x are taken as the first historical periods respectively; then April-June of year x is the second historical period of January-March, and July-September of year x is the third historical period of January-March; July-September of year x is the second historical period of April-June, and October-December of year x is the third historical period of April-June; and so on, each first historical period (historical period) corresponds to a second historical period (current period) and a third historical period (future period).

[0089] In this step, the second historical period and the third historical period corresponding to each target feature data sample set can be determined based on the first historical period corresponding to each target feature data sample set, and then the first label data curve of the target financial indicator in the second historical period and the second label data curve of the target financial indicator in the third historical period can be further obtained, that is, the data curve label of the sample feature data set is obtained. In other words, each first historical period corresponds to a target sample feature data set, and each target sample feature data set corresponds to two data curve labels. Subsequently, the initial RL-GAN model can be trained based on each sample feature data set and the corresponding data curve labels.

[0090] Step three: based on each target feature data sample in each target feature data sample set, use the initial RL-GAN model to predict the data of the target financial indicator, and obtain the predicted data curve of the target financial indicator for the second historical period and the predicted data curve of the target financial indicator for the third historical period; and based on the predicted data curve of the second historical period, the label data curve of the second historical period, the first label curve and the second label curve associated with the target feature data sample set, adjust the model parameters of the initial RL-GAN model until the predicted data curve for the second historical period and the predicted data curve for the third historical period predicted by the adjusted current RL-GAN model meet the predetermined training stop condition, stop model training and obtain the target RL-GAN model.

[0091] In this step, the RL-GAN model has stronger expressiveness and stronger ability to process continuous data than the traditional GAN, and has the characteristics of reinforcement learning and generative adversarial networks. This combination enables RL-GAN to learn from the environment and generate synthetic samples that meet specific risk attributes, and continuously optimize the generation strategy to meet the needs of risk prediction.

[0092] In this embodiment, the RL-GAN model can perform risk prediction, mainly because it combines reinforcement learning and generative adversarial network mechanisms. In the RL-GAN model, it includes: a generator, a discriminator, and a reinforcement learning agent module. The generator can generate samples with specific risk attributes according to the state of the environment by learning the generation strategy of synthetic samples. At the same time, the discriminator evaluates whether these generated samples meet the expected risk attributes, thereby guiding the generator to continuously optimize the generation strategy. This adversarial learning mechanism enables RL-GAN to gradually improve the quality of generated samples, thereby meeting specific risk prediction needs.

[0093] Specifically, the generator receives state information from the environment and generates synthetic samples that may meet specific risk attributes based on the current strategy. The reinforcement learning agent adjusts the generator's strategy based on the environmental reward signal to make the generated synthetic samples more consistent with the expected risk attributes. During the training process, the generator continuously optimizes its own generation strategy to generate synthetic samples with more risk attributes. At the same time, the discriminator, as the adversarial party, evaluates the samples output by the generator and guides the generator to improve in a direction that is more consistent with the expected risk attributes, thereby improving the quality of the synthetic samples.

[0094] Therefore, the key to RL-GAN's ability to perform risk prediction is that it uses an adversarial learning mechanism to allow the generator to gradually learn how to generate synthetic samples that meet specific risk attributes. At the same time, the discriminator continuously improves its ability to distinguish synthetic samples, which enables RL-GAN to gradually improve the quality of generated samples and meet specific risk prediction needs.

[0095] In this embodiment, when constructing the RL-GAN model for risk prediction, the complexity and diversity of risk data are taken into account. Therefore, when constructing the RL-GAN model, the state space and action space are first defined so that the generator and reinforcement learning algorithm can operate effectively. For risk prediction, the state space can be constructed based on each target feature data sample in the target feature data sample set, and then the label data curve corresponding to the target feature data sample set is used as the action space. That is, the state space can include various risk-related features, such as transaction amount, transaction frequency, customer attributes, etc. These features can be encoded in vector form and used as a representation of the state. The action space represents the output space of the generator, that is, the generated prediction data curve. In this space, the generator needs to learn to generate risk data samples / prediction data curves that conform to the real distribution. The second is to design the reward function, which directly affects the learning process of the generator. In risk prediction, the reward function can be defined according to business needs. For example, for financial transaction risk prediction, the reward function can be designed to minimize the difference between synthetic risk data and real risk data so that the generator can generate more realistic risk data samples. In addition, it is also possible to consider introducing other factors, such as different risk levels, to guide the generator to produce samples with specific risk attributes.

[0096] In this embodiment, the generator is an important component of RL-GAN, and its main task is to receive state information from the environment and generate synthetic samples that meet specific risk attributes. That is, the predicted data curve of the target financial indicator in the second historical period and the predicted data curve of the target financial indicator in the third historical period are generated according to each target feature data sample in the target feature data sample set. Among them, the second historical period can be understood as the current period corresponding to the first historical period, and the third historical period can be understood as the future period corresponding to the first historical period. In this embodiment, the generator is based on a deep neural network structure and can adopt a variety of structures, such as a convolutional neural network, a recurrent neural network or a variational autoencoder. The generator of this embodiment can be composed of continuous layers, including fully connected layers, batch normalization layers and deconvolution layers connected in sequence. The combination of these layers can convert the input random noise into an image similar to the training data. During the training process, the goal of the generator is to continuously improve the generation strategy to generate synthetic samples that better meet specific needs.

[0097] The discriminator is responsible for evaluating the realism of the synthetic sample / prediction data curve output by the generator, that is, distinguishing whether the generated sample is a real sample or a forged sample. The discriminator is also usually based on a deep neural network, and its training goal is to maximize the ability to distinguish between real samples and synthetic samples. This embodiment uses several consecutive convolutional layers, LeakyReLU activation functions and Dropout layers to implement the discriminator. The combination of these layers can process the image of the input prediction data curve and output a value for judging whether the image of the input prediction data curve is real or fake. As the training progresses, the robustness of the discriminator will increase, so as to better distinguish the authenticity of the synthetic samples, thereby prompting the generator to generate more realistic samples.

[0098] The reinforcement learning agent is the driving force of the entire RL-GAN model. It is responsible for interacting with the environment, selecting actions and receiving environmental reward signals. Reinforcement learning agents usually use deep reinforcement learning algorithms, such as deep Q networks, deep deterministic policy gradients, or actor-critic methods. In RL-GAN, the task of the reinforcement learning agent is to adjust the generation strategy of the generator, that is, to adjust the model parameters of the generator and the discriminator so that the generated samples can better meet the specific risk attribute requirements. This embodiment uses a simple Q-learning reinforcement learning agent to implement the reinforcement learning agent. By defining parameters such as the state space size, action space size, learning rate, discount factor, and exploration rate, and initializing the Q value table, the method of selecting actions and updating Q values ​​is implemented. Through interaction and training with the environment, the reinforcement learning agent continuously optimizes the strategy of the generator so that the synthetic samples it generates are more in line with expectations.

[0099] Furthermore, in this example, when training the model, TensorFlow can be used to train the model in accordance with the mathematical system. First, the train_step function is used to define a step operation of the training, and the target feature data sample set in the training set is fed to the generator through the noise vector to generate a false image, that is, to generate a predicted data curve corresponding to the target feature data sample set. Then, the forward propagation process of the generator and the discriminator is recorded through two independent gradient tapes. In the gradient tape of the generator, the loss of the generator is calculated (that is, the difference between the predicted data curve output by the discriminator and the label data curve is calculated). In the gradient tape of the discriminator, the loss of the discriminator is calculated (that is, the difference between the real image and the real label, and the difference between the false image and the false label is calculated, that is, the real image can output a value through convolution calculation, and the predicted pattern can also output a value through calculation. The smaller the error between these two values, the more real the predicted image is), and the calculated gradient is used to update the parameters of the generator and the discriminator. In the actual training process, by using the automatic differentiation function of TensorFlow and using tf.GradientTape() to calculate the gradient of the loss function relative to the model parameters, the calculated gradient can be made more accurate. Subsequently, the optimizer’s apply_gradients method can be used to update the model parameters according to the gradients. This operation is performed through multiple iterations, each time a batch of data is randomly sampled from the dataset for processing, and the parameters of the generator and discriminator are updated through backpropagation until the predetermined number of iterations or other stopping conditions are reached.

[0100] In this embodiment, when evaluating the quality of samples generated by the generator, traditional GAN ​​evaluation indicators such as Inception Score (IS), Fréchet Inception Distance (FID), etc. can be used. These indicators can help evaluate the diversity and realism of samples generated by the generator. The discriminator's performance indicators (such as accuracy, recall, etc.) are monitored to evaluate its ability to identify real samples and generated samples. If the discriminator cannot effectively distinguish between real and generated samples, the generator may need further improvement. For the reinforcement learning part, the reward function needs to be carefully designed, and the performance of the agent in the environment is evaluated through the reward curve during the training process: The training of RL-GAN is usually more complicated, and the stability of the generator and discriminator during the training process needs to be evaluated. Monitor the loss functions of the generator and discriminator and ensure that they can converge to a stable state.

[0101] In this embodiment, taking the target financial risk as the industry development trend risk and the target financial indicator as the industry growth rate as an example, by collecting the target feature data sample set corresponding to the first historical period, which includes four feature types, namely, consumer demand, number of technological innovations, number of policies and regulations issued, and cost amount, and then transmitting the target feature data sample set and the first label data curve and the second label data curve corresponding to the target feature data sample set to the initial RL-GAN model for model training, the target RL-GAN model containing the corresponding relationship between the consumer demand change, the technological innovation number, the number of policies and regulations issued, and the cost amount change data and the industry growth rate can be trained and obtained. Subsequently, the target RL-GAN model can be used to predict the target financial indicator value for the target feature data set of the target historical period (August), so as to accurately predict the predicted data curve corresponding to the current period (September) and the predicted data curve corresponding to the future period (October).

[0102] In this embodiment, after the current RL-GAN model is obtained based on training of the training set, the current RL-GAN model can be further tested and verified based on each target feature data sample set and the corresponding label data curve in the test set, and the target feature data sample set and the corresponding label data curve in the validation set, so as to further optimize the current RL-GAN model and obtain the target RL-GAN model.

[0103] Another embodiment of the present application provides a financial risk prediction device, such as Figure 2 As shown, including:

[0104] An acquisition module 11 is used to determine a target financial indicator for characterizing the target financial risk based on the target financial risk to be predicted, and to acquire initial feature data of a plurality of feature types corresponding to the target financial indicator within a predetermined target historical period;

[0105] The detection module 12 is used to perform a stationarity detection on each initial feature data of the same feature type according to the corresponding historical moment, and obtain a number of target feature data that meet the preset stationarity condition, so as to obtain a target feature data set including each target feature data of each feature type;

[0106] The data prediction module 13 predicts the data of the target financial indicator by using the pre-trained target RL-GAN model based on the target feature data set, and obtains the predicted data curve of the target financial indicator in the current period and the predicted data curve of the target financial indicator in the future period;

[0107] The risk prediction module 14 determines the probability of occurrence of the target financial risk based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0108] In the specific implementation process of this embodiment, the financial risk prediction device also includes a processing module, which is used to: perform anomaly detection on each initial feature data of the same feature type, so as to convert the abnormal initial feature data and obtain the initial feature data after anomaly processing for stability detection.

[0109] In the specific implementation process of this embodiment, the detection module is specifically used to: sort the initial feature data of the same feature type in chronological order to obtain time series data; detect the time series data based on a predetermined unit root test ADF method to determine the unit root statistic; determine whether the time series data meets the preset stationarity condition based on the unit root statistic and a predetermined critical value, and when the time series data does not meet the preset stationarity condition, perform differential processing on the time series data to obtain a number of target feature data that meet the preset stationarity condition.

[0110] In the specific implementation process of this embodiment, the detection module is specifically used to: when the unit root statistic is less than or equal to a predetermined critical value, determine that the time series data meets the preset stationarity condition; when the unit root statistic is greater than a predetermined critical value, determine that the time series data does not meet the preset stationarity condition.

[0111] In the specific implementation process of this embodiment, the target RL-GAN model adopts a three-layer architecture, including: a generator, a discriminator, and a reinforcement learning agent module;

[0112] The generator comprises: a convolutional neural network, a recurrent neural network or a variational autoencoder; the generator is used to generate a prediction data curve of the target financial indicator of the current period corresponding to the target feature data set, and a prediction data curve of the target financial indicator of the future period corresponding to the target feature data set based on each target feature data in the target feature data set, a first correspondence between the feature data of the historical period and the financial indicator of the current period, and a second correspondence between the feature data of the historical period and the financial indicator of the future period;

[0113] The discriminator comprises: a convolution layer, a LeakyReLU activation function and a Dropout layer connected in sequence; the discriminator is used to discriminate the prediction data curve generated by the generator to obtain the authenticity of each prediction data in the prediction data curve;

[0114] The reinforcement learning agent module includes: a deep Q network, a deep deterministic policy gradient or an actor-critic algorithm; the reinforcement learning agent module is used to update the model parameters of the generator in real time based on the authenticity of each predicted data in the predicted data curve to obtain an updated current target RL-GAN model.

[0115] In the specific implementation process of this embodiment, before using the pre-trained target RL-GAN model to perform data prediction of the target financial indicator based on the target feature data set, the method further includes: training to obtain the target RL-GAN model, specifically including:

[0116] Based on the target financial risk, obtaining a target feature data sample set corresponding to the target financial indicator in the first historical period;

[0117] Acquire a first label data curve of a target financial indicator in a second historical period corresponding to the first historical period, and simultaneously acquire a second label data curve of a target financial indicator in a third historical period corresponding to the first historical period, so as to associate the first label curve and the second label curve with a target feature data sample set corresponding to the first historical period; the first historical period is earlier than the second historical period, and the second historical period is earlier than the third historical period;

[0118] Based on each target feature data sample in each target feature data sample set, the initial RL-GAN model is used to perform data prediction of the target financial indicator to obtain a predicted data curve of the target financial indicator for the second historical period and a predicted data curve of the target financial indicator for the third historical period; and based on the predicted data curve for the second historical period, the label data curve for the second historical period, the first label curve and the second label curve associated with the target feature data sample set, the model parameters of the initial RL-GAN model are adjusted until the predicted data curve for the second historical period and the predicted data curve for the third historical period predicted by the adjusted current RL-GAN model meet the predetermined training stop condition, the model training is stopped to obtain the target RL-GAN model.

[0119] In the specific implementation process of this embodiment, the financial risk prediction device further includes an establishment module, which is used to: before determining the target financial indicator used to characterize the target financial risk, pre-establish a first correspondence between each financial risk and each financial indicator, and establish a second correspondence between each financial indicator and each feature type;

[0120] The financial risks include any one or more of the following: industry development trend risk, credit risk, liquidity risk and operational risk;

[0121] The financial indicators include any one or more of the following: GDP growth rate, unemployment rate, industry growth rate, inflation rate, balance of payments and gross domestic product;

[0122] The types of characteristics include any one or more of the following: changes in consumer demand, the number of technological innovations, the number of policies and regulations issued, and changes in cost amounts.

[0123] A financial risk prediction device in this example, by utilizing a pre-trained target RL-GAN model, can accurately predict the predicted data curves of target financial indicators in the current period and future periods based on the financial feature data in the historical period, so that the predicted data curve of the target financial indicator corresponding to the current period and the actual data curve of the target financial indicator in the current period can be compared / calculated, and then the probability of occurrence of the target financial risk in the future period can be accurately and reasonably determined based on the comparison / calculation results, and subsequently the financial risk can be accurately predicted based on the occurrence probability and the predicted data curve of the future period, thereby improving the accuracy of the financial prediction results.

[0124] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0125] Step 1: based on the target financial risk to be predicted, determine the target financial indicator used to characterize the target financial risk, and obtain initial feature data of several feature types corresponding to the target financial indicator within a predetermined target historical period;

[0126] Step 2: for each initial feature data of the same feature type, perform a stationarity test according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set containing each target feature data of each feature type;

[0127] Step 3: Based on the target feature data set, use the pre-trained target RL-GAN model to predict the data of the target financial indicator, and obtain the predicted data curve of the target financial indicator in the current period and the predicted data curve of the target financial indicator in the future period;

[0128] Step 4: Based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, determine the probability of occurrence of the target financial risk, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0129] The specific implementation process of the above method steps can be found in the embodiments of any of the above financial risk prediction methods, and this embodiment will not be repeated here.

[0130] The storage medium in the present application, by utilizing the target RL-GAN model obtained through pre-training, can accurately predict the predicted data curves of the target financial indicators in the current period and the future period based on the financial feature data in the historical period, so that the predicted data curve of the target financial indicator corresponding to the current period and the actual data curve of the target financial indicator in the current period can be compared / calculated, and then the probability of occurrence of the target financial risk in the future period can be accurately and reasonably determined based on the comparison / calculation results, and subsequently the financial risk can be accurately predicted based on the occurrence probability and the predicted data curve of the future period, thereby improving the accuracy of the financial prediction results.

[0131] Another embodiment of the present application provides an electronic device, such as Figure 3 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:

[0132] Step 1: based on the target financial risk to be predicted, determine the target financial indicator used to characterize the target financial risk, and obtain initial feature data of several feature types corresponding to the target financial indicator within a predetermined target historical period;

[0133] Step 2: for each initial feature data of the same feature type, perform a stationarity test according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set containing each target feature data of each feature type;

[0134] Step 3: Based on the target feature data set, use the pre-trained target RL-GAN model to predict the data of the target financial indicator, and obtain the predicted data curve of the target financial indicator in the current period and the predicted data curve of the target financial indicator in the future period;

[0135] Step 4: Based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, determine the probability of occurrence of the target financial risk, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

[0136] The specific implementation process of the above method steps can be found in the embodiments of any of the above financial risk prediction methods, and this embodiment will not be repeated here.

[0137] The electronic device in the present application, by utilizing the pre-trained target RL-GAN model, can accurately predict the predicted data curves of the target financial indicators in the current period and the future period based on the financial feature data in the historical period, so that the predicted data curve of the target financial indicator corresponding to the current period and the actual data curve of the target financial indicator in the current period can be compared / calculated, and then the probability of occurrence of the target financial risk in the future period can be accurately and reasonably determined based on the comparison / calculation results, and subsequently the financial risk can be accurately predicted based on the occurrence probability and the predicted data curve of the future period, thereby improving the accuracy of the financial prediction results.

[0138] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A financial risk prediction method, characterized in that: include: Based on the target financial risk to be predicted, determine a target financial indicator for characterizing the target financial risk, and obtain initial feature data of several feature types corresponding to the target financial indicator within a predetermined target historical period; For each initial feature data of the same feature type, a stationarity test is performed according to the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set including each target feature data of each feature type; Based on the target feature data set, using the pre-trained target RL-GAN model to perform data prediction of the target financial indicator, and obtain a predicted data curve of the target financial indicator for the current period and a predicted data curve of the target financial indicator for the future period; Based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, the probability of occurrence of the target financial risk is determined, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

2. The method according to claim 1, characterized in that Before performing a stationarity test on each initial feature data of the same feature type according to the corresponding historical moment, the method further includes: Anomaly detection is performed on each initial feature data of the same feature type to convert the abnormal initial feature data to obtain the abnormally processed initial feature data for stationarity detection.

3. The method according to claim 1, characterized in that The initial feature data of the same feature type are subjected to a stationarity test at the corresponding historical moment to obtain a number of target feature data that meet the preset stationarity conditions, specifically including: The initial feature data of the same feature type are sorted in chronological order to obtain time series data; Testing the time series data based on a predetermined unit root test ADF method to determine a unit root statistic; Based on the unit root statistic and a predetermined critical value, determine whether the time series data meets the preset stationarity condition, and when the time series data does not meet the preset stationarity condition, perform differential processing on the time series data to obtain a number of target feature data that meet the preset stationarity condition.

4. The method according to claim 3, characterized in that The determining, based on the unit root statistic and the predetermined critical value, whether the time series data meets the preset stationarity condition specifically includes: When the unit root statistic is less than or equal to a predetermined critical value, determining that the time series data meets the preset stationarity condition; When the unit root statistic is greater than a predetermined critical value, it is determined that the time series data does not meet the preset stationarity condition.

5. The method according to claim 1, characterized in that The target RL-GAN model adopts a three-layer architecture, including: a generator, a discriminator, and a reinforcement learning agent module; The generator comprises: a convolutional neural network, a recurrent neural network or a variational autoencoder; the generator is used to generate a prediction data curve of the target financial indicator of the current period corresponding to the target feature data set, and a prediction data curve of the target financial indicator of the future period corresponding to the target feature data set based on each target feature data in the target feature data set, a first correspondence between the feature data of the historical period and the financial indicator of the current period, and a second correspondence between the feature data of the historical period and the financial indicator of the future period; The discriminator comprises: a convolution layer, a LeakyReLU activation function and a Dropout layer connected in sequence; the discriminator is used to discriminate the prediction data curve generated by the generator to obtain the authenticity of each prediction data in the prediction data curve; The reinforcement learning agent module includes: a deep Q network, a deep deterministic policy gradient or an actor-critic algorithm; the reinforcement learning agent module is used to update the model parameters of the generator in real time based on the authenticity of each predicted data in the predicted data curve to obtain an updated current target RL-GAN model.

6. The method according to claim 1, characterized in that Before using the pre-trained target RL-GAN model to predict the data of the target financial indicator based on the target feature data set, the method further includes: training the target RL-GAN model, specifically including: Based on the target financial risk, obtaining a target feature data sample set corresponding to the target financial indicator in the first historical period; Acquire a first label data curve of a target financial indicator in a second historical period corresponding to the first historical period, and simultaneously acquire a second label data curve of a target financial indicator in a third historical period corresponding to the first historical period, so as to associate the first label curve and the second label curve with a target feature data sample set corresponding to the first historical period; the first historical period is earlier than the second historical period, and the second historical period is earlier than the third historical period; Based on each target feature data sample in each target feature data sample set, the initial RL-GAN model is used to perform data prediction of the target financial indicator to obtain a predicted data curve of the target financial indicator for the second historical period and a predicted data curve of the target financial indicator for the third historical period; and based on the predicted data curve for the second historical period, the label data curve for the second historical period, the first label curve and the second label curve associated with the target feature data sample set, the model parameters of the initial RL-GAN model are adjusted until the predicted data curve for the second historical period and the predicted data curve for the third historical period predicted by the adjusted current RL-GAN model meet the predetermined training stop condition, the model training is stopped to obtain the target RL-GAN model.

7. The method according to claim 1, characterized in that Before determining the target financial indicator for characterizing the target financial risk, the method further includes: Establishing in advance a first correspondence between each financial risk and each financial indicator, and establishing a second correspondence between each financial indicator and each characteristic type; The financial risks include any one or more of the following: industry development trend risk, credit risk, liquidity risk and operational risk; The financial indicators include any one or more of the following: GDP growth rate, unemployment rate, industry growth rate, inflation rate, balance of payments and gross domestic product; The types of characteristics include any one or more of the following: changes in consumer demand, the number of technological innovations, the number of policies and regulations issued, and changes in cost amounts.

8. A financial risk prediction device, characterized in that: include: An acquisition module, used to determine a target financial indicator for characterizing the target financial risk based on the target financial risk to be predicted, and to acquire initial feature data of a plurality of feature types corresponding to the target financial indicator within a predetermined historical period; A detection module is used to perform a stationarity detection on each initial feature data of the same feature type according to the corresponding historical moment, and obtain a number of target feature data that meet the preset stationarity conditions, so as to obtain a target feature data set including each target feature data of each feature type; A data prediction module, based on the target feature data set, uses a pre-trained target RL-GAN model to perform data prediction of the target financial indicator, and obtains a predicted data curve of the target financial indicator for the current period and a predicted data curve of the target financial indicator for the future period; The risk prediction module determines the probability of occurrence of the target financial risk based on the predicted data curve of the target financial indicator of the current period and the actual data of the target financial indicator of the current period, so that when the probability of occurrence is greater than a predetermined probability threshold, the predicted data curve in the future period is used as the prediction result of the target financial risk.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the financial risk prediction method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The method at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the financial risk prediction method according to any one of claims 1 to 7 when executing the computer program on the memory.