Digital asset market risk prediction method based on block chain
Through the blockchain-based digital asset market risk prediction method, the generalized autoregressive conditional heteroscedastic model and error compensation model are used to solve the shortcomings of traditional risk management methods in capturing real-time risk changes and cross-asset dependence in the digital asset market, and more accurate risk prediction and more efficient risk management are achieved.
Patent Information
- Application Number
- CN202510178210.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-06
AI Technical Summary
The risk management methods of traditional financial markets are insufficient in capturing real-time risk changes and cross-asset dependence in the digital asset market, making it difficult for market participants to respond and make decisions in a timely manner, and risk management is low.
The blockchain-based digital asset market risk prediction method is adopted, and by obtaining historical transaction data, fitting the generalized autoregressive condition heteroscedastic model, calculating the in-protection value, building a dependency matrix, and correcting the dependency matrix through the error compensation model to achieve more accurate risk prediction.
A comprehensive risk prediction of the digital asset market has been achieved, the risk management capabilities of market participants have been improved, and the accurate prediction and risk assessment of dependencies have been ensured.
Smart Images

Figure CN120106898A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital asset risk prediction, and in particular to a digital asset market risk prediction method based on blockchain. Background Art
[0002] Risk management in traditional financial markets mainly relies on financial analysis tools based on historical prices and fundamental analysis, which are mainly applied to stock and bond markets. However, due to the high volatility and decentralized nature of the digital asset market, traditional methods are often insufficient in capturing real-time risk changes and cross-asset dependencies. This makes it difficult for market participants to respond and make decisions in a timely manner when faced with rapidly changing market conditions, and risk management efficiency is low.
[0003] In response to the above problems, in recent years, technology has attempted to improve the monitoring of digital asset market risks by introducing big data technology. Existing technologies generally quantify risk factors by building complex mathematical models to improve the accuracy of risk prediction. However, existing solutions are still insufficient in cross-asset risk dependency calculations, and often face problems such as small prediction coverage and low prediction accuracy in practical applications. Summary of the invention
[0004] In order to solve the problems existing in the above background technology, the present invention adopts the following technical solutions:
[0005] A method for predicting digital asset market risks based on blockchain, comprising the steps of:
[0006] Obtain historical transaction data of each digital asset through blockchain; divide the historical transaction data into autoregressive training data set, autoregressive test data set and matrix test data set;
[0007] Fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set, and obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model;
[0008] Calculate the value at risk of each digital asset at certain set time points based on conditional variance;
[0009] Construct the first dependency matrix between the risk values of various digital assets;
[0010] Calculate the error value of each element in the first dependency matrix through the matrix test data set and construct an error analysis matrix;
[0011] Obtain risk influencing factors corresponding to the set time points, and construct and train an error compensation model according to the risk influencing factors and the error analysis matrix;
[0012] The first dependency matrix is corrected according to the error compensation model to obtain a second dependency matrix; and risk prediction is performed using the second dependency matrix and a generalized autoregressive conditional heteroskedasticity model of each digital asset.
[0013] As a preferred solution, the autoregressive training data set and the matrix test data set are sampled from historical transaction data of a first time window length, and the autoregressive test data set is sampled from historical transaction data of a second time window length; the first time window length is greater than the second time window length.
[0014] As a preferred solution, the step of fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset includes: determining the order of the generalized autoregressive conditional heteroskedasticity model according to the Akaike information criterion or the Bayesian information criterion;
[0015] The Akaike information criterion is expressed as:
[0016]
[0017] The Bayesian Information Criterion is expressed as:
[0018]
[0019] Where p and q represent the order of the generalized autoregressive conditional heteroskedasticity model, is the maximum likelihood estimate of the generalized autoregressive conditional heteroskedasticity model; n is the number of samples.
[0020] As a preferred solution, the generalized autoregressive conditional heteroskedasticity model is expressed as:
[0021]
[0022] in, is the conditional variance at time point t, is the residual square at time point t-1, α 0 is a constant term, α 1 is the influence coefficient of the residual square at time point t-1, α 1 is the influence coefficient of the conditional variance at time point t-1.
[0023] As a preferred solution, the value at risk is expressed as:
[0024]
[0025] Where Z represents the critical value of the standard normal distribution; σ t represents the conditional standard deviation at time point t; Δt represents the time point interval.
[0026] As a preferred solution, the construction of the first dependency matrix between the VARs of various digital assets specifically includes the following steps:
[0027] Transform the risk value of each digital asset into the cumulative distribution function value of the corresponding marginal distribution;
[0028] The inverse cumulative distribution function of the standard normal distribution is used to convert the cumulative distribution function value into a standard normal variable and obtain the corresponding covariance matrix, and a normal Copula function is constructed based on the covariance matrix.
[0029] As a preferred solution, the cumulative distribution function value is expressed as:
[0030] u i =F i (VaR i ),
[0031] Among them, u i Represents the cumulative distribution function value of the i-th digital asset, VaR i represents the risk value of the ith digital asset, F i () is the marginal distribution function of the i-th digital asset;
[0032] The standard normal variable is expressed as:
[0033] Z i =Φ -1 (u i ),
[0034] Among them, Z i represents the standard normal variable of the ith digital asset, Φ -1 Represents the inverse cumulative distribution function.
[0035] The covariance matrix is expressed as:
[0036] Φ Σ (z) = P(Z 1 ≤z 1 ,Z 2 ≤z 2 ,…,Z d ≤z d ),
[0037] Among them, Φ Σ () represents the covariance matrix; d represents the number of digital assets; z = {z 1 ,z 2 ,…,z d}, indicating the upper limit of each standard normal variable.
[0038] As a preferred solution, the step of calculating the error value of each element in the first dependency matrix through a matrix test data set and constructing an error analysis matrix comprises the following steps:
[0039] Fitting the calibration generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the matrix test data set, and obtaining the calibration conditional variance of each digital asset at several set time points according to the calibration generalized autoregressive conditional heteroskedasticity model;
[0040] Calculate the verification value-at-risk of each digital asset at a certain set time point based on the verification condition variance;
[0041] Construct a verification dependency matrix between the verification-at-risk values of each digital asset;
[0042] An error analysis matrix is constructed according to the error values of each element in the verification dependency matrix and the first dependency matrix.
[0043] As a preferred solution, the error compensation model is constructed and trained according to the risk influencing factors and the error analysis matrix, including the steps of:
[0044] Construct a time window according to the set lag time width, perform rolling regression analysis based on the time window, and evaluate the prediction error index of each risk influencing factor on each element value in the error analysis matrix in different time windows; set the lag parameter group for each risk influencing factor according to the time window with the smallest error;
[0045] Creating a hysteresis feature according to the hysteresis parameter group of each risk influencing factor, and generating an error compensation data set through the hysteresis feature and the risk influencing factor;
[0046] An error compensation model is constructed and trained through an error compensation data set and an error analysis matrix; the error compensation model adopts an LSTM model.
[0047] The present invention also provides a digital asset market risk prediction system based on blockchain, comprising:
[0048] The data acquisition module is used to obtain the historical transaction data and risk influencing factor values of each digital asset through the blockchain, and divide the historical transaction data into an autoregressive training data set, an autoregressive test data set, and a matrix test data set;
[0049] The first model fitting module is used to fit the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set;
[0050] The risk value assessment module is used to obtain the conditional variance of each digital asset at a certain set time point based on the generalized autoregressive conditional heteroskedasticity model, and calculate the risk value of each digital asset at a certain set time point based on the conditional variance;
[0051] A first matrix construction module, used to construct a first dependency matrix between the at-risk values of various digital assets;
[0052] An error analysis module, used to calculate the error value of each element in the first dependency matrix through a matrix test data set and generate an error analysis matrix;
[0053] The second model fitting module is used to construct and train the error compensation model according to the risk influencing factor value and the error analysis matrix;
[0054] A second matrix correction module, used for correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix;
[0055] The risk prediction module is used to predict the risk of each digital asset through the second dependency matrix and the generalized autoregressive conditional heteroskedasticity model of each digital asset.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] The present application achieves preliminary risk assessment by fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset, obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model, and then calculating the value at risk; by constructing a first dependency matrix between the values at risk of each digital asset, constructing and training an error compensation model according to risk influencing factors and an error analysis matrix, and correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix, so as to achieve error compensation for the dependency, thereby achieving accurate dependency prediction; by combining the second dependency matrix with the generalized autoregressive conditional heteroskedasticity model of each digital asset, it is possible to ensure a comprehensive risk prediction of the digital assets, thereby effectively improving the risk management capabilities of digital asset market participants. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0060] Figure 1 A flowchart of a blockchain-based digital asset market risk prediction method provided in this embodiment;
[0061] Figure 2 A schematic diagram of a process for extracting the geographical location characteristics of each virtual power plant and the standard numerical characteristics of the historical carbon trading matrix provided in this embodiment;
[0062] Figure 3 A schematic diagram of a process for calculating the error value of each element in the first dependency matrix and constructing an error analysis matrix through a matrix test data set provided in this embodiment;
[0063] Figure 4 A schematic diagram of the structure of the blockchain-based digital asset market risk prediction system provided in this embodiment;
[0064] Figure 5 A schematic diagram of the structure of an electronic device provided in this embodiment. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0067] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their 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 addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0068] Risk management in traditional financial markets mainly relies on financial analysis tools based on historical prices and fundamental analysis, which are mainly applied to stock and bond markets. However, due to the high volatility and decentralized nature of the digital asset market, traditional methods are often insufficient in capturing real-time risk changes and cross-asset dependencies. This makes it difficult for market participants to respond and make decisions in a timely manner when faced with rapidly changing market conditions, and risk management efficiency is low.
[0069] In response to the above problems, in recent years, technology has attempted to improve the monitoring of digital asset market risks by introducing big data technology. Existing technologies generally quantify risk factors by building complex mathematical models to improve the accuracy of risk prediction. However, existing solutions are still insufficient in cross-asset risk dependency calculations, and often face problems such as small prediction coverage and low prediction accuracy in practical applications.
[0070] The present invention provides a digital asset market risk prediction method, system and electronic device based on blockchain. The specific implementation scheme of the present invention will be described in detail below.
[0071] Example 1
[0072] like Figure 1 As shown, a method for predicting digital asset market risks based on blockchain includes the following steps:
[0073] S1. Obtain historical transaction data of each digital asset through blockchain; divide the historical transaction data into autoregressive training data set, autoregressive test data set and matrix test data set;
[0074] S2. Fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set, and obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model;
[0075] S3. Calculate the value at risk of each digital asset at a certain set time point based on the conditional variance;
[0076] S4. Constructing a first dependency matrix between the values at risk of each digital asset;
[0077] S5. Calculate the error value of each element in the first dependency matrix through a matrix test data set and construct an error analysis matrix;
[0078] S6. Obtain risk influencing factors corresponding to the set time points, and construct and train an error compensation model according to the risk influencing factors and the error analysis matrix;
[0079] S7. Correct the first dependency matrix according to the error compensation model to obtain a second dependency matrix; and perform risk prediction using the second dependency matrix and a generalized autoregressive conditional heteroskedasticity model of each digital asset.
[0080] The present application achieves preliminary risk assessment by fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset, obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model, and then calculating the value at risk; by constructing a first dependency matrix between the values at risk of each digital asset, constructing and training an error compensation model according to risk influencing factors and an error analysis matrix, and correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix, so as to achieve error compensation for the dependency, thereby achieving accurate dependency prediction; by combining the second dependency matrix with the generalized autoregressive conditional heteroskedasticity model of each digital asset, it is possible to ensure a comprehensive risk prediction of the digital assets, thereby effectively improving the risk management capabilities of digital asset market participants.
[0081] Specifically, the steps of a blockchain-based digital asset market risk prediction method of the present invention are described in detail through the following content:
[0082] A method for predicting digital asset market risks based on blockchain, comprising the steps of:
[0083] S1. Obtain historical transaction data of each digital asset through blockchain; divide the historical transaction data into autoregressive training data set, autoregressive test data set and matrix test data set;
[0084] In this step, based on blockchain technology, historical transaction data of various digital assets are obtained. Historical transaction data includes transaction amount, timestamp, transaction frequency, etc. Among them, historical transaction data is divided into three parts: autoregressive training data set (used to train generalized autoregressive conditional heteroskedasticity model), autoregressive test data set (used to test generalized autoregressive conditional heteroskedasticity model) and matrix test data set (used to build dependency matrix and error analysis).
[0085] To obtain the historical transaction data of each digital asset, you can use blockchain nodes or blockchain API services to connect to the blockchain network to obtain the required historical transaction data. After data cleaning and preprocessing, the historical transaction data is divided into autoregressive training data sets, autoregressive test data sets, and matrix test data sets with consistent data structures, and then stored in a database or cloud storage, with appropriate access permissions and data backup mechanisms set to ensure data integrity and security.
[0086] In one embodiment, the autoregressive training data set and the matrix test data set are sampled from historical transaction data of a first time window length, and the autoregressive test data set is sampled from historical transaction data of a second time window length; the first time window length is greater than the second time window length.
[0087] For example, the length of the first time window is two years, and the length of the second time window is half a year. Among them, the autoregressive training data set needs a sufficiently long time span to capture the time dependence and volatility characteristics of the digital asset price series. By using the data of the past two years, it can ensure that the model learns sufficiently rich historical patterns and long-term trends, providing a reliable basis for subsequent predictions. The autoregressive test data set is sampled from the data of the past six months. The purpose is to test the prediction accuracy of the model on recent data. The data of this shorter period of time is not used for training, which can effectively evaluate the generalization ability and practical application effect of the model. The matrix test data set is used to analyze the correlation and dependency between different digital assets. By selecting two years of historical data, a stable and sufficient number of samples can be obtained to establish a reliable covariance matrix or correlation matrix, which helps to understand the interactive relationship between different assets.
[0088] S2. Fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set, and obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model;
[0089] The generalized autoregressive conditional heteroskedasticity model is used to model the time series data of each digital asset and calculate the conditional variance.
[0090] In one embodiment, fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset includes: determining the order of the generalized autoregressive conditional heteroskedasticity model according to the Akaike Information Criterion or the Bayesian Information Criterion.
[0091] The Akaike information criterion is expressed as:
[0092]
[0093] The Bayesian Information Criterion is expressed as:
[0094]
[0095] Where p and q represent the order of the generalized autoregressive conditional heteroskedasticity model, is the maximum likelihood estimate of the generalized autoregressive conditional heteroskedasticity model; n is the number of samples; specifically, p represents the order of the GARCH part, which means that the conditional variance lag term of the previous (p) period in the conditional variance equation is included in the analysis, reflecting the impact of historical volatility on current volatility; q represents the order of the ARCH part, which means that the residual square lag term of the previous (q) period in the conditional variance equation is included in the analysis, reflecting the impact of historical shocks (i.e., past forecast errors) on current volatility. In the model selection process, by calculating the values of the Akaike Information Criterion or the Bayesian Information Criterion under different combinations of p and q, the combination with the smallest AIC or BIC value is selected as the optimal order of the model to ensure the fitting effect of the model while avoiding overfitting.
[0096] In one embodiment, the generalized autoregressive conditional heteroskedasticity model is denoted as GARCH(1,1), which is expressed as:
[0097]
[0098] in, is the conditional variance at time point t, is the residual square at time point t-1, α 0 is a constant term, α 1 is the influence coefficient of the residual square at time point t-1, α 1 is the influence coefficient of the conditional variance at time point t-1.
[0099] In this embodiment, the generalized autoregressive conditional heteroskedasticity model is used to model the time series data of each digital asset to capture its volatility characteristics, and can effectively and dynamically estimate the variance of asset returns based on historical data.
[0100] S3. Calculate the value at risk of each digital asset at a certain set time point based on the conditional variance;
[0101] Step S3, based on the conditional variances of several set time points calculated by the generalized autoregressive conditional heteroskedasticity model in step S2, calculate the value at risk corresponding to the set time points.
[0102] The value at risk is expressed as:
[0103]
[0104] Where Z represents the critical value of the standard normal distribution (according to the confidence level, such as 95% or 99%); σ t represents the conditional standard deviation at time point t; Δt represents the time point interval, which is one day in one embodiment.
[0105] S4. Constructing a first dependency matrix between the values at risk of each digital asset;
[0106] Based on the estimated marginal distribution function, the marginal distribution of each digital asset in the matrix test data set is determined, and the marginal distribution of each dimension is combined into a joint distribution through the tool of the dependency structure between multidimensional random variables, and the first dependency matrix is further generated. Among them, the first dependency matrix stores the dependency of each digital asset quality inspection through element values. The first dependency matrix characterizes the initial dependency between each digital asset through the mutual relationship analysis between the risk values, which is the basis for subsequent optimization and correction.
[0107] In one embodiment, the first dependency matrix is constructed by a normal copula function. The normal copula function is a statistical tool for describing multivariate distributions. It captures the dependency structure between variables by connecting marginal distributions (i.e., the individual distributions of each variable) into a common distribution.
[0108] The step of constructing a first dependency matrix between the values at risk of each digital asset specifically includes the following steps:
[0109] S41. Transform the VAR of each digital asset into the cumulative distribution function value of the corresponding marginal distribution. Based on the VAR obtained in step S3, it represents the maximum loss that the asset may suffer at a certain confidence level (such as 95%) within a set time period. For each digital asset, a cumulative distribution function can be estimated based on its historical return data. The cumulative distribution function is used to describe the probability that the return or loss does not exceed a certain value (x). By substituting the obtained VaR value into the cumulative distribution function of the asset, the probability that the asset return is less than or equal to VaR can be calculated. Among them, the cumulative distribution function value is expressed as:
[0110] u i =F i (VaR i )
[0111] Among them, u i Represents the cumulative distribution function value of the i-th digital asset, VaR i represents the risk value of the ith digital asset, F i () is the marginal distribution function of the i-th digital asset.
[0112] S42. Convert the cumulative distribution function value into a standard normal variable through the inverse cumulative distribution function of the standard normal distribution and obtain the corresponding covariance matrix, and construct a normal Copula function according to the covariance matrix.
[0113] The standard normal variable is expressed as:
[0114] Z i =Φ -1 (u i )
[0115] Among them, Z i represents the standard normal variable of the ith digital asset, Φ -1 Represents the inverse cumulative distribution function.
[0116] The covariance matrix is expressed as:
[0117] Φ Σ (z) = P(Z 1 ≤z 1 ,Z 2 ≤z 2 ,…,Z d ≤z d )
[0118] Among them, Φ Σ () represents the covariance matrix, that is, the joint probability that the random variables are less than or equal to the specified upper limit at the same time under a given covariance structure; d represents the number of digital assets; z = {z 1 ,z 2 ,…,z d}, indicating the upper limit of each standard normal variable; P(Z 1 ≤z 1 ,Z 2 ≤z 2 ,…,Z d ≤z d ) means that Z 1 ≤z 1 , Z 2 ≤z 2 , ... and Z d ≤z d The joint probability of .
[0119] Based on the foregoing, the normal Copula function is expressed as:
[0120] C Σ (u 1 ,u 2 ,…,u d )=Φ Σ (Φ -1 ((u 1 ),Φ -1 (u 2 ),…,Φ -1 (u d ))
[0121] Since the distribution constructed by the covariance matrix usually assumes that all variables are normally distributed, if the marginal distribution deviates from normality, the covariance matrix alone cannot correctly capture the complex correlation structure. This step provides a more flexible method to combine different types of marginal distributions and construct complex dependency structures by constructing a normal copula function.
[0122] S5. Calculate the error value of each element in the first dependency matrix through a matrix test data set and construct an error analysis matrix;
[0123] The dependency between the assets in the first dependency matrix is verified by using the matrix test data set, and the error value of each element in the first dependency matrix is calculated and organized into an error analysis matrix. Each element in the error analysis matrix represents the error value of the corresponding position in the first dependency matrix, and is also presented in the form of a density value of a normal Copula function.
[0124] Furthermore, the step of calculating the error value of each element in the first dependency matrix by using a matrix test data set and constructing an error analysis matrix comprises the steps of:
[0125] S51. Fitting the calibration generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the matrix test data set, and obtaining the calibration condition variance of each digital asset at a number of set time points according to the calibration generalized autoregressive conditional heteroskedasticity model;
[0126] S52. Calculate the verification value-at-risk of each digital asset at a certain set time point based on the verification condition variance;
[0127] S53, constructing a verification dependency matrix between verification-at-risk values of each digital asset;
[0128] S54: construct an error analysis matrix according to the error values of the verification dependency matrix and each element in the first dependency matrix.
[0129] It can be seen that the implementation methods of steps S51, S52 and S53 correspond to the aforementioned steps S2, S3 and S4, respectively, and the verification dependency matrix is constructed by the same implementation method. The verification dependency matrix has the same structure as the first dependency matrix, and then the error analysis matrix can be calculated to reveal the difference between the model prediction and the actual situation, providing a basis for further optimizing the model.
[0130] S6. Obtain risk influencing factors corresponding to the set time points, and construct and train an error compensation model according to the risk influencing factors and the error analysis matrix;
[0131] In this application, risk influencing factors are used to adjust and optimize the overall risk forecast. The value at risk (VaR) preliminarily estimated through the above steps is based on the generalized autoregressive conditional heteroskedasticity (GARCH) model and historical transaction data. Through the matrix test data set, it can be found that there is an error between the actual VaR and the preliminary estimate.
[0132] In one embodiment, the risk influencing factors include external economic indicators, market sentiment indicators, policy change indicators and technical risk indicators. Among them, the external economic indicators are constructed through GDP growth rate, interest rate and inflation rate; the market sentiment indicators are constructed through data such as trading volume, market volatility index and social media trends to reflect investor sentiment and market dynamics; the policy change indicators are constructed through information on changes in government regulatory policies and updated laws and regulations; the technical risk indicators are constructed through data such as network security incidents, technical failures and their impact scale, and the sensitivity of the digital asset market to technical risks is quantitatively evaluated. After collecting and quantifying the above risk influencing factors, they are used as input features of the error compensation model together with the error analysis matrix in the risk value calculation, and the error compensation model is constructed and trained, so as to effectively correct the initial error value, thereby improving the accuracy of risk prediction, and adjusting the dependencies between digital assets accordingly, and improving the final risk value prediction.
[0133] In one embodiment, please refer to Figure 3 The error compensation model is constructed and trained according to the risk influencing factors and the error analysis matrix, including the steps of:
[0134] S61. Construct a time window according to the set lag time width, perform rolling regression analysis based on the time window, and evaluate the prediction error index (such as MSE and RMSE) of each risk influencing factor on each element value in the error analysis matrix in different time windows; set the lag parameter group for each risk influencing factor according to the time window with the minimum error;
[0135] S62, creating a hysteresis feature according to the hysteresis parameter group of each risk influencing factor, and generating an error compensation data set through the hysteresis feature and the risk influencing factor;
[0136] The lag parameter group may include one or more lags. If a certain indicator has an impact on the target variable at different time points, such as 1 month, 3 months, and 6 months later, then for each specified lag (1 month, 3 months, 6 months), a corresponding feature is created. That is, the original indicator value is moved back 1 month, 3 months, and 6 months to form a new feature. For example, if the original risk influencing factor time series is X t , then the new features are X t-1 ,X t-3 ,X t-6, where t is in months.
[0137] S63. Construct and train an error compensation model using an error compensation data set and an error analysis matrix.
[0138] In one embodiment, the error compensation model adopts an LSTM (Long Short-Term Memory Network) model. The LSTM model includes an input layer, an LSTM layer, a fully connected layer, and an output layer. Among them, the input layer is used to accept input time series data, including risk influencing factor values corresponding to several time points and error values in the error analysis matrix; the LSTM layer is composed of several LSTM units, each LSTM unit contains an input gate, a forget gate, and an output gate, which are used to control the storage and flow of information. The LSTM unit is good at processing time series data and can capture long-term dependencies and complex patterns that affect errors; the fully connected layer is used to further process the output of the LSTM layer and convert it into a suitable form; the output layer is used for the error compensation matrix, and the error compensation matrix has the same structure as the first dependency matrix and the error analysis matrix. Through its gating mechanism, the LSTM network can memorize information over a long time span, which is particularly important in time series that may show long-term dependencies or seasonal trends in financial markets. This embodiment adopts the LSTM model as the error compensation model, taking advantage of its ability to capture time dependence, and effectively using the risk influencing factor values and the error values in the error analysis matrix to accurately predict the error compensation matrix, thereby making the digital asset market risk prediction more accurate and stable.
[0139] S7. Correct the first dependency matrix according to the error compensation model to obtain a second dependency matrix; and perform risk prediction using the second dependency matrix and a generalized autoregressive conditional heteroskedasticity model of each digital asset.
[0140] Based on the foregoing, the error compensation model uses the risk influencing factor value and the error value in the error analysis matrix to realize the output error compensation matrix, and then the first dependency matrix is corrected to generate a second dependency matrix. The second dependency matrix corrected by the error compensation model reflects a more accurate and reliable dependency between digital assets. Accordingly, the present application can use the second dependency matrix to understand the dependency between assets, and at the same time combine the conditional variance of each asset obtained by the GARCH model to measure the respective risk levels, and use the improved dependency and the volatility data of each asset itself to calculate the risk assessment indicators at different time points, thereby describing the collective behavior and individual behavior of digital asset risks. Among them, the risk assessment indicators may include the dependency intensity between the risk values of each digital asset directly obtained according to the second dependency matrix, the risk value of each digital asset after compensation and correction by the second dependency matrix, the risk value of the overall combination, and the risk concentration used to identify and quantify the relative concentration of risks.
[0141] Example 2
[0142] like Figure 4 As shown, a digital asset market risk prediction system based on blockchain includes:
[0143] The data acquisition module is used to obtain the historical transaction data and risk influencing factor values of each digital asset through the blockchain, and divide the historical transaction data into an autoregressive training data set, an autoregressive test data set, and a matrix test data set;
[0144] The first model fitting module is used to fit the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set;
[0145] The risk value assessment module is used to obtain the conditional variance of each digital asset at a certain set time point based on the generalized autoregressive conditional heteroskedasticity model, and calculate the risk value of each digital asset at a certain set time point based on the conditional variance;
[0146] A first matrix construction module, used to construct a first dependency matrix between the at-risk values of various digital assets;
[0147] An error analysis module, used to calculate the error value of each element in the first dependency matrix through a matrix test data set and generate an error analysis matrix;
[0148] The second model fitting module is used to construct and train the error compensation model according to the risk influencing factor value and the error analysis matrix;
[0149] A second matrix correction module, used for correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix;
[0150] The risk prediction module is used to predict the risk of each digital asset through the second dependency matrix and the generalized autoregressive conditional heteroskedasticity model of each digital asset.
[0151] It should be understood that the disclosed system can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, each functional module can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0152] Example 3
[0153] An electronic device 2, such as Figure 5 As shown, a processor 21 and a memory 22, the memory 22 is used to store computer program codes, the computer program codes include computer instructions, and when the processor 21 executes the computer instructions, the electronic device executes the above-mentioned digital asset market risk prediction method based on blockchain.
[0154] The electronic device 2 includes a processor 21, a memory 22, an output device 23, and an input device 24. The processor 21, the memory 22, the input device 24, and the output device 23 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0155] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present invention.
[0156] The memory 22 can be used to store computer program instructions and various computer program codes including program codes for executing the scheme of the present invention. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.
[0157] The input device 24 is used to input data and / or signals, and the output device 23 is used to output data and / or signals. The output device 23 and the input device 24 can be independent devices or an integrated device.
[0158] The present application achieves preliminary risk assessment by fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset, obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model, and then calculating the value at risk; by constructing a first dependency matrix between the values at risk of each digital asset, constructing and training an error compensation model according to risk influencing factors and an error analysis matrix, and correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix, thereby achieving error compensation for the dependency and achieving accurate dependency prediction; by combining the second dependency matrix with the generalized autoregressive conditional heteroskedasticity model of each digital asset, accurate risk prediction of the digital assets can be achieved, thereby improving the overall risk prediction capability.
[0159] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A digital asset market risk prediction method based on blockchain, characterized by: Includes steps: Obtain historical transaction data of each digital asset through blockchain; divide the historical transaction data into autoregressive training data set, autoregressive test data set and matrix test data set; Fitting the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set, and obtaining the conditional variance of each digital asset at several set time points according to the generalized autoregressive conditional heteroskedasticity model; Calculate the value at risk of each digital asset at certain set time points based on conditional variance; Construct the first dependency matrix between the risk values of various digital assets; Calculating the error value of each element in the first dependency matrix through a matrix test data set and constructing an error analysis matrix; Obtain risk influencing factors corresponding to the set time points, and construct and train an error compensation model according to the risk influencing factors and the error analysis matrix; Correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix; Risk prediction is performed through the second dependency matrix and the generalized autoregressive conditional heteroskedasticity model of each digital asset.
2. A blockchain-based digital asset market risk prediction method according to claim 1, characterized in that: The autoregressive training data set and the matrix test data set are sampled from historical transaction data of a first time window length, and the autoregressive test data set is sampled from historical transaction data of a second time window length; the first time window length is greater than the second time window length.
3. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The fitting of the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset includes: determining the order of the generalized autoregressive conditional heteroskedasticity model according to the Akaike information criterion or the Bayesian information criterion; The Akaike information criterion is expressed as: The Bayesian Information Criterion is expressed as: Where p and q represent the order of the generalized autoregressive conditional heteroskedasticity model, is the maximum likelihood estimate of the generalized autoregressive conditional heteroskedasticity model; n is the number of samples.
4. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The generalized autoregressive conditional heteroskedasticity model is expressed as: in, is the conditional variance at time point t, is the residual square at time point t-1, α0 is the constant term, α1 is the influence coefficient of the residual square at time point t-1, and α2 is the influence coefficient of the conditional variance at time point t-1.
5. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The value at risk is expressed as: Where Z represents the critical value of the standard normal distribution; σ t represents the conditional standard deviation at time point t; Δt represents the time point interval.
6. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The step of constructing a first dependency matrix between the values at risk of each digital asset specifically includes the following steps: Transform the risk value of each digital asset into the cumulative distribution function value of the corresponding marginal distribution; The inverse cumulative distribution function of the standard normal distribution is used to convert the cumulative distribution function value into a standard normal variable and obtain the corresponding covariance matrix, and a normal Copula function is constructed based on the covariance matrix.
7. A blockchain-based digital asset market risk prediction method according to claim 6, characterized in that: The cumulative distribution function value is expressed as: u i =F i (VaR i ), Among them, u i Represents the cumulative distribution function value of the i-th digital asset, VaR i represents the risk value of the ith digital asset, F i (() is the marginal distribution function of the ith digital asset; The standard normal variable is expressed as: WITH i =Φ -1 ((at i ), Among them, Z i represents the standard normal variable of the ith digital asset, Φ -1 represents the inverse cumulative distribution function; The covariance matrix is expressed as: Φ Σ ((z)=P((Z1≤z1,Z2≤z2,…,Z d ≤of d ), Among them, Φ Σ (() represents the covariance matrix; d represents the number of digital assets; z={z1,z2,…,z d }, indicating the upper limit of each standard normal variable.
8. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The step of calculating the error value of each element in the first dependency matrix through a matrix test data set and constructing an error analysis matrix comprises the following steps: Fitting the calibration generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the matrix test data set, and obtaining the calibration conditional variance of each digital asset at several set time points according to the calibration generalized autoregressive conditional heteroskedasticity model; Calculate the verification value-at-risk of each digital asset at a certain set time point based on the verification condition variance; Construct a verification dependency matrix between the verification-at-risk values of each digital asset; An error analysis matrix is constructed according to the error values of each element in the verification dependency matrix and the first dependency matrix.
9. The method for predicting digital asset market risks based on blockchain according to claim 1, characterized in that: The error compensation model is constructed and trained according to the risk influencing factors and the error analysis matrix, including the steps of: Construct a time window according to the set lag time width, perform rolling regression analysis based on the time window, and evaluate the prediction error index of each risk influencing factor on each element value in the error analysis matrix in different time windows; set the lag parameter group for each risk influencing factor according to the time window with the smallest error; Creating a hysteresis feature according to the hysteresis parameter group of each risk influencing factor, and generating an error compensation data set through the hysteresis feature and the risk influencing factor; An error compensation model is constructed and trained through an error compensation data set and an error analysis matrix; the error compensation model adopts an LSTM model.
10. A digital asset market risk prediction system based on blockchain, characterized by: The method for predicting digital asset market risks based on blockchain as claimed in any one of claims 1 to 9 is applied, comprising: The data acquisition module is used to obtain the historical transaction data and risk influencing factor values of each digital asset through the blockchain, and divide the historical transaction data into an autoregressive training data set, an autoregressive test data set, and a matrix test data set; The first model fitting module is used to fit the generalized autoregressive conditional heteroskedasticity model corresponding to each digital asset according to the autoregressive training data set; The risk value assessment module is used to obtain the conditional variance of each digital asset at a certain set time point based on the generalized autoregressive conditional heteroskedasticity model, and calculate the risk value of each digital asset at a certain set time point based on the conditional variance; A first matrix construction module, used to construct a first dependency matrix between the at-risk values of various digital assets; An error analysis module, used to calculate the error value of each element in the first dependency matrix through a matrix test data set and generate an error analysis matrix; The second model fitting module is used to construct and train the error compensation model according to the risk influencing factor value and the error analysis matrix; A second matrix correction module, used for correcting the first dependency matrix according to the error compensation model to obtain a second dependency matrix; The risk prediction module is used to predict the risk of each digital asset through the second dependency matrix and the generalized autoregressive conditional heteroskedasticity model of each digital asset.
Citation Information
Patent Citations
Visual presentation method and system for block chain digital assets, and server device
CN107085582A
Method, system and equipment for constructing risk overflow network of digital asset market
CN118172098A
Block chain-based digital asset information query method and apparatus, and electronic device
CN118245521A