Financial field data prediction method and system based on probability distribution, and electronic equipment

Through the financial field data prediction method based on probability distribution, combined with the various characteristics and diffusion models of individual stocks, the problem of neglecting uncertainty by the financial timing prediction model is solved, and a more accurate and comprehensive prediction effect is achieved.

CN119398916APending Publication Date: 2025-02-07SHANGHAI YUANLU JIAJIA INFORMATION SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411293209.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The current financial timing prediction model lacks consideration of data and system uncertainty, resulting in large differences between the prediction results and the actual situation.

Method used

A financial field data prediction method based on probability distribution is adopted, by obtaining the high-order vectors, gene vectors, historical expectation factors, historical standard deviation factors, style vectors, hot spot factors, valuation factors and market capital factors of individual stocks, combined with the diffusion model, Generate the probability distribution of predicted values ​​of individual stocks.

Benefits of technology

Compared with traditional time series models, the prediction effect is better, and it can analyze the probability distribution of individual stock prices in the future moments, provide uncertain information, and help investors make more accurate and comprehensive decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398916A_ABST
    Figure CN119398916A_ABST
Patent Text Reader

Abstract

The invention provides a financial field data prediction method and system based on probability distribution, and electronic equipment. The method comprises the steps of obtaining a high-order vector of an individual share based on initial representation data of the individual share; obtaining gene vectors of the individual stocks according to the association graph of the individual stocks and the related labels; according to the high-order vector of the individual strand and the gene vector of the individual strand, obtaining a historical expectation factor of the individual strand and a historical standard deviation factor of the individual strand; obtaining a style vector and a hotspot factor of the individual stock according to market preference, and obtaining an evaluation factor and a market value factor of the individual stock based on the style vector of the individual stock; and obtaining predicted value probability distribution of the individual stock based on the high-order vector of the individual stock, the historical expectation factor of the individual stock, the historical standard deviation factor of the individual stock, the hotspot factor, the valuation factor of the individual stock and the market value factor of the individual stock. The probability distribution of future prices of individual stocks can be analyzed, uncertain information is provided, and more accurate and more comprehensive suggestions are provided for investors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data prediction technology, and in particular to a method, system and electronic equipment for predicting data in the financial field based on probability distribution. Background Art

[0002] In the early days, relevant researchers analyzed financial time series based on statistical methods, such as the traditional autoregressive integrated moving average model (ARIMA) and the generalized autoregressive conditional heteroskedasticity model (GARCH). Statistical financial time series methods are widely used due to their simplicity and efficiency. Financial time series have the characteristics of non-stationarity, but the above traditional financial statistical models all have the assumption of stationarity. Therefore, when using the above models to model financial time series, it is necessary to first perform stationarity processing to convert non-stationary time series into stationary time series. However, this assumption that does not match the actual data distribution makes the model perform poorly.

[0003] In recent years, deep learning methods have also been applied to the study of financial time series analysis. Deep learning methods can model nonlinear complex relationships, remove the assumption of stationarity, and better analyze financial time series. For example, ALSTM (Attentive Long-Short Term Memory Network) uses recurrent neural networks and attention mechanisms to capture effective information in time series, and TCN (Temporal Convolution Network) performs time domain convolution on time series to extract effective information. These deep learning methods show better results than traditional statistical methods. Financial time series are affected by many external factors. However, the above methods only take the financial time series itself as the research object, ignoring the influence of external factors (for example, the trend of a single stock is affected by the state of the entire market), which limits the effect of financial time series prediction tasks. In addition, the financial market is a complex system with high noise and high uncertainty affected by many factors. However, most of the current financial time series prediction models are single-point prediction models, which lack consideration of the uncertainty of data and the system itself. Summary of the invention

[0004] The purpose of this application is to provide a data prediction method, system and electronic device in the financial field based on probability distribution, which is used to solve the technical problem that the current financial time series prediction model lacks consideration of data and system uncertainty, resulting in a large difference between the prediction results and the actual results.

[0005] In a first aspect, the present application provides a financial data prediction method based on probability distribution, the method comprising: obtaining high-order vectors of individual stocks based on initial characterization data of individual stocks; obtaining gene vectors of individual stocks based on association graphs between individual stocks and related tags; obtaining historical expected factors and historical standard deviation factors of individual stocks based on the high-order vectors of the individual stocks and the gene vectors of the individual stocks; and obtaining style vectors and hot spot factors of individual stocks based on market preferences, and obtaining valuation factors and market value factors of individual stocks based on the style vectors of the individual stocks; obtaining the predicted value probability distribution of individual stocks based on the high-order vectors of the individual stocks, the historical expected factors of the individual stocks, the historical standard deviation factors of the individual stocks, the hot spot factors, the valuation factors of the individual stocks and the market value factors of the individual stocks.

[0006] In an implementation of the first aspect, obtaining a high-order vector of an individual stock based on initial characterization data of the individual stock includes: constructing an initial characterization of the individual stock according to characteristics of the individual stock and the sector to which the individual stock belongs; and converting the initial characterization data of the individual stock into a high-order vector of the individual stock based on a recurrent neural network algorithm.

[0007] In an implementation of the first aspect, obtaining a gene vector of an individual stock based on an association graph between the individual stock and related tags includes: connecting the nodes of the individual stock and the related tags to establish an association graph between the individual stock and the related tags; sampling the association graph based on a graph random walk algorithm to obtain a co-occurrence sequence of the individual stock and the related tags; and processing the co-occurrence sequence of the individual stock and the related tags using a Skip-Gram algorithm to obtain a gene vector of the individual stock.

[0008] In an implementation of the first aspect, obtaining the historical expected factor and the historical standard deviation factor of the individual stock based on the high-order vector of the individual stock and the gene vector of the individual stock includes: calculating and screening the historical data sequence of the individual stock based on the high-order vector of the individual stock and the gene vector of the individual stock; and obtaining the historical expected factor and the historical standard deviation factor of the individual stock by calculating according to the historical data sequence of the individual stock.

[0009] In an implementation method of the first aspect, the style vector and hot spot factor of an individual stock are obtained according to market preference, and the valuation factor and market value factor of the individual stock are obtained based on the style vector of the individual stock, including: constructing a market hot spot preference data set and a market hot spot non-preference data set according to the yield on any trading day, and obtaining a first market hot spot preference vector and a first market hot spot non-preference vector according to the gene vector of the individual stock and the market hot spot preference data set and the market hot spot non-preference data set; performing cosine similarity calculation on the gene vector of the individual stock and the first market hot spot preference vector, and on the gene vector of the individual stock and the first market hot spot non-preference vector, respectively, to generate two hot spot factors; constructing the style vector of the individual stock based on the industry label of the individual stock data, and obtaining a second market hot spot preference vector and a second market hot spot non-preference vector according to the style vector of the individual stock and the market hot spot preference data set and the market hot spot non-preference data set, and performing cosine similarity calculation on the style vector of the individual stock and the second market hot spot preference vector, and on the style vector of the individual stock and the second market hot spot non-preference vector, respectively, to obtain the valuation factor and market value factor of the individual stock.

[0010] In an implementation of the first aspect, the industry labels include: an industry-wide PEG label, an industry-wide PEG label, an industry-wide PETTM label, an industry-wide PETTM label, an industry-wide dynamic price-to-earnings ratio label, and a market value label.

[0011] In an implementation of the first aspect, obtaining the predicted value probability distribution of an individual stock based on the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the valuation factor of the individual stock and the market value factor of the individual stock includes: merging the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock to obtain a high-dimensional feature vector of the individual stock time series; processing the high-dimensional feature vector of the individual stock time series through a diffusion model to obtain the predicted value probability distribution of the individual stock.

[0012] In a second aspect, the present application provides a financial field data prediction system based on probability distribution, the system comprising: a feature extraction module, a label conversion module, a first factor construction module, a second factor construction module and a prediction module.

[0013] The feature extraction module is used to obtain the high-order vector of the individual stock based on the initial characterization of the individual stock; the label conversion module is used to obtain the gene vector of the individual stock according to the association graph between the individual stock and the relevant labels; the first factor construction module is used to obtain the historical expected factor and the historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock; the second factor construction module is used to obtain the style vector and hot spot factor of the individual stock according to the market preference, and obtain the valuation factor and the market value factor of the individual stock based on the style vector of the individual stock; the prediction module is used to obtain the predicted value probability distribution of the individual stock based on the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot spot factor, the valuation factor of the individual stock and the market value factor of the individual stock.

[0014] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by an electronic device, the financial field data prediction method based on probability distribution as described in any one of the first aspects of the present application is implemented.

[0015] In a fourth aspect, the present application provides an electronic device comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the electronic device executes the financial field data prediction method based on probability distribution as described in any one of the first aspects of the present application.

[0016] As described above, the financial field data prediction method, system and electronic device based on probability distribution described in this application have the following beneficial effects:

[0017] This application takes into account the impact of historical similar sequences and market preferences on time series. Compared with traditional time series models, the prediction effect is better. Compared with a single-point prediction that only gives a certain value, the data prediction based on probability distribution in this application can not only analyze the probability distribution of the price of individual stocks at future times, but also provide uncertain information about individual stocks, so that its prediction results can provide investors with more accurate and comprehensive suggestions. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a flow chart of a financial data prediction method based on probability distribution described in this application in one embodiment.

[0019] Figure 2 Shown is a schematic diagram of a flow chart of obtaining a high-order vector of a stock in one embodiment of the present application.

[0020] Figure 3 Shown is a schematic diagram of converting initial characterization data of individual stocks into high-order vectors of individual stocks based on the recurrent neural network algorithm described in this application in one embodiment.

[0021] Figure 4 Shown is a schematic diagram of a process for obtaining gene vectors of individual stocks in one embodiment of the present application.

[0022] Figure 5 Shown is a structural schematic diagram of an embodiment of the association diagram of individual stocks and related tags described in this application.

[0023] Figure 6 Shown is a schematic structural diagram of the co-occurrence sequence of individual stocks and related tags described in this application in one embodiment.

[0024] Figure 7 Shown is a flow chart of obtaining the historical expected factor and the historical standard deviation factor of an individual stock in one embodiment as described in the present application.

[0025] Figure 8 Shown is a schematic diagram of the structure of a set of sequences similar to individual stock sequences based on a memory network for screening described in the present application in one embodiment.

[0026] Fig. 9 Shown is a flow chart of obtaining the style vector, hot spot factor, valuation factor and market value factor of an individual stock in one embodiment as described in the present application.

[0027] Fig.10 Shown is a schematic diagram of a flow chart of obtaining the probability distribution of predicted values ​​of individual stocks in one embodiment as described in the present application.

[0028] Fig.11 Shown is a schematic diagram of the structure of the diffusion model described in this application.

[0029] Fig.12 Shown is a schematic diagram of the structure of a financial data prediction system based on probability distribution described in this application in one embodiment.

[0030] Fig.13 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present application.

[0031] Component number description

[0032] 1200 Financial Data Prediction System Based on Probability Distribution

[0033] 1210 Feature Extraction Module

[0034] 1220 Label conversion module

[0035] 1230 First Factor Building Block

[0036] 1240 Second Factor Building Blocks

[0037] 1250 Prediction Module

[0038] 131 Processing Units

[0039] 132 Memory

[0040] 1321 Random Access Memory

[0041] 1322 Cache memory

[0042] 1323 Storage System

[0043] 1324 Programs / Utilities

[0044] 1325 Program Module

[0045] 133 Bus

[0046] 134 Input / Output Interface

[0047] 135 Network Adapter

[0048] Steps S11 to S15

[0049] Steps S21 to S22

[0050] Steps S41 to S43

[0051] Steps S71 to S72

[0052] Steps S91 to S93

[0053] Steps S101 to S102 DETAILED DESCRIPTION

[0054] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0055] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0056] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. 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 this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0057] The following embodiments of the present application provide a data prediction method, system and electronic device in the financial field based on probability distribution. By introducing historical similar sequences related to individual stocks, market preferences, etc., data prediction of individual stocks can be performed. It can not only predict the probability distribution of future prices of individual stocks, but also provide uncertain information, so that the prediction results can provide investors with more accurate and comprehensive suggestions.

[0058] The following will describe in detail the principles and implementation methods of the financial field data prediction method, system and electronic device based on probability distribution described in the embodiments of the present application in conjunction with the accompanying drawings, so that those skilled in the art can understand the financial field data prediction method, system and electronic device based on probability distribution of the present embodiment without creative work.

[0059] See also Figure 1 , showing a flow chart of a financial field data prediction method based on probability distribution provided in an embodiment of the present application.

[0060] like Figure 1 As shown, the financial field data prediction method based on probability distribution includes steps S11 to S15.

[0061] Step S11: obtaining a high-order vector of the individual stock based on the initial characterization data of the individual stock.

[0062] Specifically, the initial representation of the individual stock is constructed according to the characteristics of the individual stock and the characteristics of the sector to which the individual stock belongs. The initial representation of the individual stock is used as input content, and the high-order vector of the individual stock is obtained through a time series feature extraction module based on a recurrent neural network and unsupervised comparative learning. In some implementations, such as Figure 2 As shown, obtaining the high-order vector of the individual stock based on the initial characterization data of the individual stock includes the following steps S21 to S22.

[0063] Step S21: construct an initial representation of the individual stock based on the characteristics of the individual stock and the sector to which the individual stock belongs.

[0064] Specifically, a stock market transaction data set is used as the data set for the initial characterization of individual stocks to be constructed. The selected time interval is from 2017-7-10 to 2022-07-01, a total of 1211 trading days, covering 4759 stocks and 384 concept tags. Define the method of sorting daily stocks by stock increase ranking (weight 90%) and stock turnover ranking (weight 10%) to judge strong stocks. Take the top 120 stocks of the day, extract their 18 stock features and 13 sector features corresponding to the stocks, a total of 31 features, as the initial characterization of individual stocks.

[0065] Specifically, transaction data of terminals including desktop financial terminals, portable financial terminals, and cabinet-type fixed terminals in the stock trading market are obtained as the transaction data set of the stock market.

[0066] Step S22: converting the initial characterization data of the individual stocks into high-order vectors of the individual stocks based on a recurrent neural network algorithm.

[0067] Specifically, Figure 3 As shown, the time signal at time t is recorded as x t , encoder g enc x t Encoded as a high-dimensional vector z t , z t represents the embedded representation of the time signal at time t. Then, through another recurrent neural network g ar The sequence z of length T time steps t-T:t Fusion forms a high-dimensional vector c t , c t It represents the embedded representation of the time series from time tT to time t.

[0068] In one embodiment, assuming that the time series length is 15 days, then x t For the eighth day of the time series, by integrating x t-7 to x t Data informationc t Predict x t+7 The smaller the error between the predicted result and the true value, the better the t The better the vector representation is, the better the performance is. So far, the initial representation data of individual stocks are converted into high-order vectors of individual stocks.

[0069] Step S12: Obtain the gene vector of the individual stock according to the association graph between the individual stock and the relevant tags.

[0070] Specifically, an association graph is constructed based on the concept labels of individual stocks and the sectors to which they belong, and the individual stock nodes are connected with the relevant concept nodes. The concept labels of individual stocks and the sectors to which they belong are taken as input, and the concept labels of individual stocks and individual stock sectors described in text are converted into high-order vectors representing the individual stocks and the gene vectors of the individual stocks through a random walk algorithm.

[0071] Among them, the gene vector of individual stocks is used to measure the similarity between individual stocks.

[0072] In some implementations, such as Figure 4 As shown, obtaining the gene vector of an individual stock includes the following steps S41 to S43.

[0073] Step S41, connecting the nodes of the individual stocks and the relevant tags to establish an association graph of the individual stocks and the relevant tags.

[0074] Specifically, Figure 5 As shown, the nodes of individual stocks are connected with the nodes of concepts related to the individual stocks to form an association graph between the individual stocks and related labels.

[0075] like Figure 5 As shown, the right side represents individual stocks, each string of numbers represents an individual stock, and the left side represents each sector and the concept labels within the sector. The individual stocks are connected with the concept labels within the sectors to which they belong to establish an association diagram between individual stocks and related labels.

[0076] Step S42: Sample the association graph based on the graph random walk algorithm to obtain the co-occurrence sequence of individual stocks and related tags.

[0077] In one embodiment, based on Dongcai concept label data, 4759 stocks and 384 concept labels are regarded as nodes of the graph, and a random walk algorithm that can repeatedly visit visited nodes is adopted. That is, given the current visit starting node, a node is randomly sampled from its neighbors as the next visit node, and this process is repeated until the length of the visit sequence meets the preset conditions.

[0078] Preferably, the preset condition in this embodiment is to randomly walk each concept tag or individual stock 40 times, obtain a total of 204,320 sequences, and use them as the co-occurrence sequence of the individual stock and the relevant tags.

[0079] like Figure 6 As shown, it is a co-occurrence sequence of a group of stocks and related labels. The stock numbered 000899 is taken as the starting node, and the next concept label related to it is SZ new energy. The next stock related to SZ new energy is 601137, and the next concept label related to 601137 is SH new energy. Repeat the above process and randomly walk 40 times to get the co-occurrence sequence of the stock numbered 000899 and related labels.

[0080] Step S43: Use the Skip-Gram algorithm to process the co-occurrence sequence of individual stocks and related tags to obtain the gene vector of the individual stock.

[0081] Specifically, take the above 204,320 stock-related co-occurrence sequences as an example. The obtained 204,320 stock-related co-occurrence sequences are subjected to Skip Gram training, and the discrete network nodes are represented as vectors to maximize the node co-occurrence, wherein Hierarchical Softmax is used as a classifier for ultra-large-scale classification.

[0082] In this embodiment, each vector is set as a 256-dimensional vector for representation, that is, the text label of the data is converted into a 256-dimensional vector, that is, the gene vector of the individual stock. The gene vector of any stock contains the concept style vector information of the individual stock, and each dimension can be used as a measure of the similarity of the stock, that is, the higher the similarity of two stocks, the closer the distance between their gene vectors will be.

[0083] Step S13: Obtain the historical expected factor and the historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock.

[0084] Specifically, based on the high-order vectors of individual stocks and their gene vectors, the similarity between the time series of individual stocks and the historical series of similar gene stocks and the individual stocks is calculated, and a set of time series with higher similarity is selected. According to the true value of the series in the set at the time point to be predicted, the historical expected factor and the historical standard deviation factor of the individual stock are generated.

[0085] In some implementations, such as Figure 7 As shown, obtaining the historical expected factor and the historical standard deviation factor of an individual stock includes the following steps S71 to S72.

[0086] Step S71: Calculate and filter the historical data sequence of the individual stock based on the high-order vector of the individual stock and the gene vector of the individual stock.

[0087] Specifically, a memory network is constructed to store the historical sequences of individual stocks, so as to screen a set of sequences that are similar to the individual stock sequences of the current individual stock being calculated. Figure 8 As shown in the figure, the gene vectors of all the stocks obtained are calculated similarly with the gene vector of the current stock to obtain a collection of stocks with similar concept label representation to the current stock. The collection of stocks with similar concept label representation to the current stock is used as the key of the memory network. The similarity between the current stock and the key is calculated through the attention mechanism, and the similarity calculation results are sorted in descending order. The top 50 records with similar genes to the current stock and similar historical sequences are taken as the historical data sequence of the current stock.

[0088] Step S72: Calculate the historical expected factor and the historical standard deviation factor of the individual stock based on the historical data series of the individual stock.

[0089] Specifically, calculations are performed on the first 50 records that are close to the current stock gene and have similar historical sequences to obtain the historical expected factor and the historical standard deviation factor of the stock.

[0090] Among them, the calculation formula of the historical expected factor of individual stocks is:

[0091]

[0092] Among them, E(y) represents the historical expected factor of the stock, i represents the sequence number of the sequence that is similar to the gene of the current stock and has a similar historical sequence, and y i Represents the i-th sequence that is close to the gene of the current stock and has a similar historical sequence.

[0093] The calculation formula for the historical standard deviation factor of an individual stock is:

[0094]

[0095] Among them, σ(y) represents the historical standard deviation factor of the stock, i represents the sequence number of the sequence that is similar to the gene of the current stock and has a similar historical sequence, and y i Indicates the sequence of the i-th stock that is close to the gene of the current stock and has similar historical sequence, E (y) Represents the historical expected factor of an individual stock.

[0096] Among them, the historical expectation factor of an individual stock represents the mean of the future returns of similar sequences of similar stocks in history, reflecting the expectations of similar sequences in history at the time point to be predicted, while the historical standard deviation factor of an individual stock represents the standard deviation, reflecting the stability of the individual stock.

[0097] Step S14: obtaining the style vector and hot factor of the individual stock according to the market preference, and obtaining the valuation factor and market value factor of the individual stock based on the style vector of the individual stock.

[0098] Specifically, a market hot spot preference sequence is formed based on the gene vectors of individual stocks, and the hot spot factors are predicted through a recurrent neural network. The style vectors of individual stocks are constructed based on the industry labels of individual stock data, and the valuation factors and market value factors of individual stocks are predicted through a recurrent neural network.

[0099] Among them, the industry labels of individual stock data include: industry-wide PEG label, industry-wide PEG label, industry-wide PETTM label, industry-wide PETTM label, industry-wide dynamic P / E ratio label and market value label.

[0100] It should be noted that the industry-wide PEG label is a financial indicator used to evaluate the investment value of stocks in different industries. It combines the price-to-earnings ratio (PE) and the expected earnings growth rate (G); the industry-wide PEG label is an indicator for evaluating whether the stocks of companies in the industry are reasonably valued; the industry-wide PETTM label is an indicator used to evaluate the overall valuation level of the stock market. It reflects the position of the overall price-to-earnings ratio (PE) of the market over a historical time span (TTM, i.e. the past 12 months); the industry-wide PETTM label is an indicator for measuring the price-to-earnings ratio of stocks of companies in a specific industry. It reflects the price that investors are willing to pay for each unit of expected earnings of companies in the industry; the industry-wide dynamic price-to-earnings ratio label is an important indicator for measuring the current and future expected valuation levels of stocks in a specific industry. It predicts the full-year earnings based on the company's most recent performance report and calculates the price-to-earnings ratio accordingly.

[0101] In some implementations, such as Fig. 9 As shown, obtaining the style vector, hot spot factor, valuation factor and market value factor of an individual stock includes the following steps S91 to S93.

[0102] Step S91: construct a market hotspot preference data set and a market hotspot non-preference data set according to the rate of return of any trading day, and obtain a first market hotspot preference vector and a first market hotspot non-preference vector according to the gene vector of the individual stock and the market hotspot preference data set and the market hotspot non-preference data set.

[0103] Specifically, for any trading day, all stocks are sorted according to their yields on that day. A high yield indicates that the market prefers the stock, otherwise it indicates no preference.

[0104] Select k stocks with the highest and lowest yields to construct a market hot spot preference data set and a market hot spot non-preference data set, calculate the mean of the gene vector of each stock in the market hot spot preference data set, and the mean of the gene vector of each stock in the market hot spot non-preference data set, and use the obtained means as the market hot spot preference vector and the market hot spot non-preference vector of the day, respectively. For the historical data of the market hot spot preference vector and the market hot spot non-preference vector of the day, according to the gene vector of the individual stock, further obtain the time series of the market hot spot preference vector and the time series of the market hot spot non-preference vector of the day.

[0105] In one embodiment, all stocks of the current stock currently participating in the calculation on the current trading day are sorted in descending order according to the size of the yield, and the mean of the gene vectors of the top 120 stocks with the highest yield on the day is taken as the market hot spot preference vector for the day, representing the concept stock set preferred by the current market. The mean of the gene vectors of the 120 stocks with the lowest yield on the day is taken as the market hot spot non-preference vector for the day, representing the concept stock set not preferred by the current market. For the historical data of the two vector sets, the time series of the market hot spot preference vector for the day and the time series of the market hot spot non-preference vector for the day are created according to the gene vectors of the individual stocks.

[0106] Furthermore, the prediction model based on the recurrent neural network takes the time series of the market hot spot preference vector of the day and the time series of the market hot spot non-preference vector of the day as input to predict the first market hot spot preference vector and the first market hot spot non-preference vector of the next few trading days, so as to further reflect the market's preference or non-preference for the concept label type.

[0107] Step S92: perform cosine similarity calculation on the gene vector of the individual stock and the first market hot spot preference vector, and on the gene vector of the individual stock and the first market hot spot non-preference vector, respectively, to generate two hot spot factors.

[0108] Among them, the two hot factors are used to predict whether individual stocks are related to the market's hot preference concept, or whether they are related to the market's hot non-preference concept.

[0109] Step S93: construct the style vector of the individual stock based on the industry label of the individual stock data, and obtain the second market hot spot preference vector and the second market hot spot non-preference vector according to the style vector of the individual stock and the market hot spot preference data set and the market hot spot non-preference data set, and perform cosine similarity calculation on the style vector of the individual stock and the second market hot spot preference vector, and on the style vector of the individual stock and the second market hot spot non-preference vector, respectively, to obtain the valuation factor of the individual stock and the market value factor of the individual stock.

[0110] Specifically, the nodes of individual stocks and industry labels are connected to establish an association graph between individual stocks and industry labels. The association graph between individual stocks and industry labels is sampled based on the graph random walk algorithm to obtain the co-occurrence sequence of individual stocks and industry labels. The co-occurrence sequence of individual stocks and industry labels is processed using the Skip-Gram algorithm to obtain the style vector of the individual stock.

[0111] Furthermore, for the market hot spot preference data set and the market hot spot non-preference data set obtained in step S91, the mean of the style vector of each individual stock in the market hot spot preference data set and the mean of the style vector of each individual stock in the market hot spot non-preference data set are calculated respectively, and the obtained means are used as the market hot spot preference vector and the market hot spot non-preference vector of the day respectively. For the historical data of the market hot spot preference vector and the market hot spot non-preference vector of the day, according to the style vector of the individual stock, the time series of the market hot spot preference vector and the time series of the market hot spot non-preference vector of the day are further obtained.

[0112] Furthermore, the prediction model based on the recurrent neural network takes the time series of the market hot spot preference vector of the day and the time series of the market hot spot non-preference vector of the day as input to predict the second market hot spot preference vector and the second market hot spot non-preference vector of the next few trading days, and performs cosine similarity calculation on the style vector of individual stocks and the second market hot spot preference vector, as well as the style vector of individual stocks and the second market hot spot non-preference vector, to generate the valuation factor and market value factor of individual stocks.

[0113] Step S15, obtaining the predicted value probability distribution of the individual stock based on the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock.

[0114] Specifically, the acquired high-order vectors of individual stocks, historical expected factors of individual stocks, historical standard deviation factors of individual stocks, hot factors, valuation factors of individual stocks and market value factors of individual stocks are merged, and the merged data is used as input into the prediction module based on the diffusion model to generate the future price probability distribution of individual stocks, that is, the predicted value probability distribution of individual stocks.

[0115] It should be noted that when calculating the predicted value of individual stocks, it includes predicting all the stocks one by one, and any individual stock currently participating in the prediction calculation can generate a corresponding predicted value probability distribution.

[0116] In some implementations, such as Fig.10 As shown, obtaining the predicted value probability distribution of individual stocks includes the following steps S101 to S102.

[0117] Step S101, merging the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock to obtain a high-dimensional feature vector of the individual stock time series.

[0118] Specifically, the above factors are combined to obtain a 256-dimensional long vector of individual stocks, including the stock's own sequence characteristics, the stock's historical expectation factor, the stock's historical standard deviation factor, two hot factors, and valuation and market value factors, which are used for subsequent probability predictions.

[0119] Step S102: Process the high-dimensional feature vector of the individual stock time series through a diffusion model to obtain the probability distribution of the predicted value of the individual stock.

[0120] Specifically, the high-dimensional feature vector of the acquired individual stock time series is used as input, and the probability distribution of the individual stock is obtained through the diffusion model.

[0121] It should be noted that if Fig.11 As shown, the diffusion model is realized by Markov chain from the original data To noise The transformation process is mainly divided into two parts: the forward process q and the reverse process p. The parameters of the forward process are fixed, and noise is gradually added to the data, so that the distribution of the data tends to the prior distribution, that is, the standard Gaussian distribution; the reverse process starts from the given prior distribution, uses the parameterized Gaussian transformation kernel, learns how to gradually denoise the prior distribution, and finally achieves the goal of restoring the original data distribution, that is, obtaining the required predicted data. By generating predicted data multiple times, the future price probability distribution of individual stocks can be obtained.

[0122] In one embodiment, if Fig.11 As shown in the figure, the prediction target is selected as the probability of the target stock having a return rate greater than 3% and the probability of a return rate less than -3% in the next three days. For the high-dimensional feature vector of the target stock, the diffusion generation algorithm is used to simulate 100 times. In each simulation, the diffusion model will randomly generate noise as the initial state of the simulation, and the predicted return for the next three days is given by the diffusion generation algorithm. Finally, if there are m times of increase values ​​exceeding 3% in the statistical results of 100 simulations, the probability of an increase of more than 3% is defined as m%. Similarly, if there are n times of decrease values ​​exceeding -3% in the simulation results of 100 simulations, the probability of a decrease of more than -3% is defined as n%, which is used as an indicator for predicting the probability of individual stock increases.

[0123] In a verification experiment, in order to prove the effectiveness of each factor, an ablation experiment was conducted. The results shown in Table 1 show that the introduction of the historical expectation / standard deviation factor improves the prediction accuracy by 1.9%, the further introduction of the hot factor improves the prediction accuracy by 0.1%, and the further introduction of the valuation / market value factor improves the prediction accuracy by 18.1%. The experiment proves that the historical standard deviation factor (step S4) and the hot factor, valuation and market value factor (step S5) all have a certain improvement effect on the prediction. Only by introducing all factors into the model can the model have a higher prediction accuracy, reaching 66.7%.

[0124]

[0125] It should be noted that the protection scope of the financial field data prediction method based on probability distribution of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.

[0126] See also Fig.12 , showing a structural diagram of a financial field data prediction system based on probability distribution according to an embodiment of the present application.

[0127] like Fig.12 As shown, the financial field data prediction system 1200 based on probability distribution includes: a feature extraction module 1210, a label conversion module 1220, a first factor construction module 1230, a second factor construction module 1240 and a prediction module 1250.

[0128] Among them, the feature extraction module 1210 is used to obtain the high-order vector of the individual stock based on the initial characterization of the individual stock; the label conversion module 1220 is used to obtain the gene vector of the individual stock according to the association graph between the individual stock and the relevant labels; the first factor construction module 1230 is used to obtain the historical expected factor and the historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock; the second factor construction module 1240 is used to obtain the style vector and hot spot factor of the individual stock according to the market preference, and obtain the valuation factor and the market value factor of the individual stock based on the style vector of the individual stock; the prediction module 1250 is used to obtain the predicted value probability distribution of the individual stock based on the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot spot factor, the valuation factor of the individual stock and the market value factor of the individual stock.

[0129] It should be noted that the functions of each module in the system of this embodiment correspond one-to-one to the method of the present application, so they will not be repeated here.

[0130] It should be noted that it should be understood that the division of the above modules is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a chip of the above-mentioned device for implementation. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0131] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0132] The embodiment of the present application also provides a computer-readable storage medium. A person skilled in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing a processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof.

[0133] An embodiment of the present application also provides an electronic device, including: a processor and a memory.

[0134] Specifically, the memory is used to store computer programs; the memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0135] The processor is used to execute the computer program stored in the memory so that the electronic device executes the above-mentioned financial field data prediction method based on probability distribution.

[0136] like Fig.13 As shown, the electronic device of the present invention is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors or processing units 131, memory 132, and a bus 133 connecting different system components (including memory 132 and processing unit 131).

[0137] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0138] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0139] The memory 132 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1323 may be used to read and write non-removable, non-volatile magnetic media ( Fig.13 not shown, usually called a "hard drive"). Although Fig.13Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 133 via one or more data medium interfaces. The memory 132 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0140] A program / utility 1324 having a set (at least one) of program modules 1325 may be stored, for example, in memory 132, such program modules 1325 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 1325 generally perform the functions and / or methods of the embodiments described herein.

[0141] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, displays, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via input / output (I / O) interface 134. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 135. Fig.13 As shown, the network adapter 135 communicates with other modules of the electronic device via the bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0142] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0143] In summary, this application considers the impact of historical similar sequences and market preferences on time series, and has better prediction results than traditional time series models. Compared with single-point predictions that only give a certain value, the data prediction based on probability distribution in this application can not only predict the probability distribution of future prices of individual stocks, but also provide uncertain information, so that its prediction results can provide investors with more accurate and comprehensive suggestions. Therefore, this application effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.

[0144] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for predicting financial data based on probability distribution, characterized in that: The prediction method comprises: Obtaining high-order vectors of individual stocks based on initial characterization data of individual stocks; Obtain the gene vector of individual stocks based on the association graph between individual stocks and related labels; Obtaining a historical expected factor and a historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock; and Acquire the style vector and hot factor of individual stocks according to market preferences, and acquire the valuation factor and market value factor of individual stocks based on the style vector of the individual stocks; The predicted value probability distribution of the individual stock is obtained based on the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock.

2. The financial field data prediction method based on probability distribution according to claim 1 is characterized in that: The high-order vectors of individual stocks are obtained based on the initial characterization data of individual stocks, including: Construct an initial representation of individual stocks based on the characteristics of the individual stocks and the sectors to which they belong; Based on a recurrent neural network algorithm, the initial characterization data of the individual stocks are converted into high-order vectors of the individual stocks.

3. The financial field data prediction method based on probability distribution according to claim 1 is characterized in that: Obtaining the gene vector of individual stocks based on the association graph between individual stocks and related labels includes: Connect the nodes of individual stocks and related labels to build a correlation graph between individual stocks and related labels; The association graph is sampled based on a graph random walk algorithm to obtain a co-occurrence sequence of individual stocks and related tags; The Skip-Gram algorithm is used to process the co-occurrence sequence of the individual stock and the relevant tags to obtain the gene vector of the individual stock.

4. The financial field data prediction method based on probability distribution according to claim 1 is characterized in that: Obtaining the historical expected factor and the historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock includes: Calculate and filter the historical data sequence of the individual stock based on the high-order vector of the individual stock and the gene vector of the individual stock; The historical expected factor of the individual stock and the historical standard deviation factor of the individual stock are calculated based on the historical data series of the individual stock.

5. The financial field data prediction method based on probability distribution according to claim 1 is characterized in that: The style vector and hot factor of individual stocks are obtained according to market preferences, and the valuation factor and market value factor of individual stocks are obtained based on the style vector of the individual stocks, including: Constructing a market hot spot preference data set and a market hot spot non-preference data set according to the rate of return of any trading day, and obtaining a first market hot spot preference vector and a first market hot spot non-preference vector according to the gene vector of the individual stock and the market hot spot preference data set and the market hot spot non-preference data set; Performing cosine similarity calculations on the gene vector of the individual stock and the first market hot spot preference vector, and on the gene vector of the individual stock and the first market hot spot non-preference vector, respectively, to generate two hot spot factors; Based on the industry labels of individual stock data, a style vector of the individual stock is constructed, and according to the style vector of the individual stock and the market hot spot preference data set and the market hot spot non-preference data set, a second market hot spot preference vector and a second market hot spot non-preference vector are obtained. Cosine similarity calculation is performed on the style vector of the individual stock and the second market hot spot preference vector, and on the style vector of the individual stock and the second market hot spot non-preference vector, respectively, to obtain the valuation factor of the individual stock and the market value factor of the individual stock.

6. The financial field data prediction method based on probability distribution according to claim 5 is characterized in that: The industry labels include: industry-wide PEG label, industry-wide PEG label, industry-wide PETTM label, industry-wide PETTM label, industry-wide dynamic P / E ratio label and industry-wide market value label.

7. The financial field data prediction method based on probability distribution according to claim 1 is characterized in that: Obtaining the predicted value probability distribution of the individual stock based on the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the valuation factor of the individual stock and the market value factor of the individual stock includes: Merging the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock to obtain a high-dimensional feature vector of the individual stock time series; The high-dimensional feature vector of the individual stock time series is processed through a diffusion model to obtain the probability distribution of the predicted value of the individual stock.

8. A financial data prediction system based on probability distribution, characterized in that: The system comprises: a feature extraction module, a label conversion module, a first factor construction module, a second factor construction module and a prediction module; The feature extraction module is used to obtain high-order vectors of individual stocks based on the initial representation of the individual stocks; The label conversion module is used to obtain the gene vector of the individual stock according to the association diagram between the individual stock and the relevant labels; The first factor construction module is used to obtain the historical expected factor and the historical standard deviation factor of the individual stock according to the high-order vector of the individual stock and the gene vector of the individual stock; The second factor construction module is used to obtain the style vector and hot factor of the individual stock according to the market preference, and obtain the valuation factor and market value factor of the individual stock based on the style vector of the individual stock; The prediction module is used to obtain the predicted value probability distribution of the individual stock based on the high-order vector of the individual stock, the historical expected factor of the individual stock, the historical standard deviation factor of the individual stock, the hot factor, the valuation factor of the individual stock and the market value factor of the individual stock.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by an electronic device, it implements the financial field data prediction method based on probability distribution as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory so that the electronic device executes the financial field data prediction method based on probability distribution as described in any one of claims 1 to 7.