Repurchase transaction risk early warning method based on credit curved surface
By building a credit surface in repurchase transactions and combining machine learning models, the problems of untimely monitoring and inaccurate predictions in the existing technology are solved, and accurate monitoring and early warning of repurchase transaction risks are achieved, and monitoring efficiency and early warning accuracy are improved.
Patent Information
- Application Number
- CN202411849246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-16
AI Technical Summary
When the existing technology faces complex and dynamically changing markets, it has problems such as untimely monitoring and inaccurate predictions, and it is difficult to effectively deal with new and unknown risks brought about by changes in market conditions.
A repurchase transaction risk warning method based on credit surface is proposed. By obtaining repurchase transaction data for data preprocessing, the three-dimensional credit surface is constructed using B-spline surface fitting and polynomial surface fitting methods. Combining unsupervised learning and supervised learning models, abnormal transaction behaviors are identified and risk warnings are performed.
Accurate monitoring and early warning of repurchase transaction risks has been achieved, monitoring efficiency and early warning accuracy have been improved, abnormal trading behaviors can be identified in a timely manner, and the complex development and regulatory needs of modern financial markets have been met.
Smart Images

Figure CN120013659A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial risk management, and in particular to a repurchase transaction risk early warning method based on a credit surface. Background Art
[0002] Existing technologies mainly focus on traditional repo market monitoring methods, which rely on expert judgment and historical data comparison to evaluate abnormal market behavior and predict repo rates. However, these traditional methods have some obvious limitations. First, although expert judgment can provide rapid risk identification in some cases, it is easily interfered by subjective factors and it is difficult to achieve comprehensive and objective market monitoring. Second, although the historical data comparison method can discover certain trends based on past data, it cannot effectively deal with new and unknown risks brought about by changes in market conditions. In a complex market environment, relying solely on historical data may miss some sudden abnormal situations, resulting in inaccurate monitoring results.
[0003] In addition, with the rapid growth of the interbank bond market, the business model and transaction behavior of the market have become increasingly complex. Simply relying on manual experience and traditional historical data comparison methods can obviously no longer meet the needs of modern supervision. The early warning mechanism of traditional methods is usually based on simple statistical analysis, ignoring the potential correlation and dynamic changes in complex market data. Therefore, it is impossible to conduct real-time and efficient monitoring and early warning of complex and changing market conditions.
[0004] In this context, the regulatory authorities require strengthening the supporting role of digital supervision and explicitly propose to improve the monitoring capabilities of market risks from a digital perspective. This not only requires improving monitoring efficiency through technical means, but also emphasizes the use of data for more accurate forecasting and early warning. The regulatory authorities hope to provide more powerful support for preventing and resolving risks through efficient data analysis and processing capabilities. Therefore, how to use digital technology, especially emerging technologies such as big data and machine learning, to improve the forecasting accuracy and risk identification capabilities of the repo market has become an important direction for current technological development.
[0005] In summary, when facing complex and dynamically changing markets, existing technologies still have problems with untimely monitoring and inaccurate predictions. It is urgent to introduce more advanced technical means to improve monitoring efficiency and early warning accuracy to meet the complex development and regulatory needs of modern financial markets. Summary of the invention
[0006] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0007] To this end, the first purpose of this application is to propose a repurchase transaction risk early warning method based on a credit surface.
[0008] The second purpose of this application is to propose a repurchase transaction risk early warning device based on a credit surface.
[0009] The third objective of the present application is to provide an electronic device.
[0010] A fourth objective of the present application is to provide a computer-readable storage medium.
[0011] A fifth object of the present application is to provide a computer program product.
[0012] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a repurchase transaction risk early warning method based on a credit surface, comprising:
[0013] Acquire repurchase transaction data and perform data preprocessing on it, wherein the preprocessing steps include data cleaning, encoding, merging and normalization processing;
[0014] Based on the preprocessed repo transaction data, a three-dimensional credit surface of pledge rate, collateral quality, and repo rate is constructed through B-spline surface fitting and polynomial surface fitting methods. The position and deviation distance of each repo transaction in the credit surface are calculated to evaluate its risk level.
[0015] Based on the fitted credit surface results, an unsupervised learning model is used to extract and reconstruct the features of the preprocessed repo transaction data. By calculating the reconstruction error, abnormal transaction behavior is identified to obtain the first risk warning result.
[0016] Based on the fitted credit surface results, the supervised learning model is used to classify and predict the preprocessed repo transaction data to obtain the second risk warning result;
[0017] The first risk warning result and the second risk warning result are weighted and combined to obtain a final risk warning result.
[0018] Optionally, the obtaining of repurchase transaction data and performing data preprocessing thereon includes:
[0019] Selecting the repurchase transaction data within multiple time periods, and performing data cleaning on the repurchase transaction data;
[0020] Encoding the character variables in the repurchase transaction data after data cleaning to convert them into digital data suitable for machine learning models;
[0021] For repurchase contracts involving multiple bonds, the weighted average method of the bond par value shall be used to consolidate them;
[0022] The real number data in the repurchase transaction data is subjected to minimum-maximum normalization processing to eliminate dimensional differences and magnitude differences, thereby improving the efficiency and accuracy of model training.
[0023] Optionally, the fitting step of the B-spline surface fitting method includes:
[0024] The B-spline surface is used to perform three-dimensional surface fitting on the pledge rate, collateral quality and repurchase rate in the repurchase transaction data after data preprocessing to construct a credit surface. The specific formula of the B-spline surface fitting method is:
[0025]
[0026] Where p(u,v) is a point on the fitted three-dimensional surface; B i,k (u) and B j,l (v) are the B-spline basis functions of parameters u and v with respect to the knot vectors; P i,j is the control point in the control point matrix, representing the point on the surface; n and m are the number of nodes in the direction of parameters u and v respectively.
[0027] Optionally, the fitting step of the polynomial surface fitting method includes:
[0028] The least squares fitting method is used to perform three-dimensional surface fitting on the pledge rate, collateral quality and repurchase rate in the repurchase transaction data after data preprocessing to construct a credit surface; wherein, for the polynomial with the highest degree of 2, the following polynomial is used to fit the three-dimensional surface, and the polynomial is:
[0029] z=ax 2 +by 2 +cxy+dx+ey+f
[0030] In the formula, x is the pledge rate, y is the quality of the collateral, z is the repurchase rate, and a, b, c, d, e, and f are the coefficients of the polynomial to be fitted.
[0031] Optionally, the unsupervised learning model uses an autoencoder, and the unsupervised learning model is used to extract and reconstruct features of the preprocessed repurchase transaction data, and abnormal transaction behavior is identified by calculating the reconstruction error to obtain a first risk warning result, including:
[0032] The preprocessed repurchase transaction data is input into an encoder, and the repurchase transaction data is upgraded to 32 dimensions by the encoder, and then gradually reduced to a hidden layer with a dimension of 4;
[0033] In the decoder, the reduced-dimensional data is gradually upgraded back to 32 dimensions from the hidden layer, and finally restored to the original input data dimension;
[0034] By calculating the reconstruction error, abnormal transaction behavior in the repurchase transaction data is identified and a first risk warning result is generated.
[0035] Optionally, the supervised learning model is an XGBoost model or a TabNet model, and the supervised learning model is used to classify and predict the preprocessed repurchase transaction data to obtain a second risk warning result, including:
[0036] In the XGBoost model, by constructing an integrated learning framework, the repurchase transaction data is trained multiple times, and the risk classification is performed using the optimized cost function to obtain the second risk warning result;
[0037] In the TabNet model, through the multi-layer decision structure and attention mechanism, the complex patterns of the repurchase transaction data are captured and the interpretability of the model is provided to obtain the second risk warning result.
[0038] The first part of risk warning results and the second part of risk warning results are combined to generate a comprehensive second risk warning result.
[0039] Optionally, weighted merging of the first risk warning result and the second risk warning result to obtain a final risk warning result includes:
[0040] The first risk warning result and the second risk warning result are combined using naive weighting, and the expression is:
[0041] c i =p*a i +(1-p)*b i
[0042] Alternatively, the first risk warning result and the second risk warning result are combined using the weighted probability square root, and the expression is:
[0043]
[0044] Alternatively, the first risk warning result and the second risk warning result are combined using weighted logic or, and the expression is:
[0045] a′ i =w a *a i
[0046] b′ i =w b *b i
[0047] c i =a i ′+b i ′-ai ′*b i '
[0048] In the formula, c i is the final risk warning result, a i is the first risk warning result, b i is the second risk warning result, p, w a 、w b is the weighting coefficient, a i ′ and b i ′ is the weighted result in weighted logical OR.
[0049] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a repurchase transaction risk warning device based on a credit surface, comprising:
[0050] A preprocessing module, used to obtain repurchase transaction data and perform data preprocessing on it, wherein the data preprocessing steps include data cleaning, encoding, merging and normalization processing;
[0051] The fitting module is used to construct a three-dimensional credit surface of pledge rate, collateral quality, and repo rate based on the preprocessed repo transaction data through B-spline surface fitting and polynomial surface fitting methods, calculate the position and deviation distance of each repo transaction in the credit surface, and evaluate its risk level;
[0052] The first risk warning module is used to extract and reconstruct the preprocessed repo transaction data based on the fitted credit surface result by using an unsupervised learning model, identify abnormal transaction behaviors by calculating the reconstruction error, and obtain the first risk warning result;
[0053] The second risk warning module is used to classify and predict the pre-processed repo transaction data using a supervised learning model based on the fitted credit surface result to obtain the second risk warning result;
[0054] The weighted merging module is used to weightedly merge the first risk warning result and the second risk warning result to obtain a final risk warning result.
[0055] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0056] The memory stores computer-executable instructions;
[0057] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0058] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0059] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, which implements any method in the first aspect when executed by a processor.
[0060] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0061] The present invention provides a repo transaction risk warning method based on a credit surface, which can accurately monitor and warn of repo transaction risks through multi-dimensional data analysis and a dynamic credit surface model. Compared with traditional methods, the present invention has higher accuracy and real-time performance, and can evaluate the risk level of transactions in real time and identify abnormal transaction behaviors in a timely manner through B-spline surface and polynomial surface fitting technology. By combining unsupervised learning and supervised learning models, the present invention has strong intelligence and interpretability in risk identification. This method not only improves monitoring efficiency, but also provides strong support for regulatory authorities to ensure the safe and stable operation of the repo market.
[0062] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0064] Figure 1 A flow chart of a repo transaction risk early warning method based on a credit surface provided in an embodiment of the present application;
[0065] Figure 2 A flow chart of a repo transaction risk early warning method based on a credit surface provided in an embodiment of the present application;
[0066] Figure 3 A schematic diagram of a B-spline surface provided in an embodiment of the present application.
[0067] Figure 4 A schematic diagram of the structure of the autoencoder model provided in an embodiment of the present application.
[0068] Figure 5 This is a predicted PR curve chart after the autoencoder + XGBoost warning results provided in the embodiment of the present application are combined.
[0069] Figure 6 This is a predicted PR curve diagram after combining the autoencoder + TabNet warning results provided in the embodiment of the present application;
[0070] Figure 7 A schematic diagram of the structure of a repurchase transaction risk warning device based on a credit surface provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0072] In view of the technical problems existing in the prior art, the embodiment of the present application provides a repurchase transaction risk early warning method based on a credit surface. Figure 1 and 2 The following is a flow chart of a repo transaction risk warning method based on a credit curve provided in an embodiment of the present application. Figure 1 and Figure 2 As shown, the method comprises the following steps:
[0073] Step 101, obtain repurchase transaction data and perform data preprocessing on it, the preprocessing steps include data cleaning, encoding, merging and normalization.
[0074] The core goal of this step is to ensure the quality and consistency of repurchase transaction data and provide a reliable basis for subsequent data analysis and risk assessment.
[0075] In the embodiment of the present application, repurchase transaction data within multiple time periods are first selected and then cleaned to remove invalid or duplicate data, correct erroneous records, and ensure the accuracy and consistency of the data.
[0076] In a possible embodiment, domestic pledged repurchase transaction data from three periods, from April to July 2019, from October to December 2020, and from March to April 2021, are used to detect abnormal transactions, with a total data volume of 2.1 million.
[0077] In addition, since the repo transaction data contains many character variables, such as the nature of the pledger's client, the nature of the pledgee's client, the nature of the bond, the bond rating, and other variables containing characters, and the machine learning model requires digital data input, it is necessary to encode these character variables. For example, the scores from 1 to 11 correspond to the pledger categories of fund specific client asset management, securities company asset management plans, commercial bank wealth management products, insurance products, comprehensive securities companies, rural commercial banks, rural credit cooperatives and associations, urban commercial banks, foreign banks, and national commercial banks; the bond ratings and scores correspond to: BBB+ (1), A- (2), A (3), A+ (4), AA- (5), AA (6), AA+ (7), AAA (8). For unrated bonds, the scores correspond to the bond types as follows: asset-backed securities (7), local government bonds (9), government-supported agency bonds (9), policy bank bonds (10), secondary capital instruments (10), special financial bonds (10), central bank bills (11), and treasury bonds (11).
[0078] In addition, for the case where multiple bonds are pledged in a repurchase contract, the embodiment of the present application uses the weighted average method of bond face value to merge the bond information. Specifically, the bond type, face value, valuation and rating information of each bond are weighted averaged to obtain the merged bond data, thereby ensuring that the merged data does not lose key information. This process ensures the integrity of the contract information and avoids information loss caused by multiple bond contracts in the analysis.
[0079] It is understandable that there are many different real-number data in the repurchase transaction data, and the dimension and magnitude differences of these data may have a negative impact on the machine learning model. In order to solve this problem, the embodiment of the present application uses Min-Max Scaling to normalize the data and map all real-number data to the range of [0,1]. Doing so not only eliminates the dimensional differences between different data, but also improves the convergence speed and prediction accuracy of model training.
[0080] Through the above steps, we can ensure that the repo transaction data has been strictly cleaned, encoded, merged and normalized, which can effectively remove noise and eliminate data bias, thereby improving the accuracy and stability of the risk warning model. Through these preprocessing steps, the availability and consistency of the data are guaranteed, which can provide high-quality input data for subsequent credit surface fitting and machine learning model training.
[0081] Step 102, based on the preprocessed repo transaction data, a three-dimensional credit surface of pledge rate, collateral quality, and repo rate is constructed through B-spline surface fitting and polynomial surface fitting methods, and the position and deviation distance of each repo transaction in the credit surface are calculated to evaluate its risk level.
[0082] This step aims to construct an accurate three-dimensional credit surface through B-spline surface fitting and polynomial surface fitting methods, combined with the key features of repo transaction data (pledge rate, collateral quality, repo rate), and calculate the position and deviation distance of each repo transaction in the credit surface, so as to evaluate the risk level of repo transactions.
[0083] In the embodiment of the present application, B-spline surface fitting is to describe the relationship between pledge rate, collateral quality and repurchase rate by establishing a three-dimensional credit surface model. This method can effectively handle complex nonlinear data relationships and is particularly suitable for repurchase transaction data with high dimensions and large data volumes. The mathematical formula for B-spline surface fitting is as follows:
[0084]
[0085] In the formula, p(u,v) is a point on the fitted three-dimensional surface, that is, a certain position on the credit surface, which represents the value of the repo transaction in the three-dimensional space; B i,k (u) and B j,l (v) are the B-spline basis functions of parameters u and v about the node vector, which represent the interpolation weights in each dimension and determine the shape and smoothness of the surface; P i,j are the control points in the control point matrix, which determine the overall shape of the surface. The fitting of the surface is affected by adjusting the values of these control points. n and m are the number of nodes in the directions of parameters u and v, respectively, which determine the complexity and fitting accuracy of the B-spline surface.
[0086] Specifically, the steps of B-spline surface fitting are: first, the pledge rate, collateral quality and repo rate in the repo transaction data are taken as input features; then, the appropriate B-spline basis function and node vector are selected according to the data distribution to ensure that the surface can be smoothly fitted; then, the control point P is calculated based on the preprocessed data. i,j And optimize the node vectors and control points to generate a fitting surface; finally, use the B-spline surface formula to calculate the credit surface p(u,v) to obtain a three-dimensional credit surface that can accurately describe the risk of repo transactions, such as Figure 3 The advantage of B-spline surface fitting is that it can flexibly fit complex nonlinear data, and at the same time has good smoothness, avoids overfitting, and ensures that the fitting results have good generalization ability.
[0087] In the embodiment of the present application, the polynomial surface fitting method uses a simple mathematical model to fit the repurchase transaction data, which is particularly suitable for when the data features are relatively simple or when a more intuitive model is desired. Through the least squares fitting method, the pledge rate, collateral quality and repurchase rate in the repurchase transaction data are fitted in three dimensions to obtain a polynomial model. The fitted polynomial formula is as follows:
[0088] z=ax 2 +by 2 +cxy+dx+ey+f
[0089] In the formula, x is the pledge rate, y is the quality of the collateral, and z is the repurchase rate, which represents the target variable in the credit surface; a, b, c, d, e, and f are the coefficients of the polynomial to be fitted, which are solved by the least squares method.
[0090] Specifically, the least squares fitting steps are as follows: the pledge rate, collateral quality and repo rate in the repo transaction data are taken as x, y, and z respectively; then, according to the above polynomial formula, a polynomial model about the pledge rate, collateral quality and repo rate is established, and the coefficients a, b, c, d, e, and f are optimized by the least squares method to minimize the error of the fitting model; finally, the obtained coefficients are used to perform a three-dimensional fitting of the repo transaction data to obtain the credit surface. Compared with B-spline surface fitting, this method has a faster calculation speed and is suitable for scenarios where the repo transaction data is relatively simple and the calculation efficiency is required to be high.
[0091] It should be noted that after constructing the credit surface, the next step is to conduct a risk assessment on each repo transaction. The core of this step is to calculate the position of each repo transaction on the credit surface and assess its risk based on its degree of deviation from the surface.
[0092] For each repo transaction, the embodiment of the present application calculates the deviation between the corresponding point on the surface and the actual value of the transaction by substituting its pledge rate, collateral quality and repo rate into the fitted credit surface equation. Then, according to the calculated deviation distance, a threshold can be set, and transactions with a deviation distance exceeding a certain proportion (such as 1%) are usually selected as high-risk transactions. The credit surface deviation of these transactions is large, which may reflect abnormal trading behavior and have potential risks.
[0093] As a possible implementation method, if the deviation probability of a repurchase transaction is lower than 1% (i.e., the deviation distance is greater than the set threshold), the transaction is marked as a high-risk transaction, and these high-risk transactions are used as label data for the supervised learning model for subsequent risk prediction and anomaly detection.
[0094] Through the two methods of B-spline surface fitting and polynomial surface fitting, this step can accurately integrate key factors such as pledge rate, collateral quality and repurchase rate into a unified credit surface model, and calculate the risk deviation of each repurchase transaction. Using this method, this application can not only monitor the risks of the repurchase market in real time, but also timely identify and warn potential risky transactions.
[0095] Step 103, based on the fitted credit surface result, an unsupervised learning model is used to extract and reconstruct the preprocessed repo transaction data, and abnormal transaction behavior is identified by calculating the reconstruction error to obtain the first risk warning result.
[0096] In this step, the unsupervised learning model, Auto-Encoder, is used to extract features and reconstruct the preprocessed repo transaction data. By calculating the reconstruction error, the Auto-Encoder can effectively identify abnormal transaction behaviors in the repo transaction data, thus providing support for subsequent risk warnings.
[0097] Figure 4 A schematic diagram of the structure of the autoencoder model provided in an embodiment of the present application.
[0098] It can be understood that the autoencoder is a typical unsupervised learning model that aims to reconstruct the original input data by learning a low-dimensional representation of the data. The core idea is to compress and map the data through the encoding part of the network, and then restore the data through the decoding part. The training goal is to minimize the difference between the input data and the reconstructed data. The autoencoder does not rely on labeled data, so it can be effectively trained without annotations.
[0099] In the embodiment of the present application, the preprocessed repurchase transaction data is first input into the encoder. In the encoder, the input repurchase transaction data is first upgraded to 32 dimensions. This step ensures that more information and features can be captured by expanding the dimension of the input data. Then, the data is gradually reduced in dimension through multiple levels in the encoder until it reaches a hidden layer with a dimension of 4. This hidden layer contains the core feature representation of the data and is a low-dimensional representation of the data.
[0100] In the decoder, the dimensions are gradually increased from the hidden layer (4 dimensions) to restore the low-dimensional data to 32 dimensions. Finally, the data is restored to the same dimension as the original input data through the decoder, that is, the original dimension of the repo transaction data.
[0101] It should be noted that reconstruction error refers to the difference between input data and reconstructed data. During the training process of the autoencoder, the system will strive to minimize the error between input data and reconstructed data. For normal repo transaction data, the reconstruction error is small, indicating that the data can be encoded and decoded well; for abnormal transaction data, the autoencoder may not be able to reconstruct the data well, so the reconstruction error will be large.
[0102] Therefore, as a possible implementation method, a threshold can be set according to the actual scenario. When the reconstruction error exceeds the threshold, the system will mark the transaction as an abnormal transaction. These abnormal transactions are potential high-risk transactions.
[0103] Finally, based on the calculated reconstruction error, the autoencoder can identify abnormal trading behaviors in the repurchase transaction data and use these abnormal transactions as the first risk warning results, that is, the potential risk points identified by the system.
[0104] Unlike supervised learning, autoencoders do not require manual labeling of data and can automatically learn the intrinsic structure of data, making them suitable for scenarios without labeled data. Through the encoding and decoding process, autoencoders can effectively extract key features of data, construct low-dimensional representations, and identify abnormal patterns in data; by calculating reconstruction errors, autoencoders can accurately identify abnormal points that are significantly different from normal data, which is of great significance in repo transaction risk warning. Overall, as an unsupervised learning model, autoencoders can significantly improve the accuracy and practicality of repo transaction risk warning systems, helping financial institutions and regulatory authorities to better manage market risks and provide decision support.
[0105] Step 104, based on the fitted credit surface result, a supervised learning model is used to classify and predict the preprocessed repurchase transaction data to obtain a second risk warning result.
[0106] In this step, the XGBoost model or TabNet model is used to classify and predict the preprocessed repo transaction data through supervised learning, thereby obtaining the second risk warning result. These models use the characteristic information of repo transaction data to identify and predict risks, further improving the accuracy and practicality of the risk monitoring system.
[0107] The XGBoost model is an ensemble learning method based on the gradient boosting algorithm, which is widely used in classification and regression tasks of structured data. XGBoost gradually reduces errors and improves prediction performance by building multiple decision trees and optimizing the weights of weak classifiers in each round of training. Specifically, XGBoost uses an ensemble learning framework to build new trees in each iteration and optimizes them using a cost function. The cost function includes a loss function and a regularization term, where the loss function measures the gap between the model's predicted results and the actual results, while the regularization term controls the complexity of the model to prevent overfitting. In the risk warning task of repurchase transaction data, XGBoost can identify the risk category of repurchase transactions through multiple iterative training and give a second risk warning result.
[0108] In the embodiment of the present application, the XGBoost model performs multiple iterations of training on the preprocessed repo transaction data, uses the optimized cost function to classify risks, predicts the risk level of each transaction, and obtains the second risk warning result based on the results. This process can help identify high-risk transactions and provide timely risk warning information for financial institutions.
[0109] The TabNet model is a deep learning model that is particularly suitable for processing structured data. Unlike traditional deep learning models, TabNet combines neural networks and attention mechanisms, allowing the model to focus on the most important features in the data when making predictions. This multi-layer decision-making structure enables TabNet to capture complex feature interactions and hierarchical structures, thereby improving the accuracy and interpretability of predictions. TabNet not only improves the predictive performance of repo transaction data, but also provides model interpretability, helping users understand the basis for the model's decision-making and enhancing the transparency of risk prediction results.
[0110] In the embodiment of the present application, the TabNet model is used to process the preprocessed repo transaction data. Through multiple decision steps and attention mechanisms, TabNet can capture complex patterns in transaction data and provide risk predictions for each transaction. TabNet can not only generate the second risk warning results, but also provide interpretability of the prediction results, helping analysts understand the decision basis of the model.
[0111] In general, XGBoost and TabNet models each have their own advantages. XGBoost performs outstandingly in efficient gradient boosting and is suitable for processing large-scale data and producing results quickly. TabNet, through its unique structure and attention mechanism, can deeply explore the complex relationships in the data while providing model interpretability to help analysts understand the prediction results.
[0112] In practical applications, by classifying and predicting repurchase transaction data through these two models, this application can effectively identify potential risks and help regulators and financial institutions better monitor and manage risks.
[0113] Step 105: weightedly combine the first risk warning result and the second risk warning result to obtain a final risk warning result.
[0114] In machine learning, model merging is often used to combine multiple different algorithms or models to improve overall performance and accuracy. In order to effectively merge the warning results of the unsupervised learning warning model (first risk warning result) and the supervised learning warning model (second risk warning result), this application uses several common weighted merging methods. Through these methods, the final risk warning results can be further optimized.
[0115] (1) Naive weighted merging: This method merges the two warning results by assigning different weight coefficients to the first risk warning result and the second risk warning result. The final risk warning result after merging is expressed as:
[0116] c i =p*a i +(1-p)*b i
[0117] Among them, c i is the final risk warning result, a i is the first risk warning result, b i is the second risk warning result, p is the weighting coefficient, and its range is [0,1].
[0118] (2) Weighted probability square root merging: This method uses the square root of the sum of squares to perform weighted merging, which can give higher weights to larger risk values when merging. The final risk warning result after merging is expressed as:
[0119]
[0120] Among them, w a 、w b are weight coefficients, which are used to adjust the impact of the first and second risk warning results respectively.
[0121] (3) Weighted logical OR merging: This method merges two warning results by weighted logical OR to further enhance the merged warning signal. The specific steps include weighting each warning result and merging them by logical OR operation to obtain the final risk warning result. The merging expression is:
[0122] a′ i =w a *ai
[0123] b′ i =w b *b i
[0124] c i =a i ′+b i ′-a i ′*b i '
[0125] In the formula, a′ i and b i ′ is the weighted first and second risk warning results.
[0126] It should be noted that the above weighted merging methods can be selected according to different application scenarios and requirements, and this application does not make specific restrictions on this. Naive weighted merging is suitable for simple linear combinations, which can quickly combine warning results; weighted probability square root merging is suitable for processing risk warning results with large differences, and can better balance the impact of different risk levels; and weighted logical or merging strengthens the high-risk signals in the two warning results through logical operations, which is suitable for scenarios that are more sensitive to abnormal situations.
[0127] Through these methods, this application can effectively combine the results of unsupervised learning and supervised learning models to obtain more accurate and reliable final risk warning results, providing effective support for financial supervision and risk prevention and control.
[0128] In addition, in the attached Figure 5 and attached Figure 6 In the figure, the precision-recall (PR) curves obtained by applying different merging methods under different model merging are shown. Specifically, these charts show how to optimize the performance of the model and improve the precision and recall of the prediction results through different weighted merging methods during the model merging process.
[0129] Description of the figures: (1) Blue curve: represents the PR curve using only the XGBoost model and the TabNet model.
[0131] (2) Red curve: represents the PR curve after merging the warning results of the autoencoder model with the XGBoost model.
[0132] (3) Green curve: represents the PR curve after merging the warning results of the autoencoder model with the TabNet model.
[0133] (4) Purple curve: represents the PR curve drawn by combining the warning results of the autoencoder with XGBoost or TabNet using the weighted logical OR method.
[0134] As can be seen from the figure, the effect of model merging is particularly prominent. Especially in the medium recall range, the merged model significantly improves the precision and the AUC index of the model. Specifically: when using the XGBoost model, the AUC value increases from 0.19 to about 0.44; when using the TabNet model, the AUC value increases from 0.38 to about 0.50.
[0135] These changes fully demonstrate the effectiveness of the model merging method proposed in the embodiments of the present application, and can effectively improve the predictive ability and stability of the model.
[0136] In addition, especially when merging the TabNet and autoencoder models, the merged model is able to obtain a precision of about 20% when reaching 80% recall, further verifying the advantage of this merging method at high recall.
[0137] In order to implement the above embodiment, the present application also proposes a repurchase transaction risk warning device based on a credit surface. Figure 7 A schematic diagram of a repo transaction risk warning device based on a credit surface provided in an embodiment of the present application. Figure 7 As shown, the device comprises:
[0138] A preprocessing module 100 is used to obtain repurchase transaction data and perform data preprocessing on it. The data preprocessing steps include data cleaning, encoding, merging and normalization processing;
[0139] The fitting module 200 is used to construct a three-dimensional credit surface of pledge rate, collateral quality and repo rate based on the pre-processed repo transaction data by using B-spline surface fitting and polynomial surface fitting methods, calculate the position and deviation distance of each repo transaction in the credit surface, and evaluate its risk level;
[0140] The first risk warning module 300 is used to extract and reconstruct the preprocessed repo transaction data using an unsupervised learning model based on the fitted credit surface result, identify abnormal transaction behavior by calculating the reconstruction error, and obtain a first risk warning result;
[0141] The second risk warning module 400 is used to classify and predict the pre-processed repo transaction data using a supervised learning model based on the fitted credit surface result to obtain a second risk warning result;
[0142] The weighted merging module 500 is used to weightedly merge the first risk warning result and the second risk warning result to obtain a final risk warning result.
[0143] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0144] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0145] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0146] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0147] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0148] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0149] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0150] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0151] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0152] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0153] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0154] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0155] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0156] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
[0157] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0158] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A repo transaction risk early warning method based on credit surface, characterized in that: The following steps are involved: Acquire repurchase transaction data and perform data preprocessing on it, wherein the preprocessing steps include data cleaning, encoding, merging and normalization processing; Based on the preprocessed repo transaction data, a three-dimensional credit surface of pledge rate, collateral quality, and repo rate is constructed through B-spline surface fitting and polynomial surface fitting methods. The position and deviation distance of each repo transaction in the credit surface are calculated to evaluate its risk level. Based on the fitted credit surface results, an unsupervised learning model is used to extract and reconstruct the features of the preprocessed repo transaction data. By calculating the reconstruction error, abnormal transaction behavior is identified to obtain the first risk warning result. Based on the fitted credit surface results, the supervised learning model is used to classify and predict the preprocessed repo transaction data to obtain the second risk warning result; The first risk warning result and the second risk warning result are weighted and combined to obtain a final risk warning result.
2. The method according to claim 1, characterized in that The obtaining of repurchase transaction data and preprocessing the data include: Selecting the repurchase transaction data within multiple time periods, and performing data cleaning on the repurchase transaction data; Encoding the character variables in the repurchase transaction data after data cleaning to convert them into digital data suitable for machine learning models; For repurchase contracts involving multiple bonds, the weighted average method of the bond par value shall be used to consolidate them; The real number data in the repurchase transaction data is subjected to minimum-maximum normalization processing to eliminate dimensional differences and magnitude differences, thereby improving the efficiency and accuracy of model training.
3. The method according to claim 2, wherein the fitting step of the B-spline surface fitting method comprises: The B-spline surface is used to perform three-dimensional surface fitting on the pledge rate, collateral quality and repurchase rate in the repurchase transaction data after data preprocessing to construct a credit surface. The specific formula of the B-spline surface fitting method is: Where p(u, v) is a point on the fitted three-dimensional surface; B i,k (u) and B j,l (v) are the B-spline basis functions of parameters u and v with respect to the knot vector; P i,j is the control point in the control point matrix, representing the point on the surface; n and m are the number of nodes in the direction of parameters u and v respectively.
4. The method according to claim 3, characterized in that The fitting step of the polynomial surface fitting method comprises: The least squares fitting method is used to perform three-dimensional surface fitting on the pledge rate, collateral quality and repurchase rate in the repurchase transaction data after data preprocessing to construct a credit surface; wherein, for the polynomial with the highest degree of 2, the following polynomial is used to fit the three-dimensional surface, and the polynomial is: z=ax 2 +by 2 +cxy+dx+ey+f In the formula, x is the pledge rate, y is the quality of the collateral, z is the repurchase rate, and a, b, c, d, e, and f are the coefficients of the polynomial to be fitted.
5. The method according to claim 4, characterized in that The unsupervised learning model uses an automatic encoder, and the unsupervised learning model is used to extract and reconstruct features of the preprocessed repurchase transaction data, and abnormal transaction behavior is identified by calculating the reconstruction error to obtain the first risk warning result, including: The preprocessed repurchase transaction data is input into an encoder, and the repurchase transaction data is upgraded to 32 dimensions by the encoder, and then gradually reduced to a hidden layer with a dimension of 4; In the decoder, the reduced-dimensional data is gradually upgraded back to 32 dimensions from the hidden layer, and finally restored to the original input data dimension; By calculating the reconstruction error, abnormal transaction behavior in the repurchase transaction data is identified and a first risk warning result is generated.
6. The method according to claim 5, characterized in that The supervised learning model is an XGBoost model or a TabNet model. The supervised learning model is used to classify and predict the preprocessed repurchase transaction data to obtain a second risk warning result, including: In the XGBoost model, by constructing an integrated learning framework, the repurchase transaction data is iteratively trained multiple times, and the risk classification is performed using the optimized cost function to obtain the second risk warning result; In the TabNet model, through the multi-layer decision structure and attention mechanism, the complex patterns of the repurchase transaction data are captured and the interpretability of the model is provided to obtain the second risk warning result.
7. The method according to claim 6, characterized in that The weighted combination of the first risk warning result and the second risk warning result to obtain a final risk warning result includes: The first risk warning result and the second risk warning result are combined using naive weighting, and the expression is: c i =p*a i +(1-p)*b i Alternatively, the first risk warning result and the second risk warning result are combined using the weighted probability square root, and the expression is: Alternatively, the first risk warning result and the second risk warning result are combined using weighted logic or, and the expression is: a′ i =w a *a i b′ i =w b *b i c i =a i ′+b i ′-a i ′*b i ′ In the formula, c i is the final risk warning result, a i is the first risk warning result, b i is the second risk warning result, p, w a 、w b is the weighting coefficient, a′ i and b i ′ is the weighted result in weighted logical OR.
8. A repurchase transaction risk early warning device based on a credit surface, characterized in that: include: A preprocessing module, used to obtain repurchase transaction data and perform data preprocessing on it, wherein the data preprocessing steps include data cleaning, encoding, merging and normalization processing; The fitting module is used to construct a three-dimensional credit surface of pledge rate, collateral quality, and repo rate based on the preprocessed repo transaction data through B-spline surface fitting and polynomial surface fitting methods, calculate the position and deviation distance of each repo transaction in the credit surface, and evaluate its risk level; The first risk warning module is used to extract and reconstruct the preprocessed repo transaction data based on the fitted credit surface result by using an unsupervised learning model, identify abnormal transaction behaviors by calculating the reconstruction error, and obtain the first risk warning result; The second risk warning module is used to classify and predict the pre-processed repo transaction data using a supervised learning model based on the fitted credit surface result to obtain the second risk warning result; The weighted merging module is used to weightedly merge the first risk warning result and the second risk warning result to obtain a final risk warning result.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.