Stock prediction model online integration method and system based on resampling distribution estimation

Through the online integration method of stock prediction model based on resampling distribution estimation, the problem of low prediction accuracy of a single prediction model in complex stock market environments is solved. Through resampling and linear ensemble weight generation, higher prediction accuracy and robustness are achieved.

CN119558966APending Publication Date: 2025-03-04SHANGHAI JIAOTONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311134374.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Existing stock prediction methods are difficult to obtain satisfactory results in complex and uncertain stock market environments, especially in the case of large data volume and complex and variable characteristics. It is difficult for a single prediction model to fully capture the dynamic characteristics of the market, resulting in low prediction accuracy.

Method used

The stock prediction model online integration method based on resampling distribution estimation is adopted. By obtaining the prediction results and stock data of the basic model, the time series features are extracted using a recurrent neural network, and the resampling weight is allocated to each sample through the resampler, and the joint probability distribution parameters are calculated to generate linear integration weights, realizing the combination and weight adjustment of different basic models.

Benefits of technology

By closer to future real data, the data distribution on the resampling set is solved, and the problem of distribution deviation between training data and prediction data is ensured to achieve online integration of the model on different trading days, improving the accuracy and robustness of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558966A_ABST
    Figure CN119558966A_ABST
Patent Text Reader

Abstract

The invention provides a stock prediction model online integration method and system based on resampling distribution estimation. The method comprises the steps of obtaining a basic model prediction result and stock data; a time sequence feature extractor based on a recurrent neural network extracts time sequence features; a resampler based on feature similarity carries out resampling on each sample formed by the time sequence features and the basic model prediction errors, and a resampling weight is distributed to each sample; calculating joint probability distribution parameters of time sequence features and basic model prediction errors on the resampling set to obtain a linear integrated weight generator; a linear integration weight generator is used for generating combination weights of different basic models on the data, and a final model integration prediction result is obtained; and calculating prediction loss according to the label prediction value and the label true value, and optimizing the feature extractor and the resampler. According to the method, the problem of model performance reduction caused by data distribution deviation between the training data set and the prediction data set is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of stock prediction, and in particular to an online integration method and system of a stock prediction model based on resampling distribution estimation. Background Art

[0002] As an important part of the financial market, the stock market's fluctuations and trends have a significant impact on the economy, enterprises and individuals. In this context, stock forecasting has become the focus of many investors, traders and analysts. By predicting stock prices, trading volumes and other related factors, investors can make more informed investment decisions and thus obtain better returns on their investments.

[0003] However, the complexity and uncertainty of the stock market make it very difficult to accurately predict stock prices. Currently, many prediction methods have been used to try to solve this problem, including statistical methods, machine learning methods, and deep learning methods. These methods have their own advantages and disadvantages, but in the highly dynamic and unstable environment of the stock market, a single prediction model often fails to obtain satisfactory results.

[0004] On the one hand, existing prediction methods often face the challenges of huge data volumes and complex and changing features. Stock market prices are affected by many factors, including company performance, macroeconomic factors, policies and regulations, market sentiment, etc. These factors are intertwined, resulting in nonlinearity and high noise in the data. Therefore, traditional statistical methods often find it difficult to capture this complexity and are prone to overfitting or underfitting problems.

[0005] On the other hand, using a single forecasting model is also susceptible to the limitations of the model itself and the selected features. Different forecasting models have their own scope of application and assumptions, and in the real stock market, the patterns of market behavior and price changes may be diverse and dynamically changing. Therefore, a single model may not be able to fully capture the dynamic characteristics of the market, resulting in low forecast accuracy.

[0006] In this context, online ensemble models have become a solution that has attracted much attention. Online ensemble models combine multiple forecasting models to fully utilize the advantages of each model and make up for the shortcomings of each model. Different forecasting models may perform better in different market environments or time periods, and online ensemble models can dynamically adjust the weights of each model or select specific models to adapt to different market conditions, thereby improving the robustness and robustness of the overall forecast. At the same time, by combining the forecast results of multiple models, online ensemble models can reduce the overfitting risk of a single model and improve the generalization ability of unknown data, thereby better adapting to future market fluctuations.

[0007] In summary, the market is in urgent need of a stock prediction method and system based on an online integrated prediction model that can overcome the problem of large prediction variance of a single model and improve the prediction progress.

[0008] Patent document CN111062522A (application number: CN201911217219.6) discloses a stock prediction method based on a time series chain. For the historical data of existing stocks, i.e., a time series, the distribution of extreme points is used to obtain as many effective subsequence lengths as possible. By searching the time series chain, a series of subsequences similar to the subsequence to be predicted and evolving are obtained. By analyzing the rise or fall of these subsequences, it is predicted whether the subsequence to be predicted will rise, achieving a higher prediction accuracy. However, this patent cannot completely solve the above technical problems. Summary of the invention

[0009] In view of the defects in the prior art, the object of the present invention is to provide an online integration method and system for stock prediction models based on resampling distribution estimation.

[0010] The online integration method of stock prediction model based on resampling distribution estimation provided by the present invention includes:

[0011] Step S1: Obtain the basic model prediction results and stock data;

[0012] Step S2: extracting time series features using a time series feature extractor based on a recurrent neural network;

[0013] Step S3: using a resampler based on feature similarity, resample each sample consisting of the time series feature and the basic model prediction error, and assign a resampling weight to each sample;

[0014] Step S4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and thereby obtain a linear ensemble weight generator;

[0015] Step S5: using a linear ensemble weight generator to generate the combined weights of different basic models on the data, thereby obtaining the final model ensemble prediction result;

[0016] Step S6: Calculate the prediction loss based on the label prediction value and the acquired label true value to optimize the feature extractor and resampler.

[0017] Preferably, the time series feature extractor based on the recurrent neural network reads the time series data, inputs it into the neural network, and outputs two different feature vectors, one of which is used to input the resampler to generate resampling weights, and the other vector and the corresponding basic model prediction error constitute a sample for distribution estimation.

[0018] Preferably, step S3 comprises:

[0019] Step S3.1: Divide all samples consisting of time series features and basic model prediction errors into multiple stages according to time;

[0020] Step S3.2: For each stage, the average feature within the stage is calculated as the overall feature of the time period;

[0021] Step S3.3: For each sample, calculate the similarity with the overall features of all stages respectively, and obtain the similarity change trend vector;

[0022] Step S3.4: The similarity change trend vector is used as the resampling feature of the sample and input into the neural network to obtain the resampling weight of the sample.

[0023] Preferably, the linear ensemble weight generator is calculated on a resampled set that is closer to the future distribution, and the model prediction error and the extracted time series features obey a high-dimensional Gaussian distribution, and the calculation formula of its probability distribution is as follows:

[0024]

[0025] in, is the mean estimate vector of the sample Gaussian distribution, is the covariance estimation matrix of the sample Gaussian distribution, a n is the weight value of the nth sample, x n is the nth sample vector, and T is the total number of samples.

[0026] Preferably, when generating linear integration weights, it is necessary to calculate the conditional probability distribution of the basic model prediction error vector E, and solve the optimal weight according to the distribution. The conditional probability distribution calculation formula under the high-dimensional Gaussian distribution is as follows:

[0027]

[0028]

[0029] Among them, μ 1|2 is the mean vector of the Gaussian distribution that vector x1 obeys when vector x2 is given, ∑ 1|2 is the covariance matrix of the Gaussian distribution that x1 obeys;

[0030] The optimal combination weight solution formula is as follows:

[0031]

[0032] Among them, w *is the optimal combination weight vector, 1 is a vector with all values ​​1, and ∑ is the covariance matrix of the Gaussian distribution of the model prediction error;

[0033] After the prediction phase is over, the mean square error is calculated based on the label prediction value and the obtained label true value as the loss to train the feature extractor and resampler.

[0034] The online integrated system of stock prediction model based on resampling distribution estimation provided by the present invention comprises:

[0035] Module M1: Obtain the basic model prediction results and stock data;

[0036] Module M2: Extract time series features using a time series feature extractor based on a recurrent neural network;

[0037] Module M3: Using a resampler based on feature similarity, resample each sample consisting of time series features and basic model prediction errors, and assign a resampling weight to each sample;

[0038] Module M4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and obtain the linear ensemble weight generator;

[0039] Module M5: Use the linear ensemble weight generator to generate the combined weights of different basic models on the data, thereby obtaining the final model ensemble prediction result;

[0040] Module M6: Calculate the prediction loss based on the label prediction value and the obtained label true value to optimize the feature extractor and resampler.

[0041] Preferably, the time series feature extractor based on the recurrent neural network reads the time series data, inputs it into the neural network, and outputs two different feature vectors, one of which is used to input the resampler to generate resampling weights, and the other vector and the corresponding basic model prediction error constitute a sample for distribution estimation.

[0042] Preferably, the module M3 includes:

[0043] Module M3.1: All samples consisting of time series features and basic model prediction errors are divided into multiple stages according to time;

[0044] Module M3.2: For each stage, calculate the average characteristics within the stage as the overall characteristics of the time period;

[0045] Module M3.3: For each sample, calculate the similarity with the overall features of all stages and obtain the similarity change trend vector;

[0046] Module M3.4: Use the similarity change trend vector as the sample resampling feature and input it into the neural network to obtain the resampling weight of the sample.

[0047] Preferably, the linear ensemble weight generator is calculated on a resampled set that is closer to the future distribution, and the model prediction error and the extracted time series features obey a high-dimensional Gaussian distribution, and the calculation formula of its probability distribution is as follows:

[0048]

[0049] in, is the mean estimate vector of the sample Gaussian distribution, is the covariance estimation matrix of the sample Gaussian distribution, a n is the weight value of the nth sample, x n is the nth sample vector, and T is the total number of samples.

[0050] Preferably, when generating linear integration weights, it is necessary to calculate the conditional probability distribution of the basic model prediction error vector E, and solve the optimal weight according to the distribution. The conditional probability distribution calculation formula under the high-dimensional Gaussian distribution is as follows:

[0051]

[0052]

[0053] Among them, μ 1|2 is the mean vector of the Gaussian distribution that vector x1 obeys when vector x2 is given, ∑ 1|2 is the covariance matrix of the Gaussian distribution that x1 obeys;

[0054] The optimal combination weight solution formula is as follows:

[0055]

[0056] Among them, w * is the optimal combination weight vector, 1 is a vector with all values ​​1, and ∑ is the covariance matrix of the Gaussian distribution of the model prediction error;

[0057] After the prediction phase is over, the mean square error is calculated based on the label prediction value and the obtained label true value as the loss to train the feature extractor and resampler.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] (1) The present invention resamples historical data to obtain a resampled set that is closer to the distribution of future real data, thereby solving the problem of reduced model performance caused by data distribution deviation between the training data set and the prediction data set;

[0060] (2) The present invention evaluates the performance of all basic models to be integrated over a period of time to obtain the probability distribution of the basic model prediction error, and then calculates the linear integration weight that can theoretically minimize the overall error by solving the optimization problem, thereby ensuring that the model can be integrated online on different trading days to improve the accuracy of the prediction;

[0061] (3) The present invention calculates the similarity between the time series characteristics of each data and the overall time series characteristics of different periods, thereby calculating different resampling weights for each data, ensuring that samples that are more similar to the future data distribution can obtain higher weights. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0063] Figure 1 It is a schematic diagram of the workflow of the present invention;

[0064] Figure 2 This is a model architecture diagram of the present invention. DETAILED DESCRIPTION

[0065] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0066] Example 1

[0067] The present invention generates a data set that is more similar to the distribution of future data by training a resampler that resamples historical data, and improves the stock series prediction effect by learning a linear integrated weight generator on the data set.

[0068] The present invention provides historical time series data of all stocks within a given period of time. Specifically, for a given stock X, starting from trading day T, the previous 60 trading days include the opening price, closing price, highest price, lowest price, volume weighted average price, and trading volume of each trading day within trading day T. Use the above-mentioned vector of length 360 as input to predict the recommendation score of each stock on trading day T+1, and sort all stocks from high to low according to the recommendation score. Among them, 360 is the length of the historical data vector of a single stock on a single trading day. In the present invention, the recommendation score of stock i on trading day T+1 is calculated as follows:

[0069]

[0070] According to an online integration method of a stock prediction model based on resampling distribution estimation provided by the present invention, Figure 1 As shown, including:

[0071] Step S1: Get the basic model prediction results and stock data. For example, if there are 20 stock prediction models that can give different score predictions for each stock, then the basic model prediction results for each stock every day are a vector of length 20, and each number in the vector is the prediction value of a certain basic model for that stock on that day. Similarly, the basic model prediction error data for each stock every day corresponds to the prediction value data, which is also a vector of length 20, in which each value is the value of a certain basic model prediction result minus the true label.

[0072] Step S2: Extract time series features using a time series feature extractor based on a recurrent neural network. Specifically, for each stock's daily data, the above 360-dimensional vector is input into a long short-term memory recurrent neural network (LSTM), and a 64-dimensional feature vector is output, of which the first 32 dimensions together with the basic model prediction error data constitute a training data set, where each sample is a 32+m-dimensional vector (m is the number of basic models to be integrated); the last 32-dimensional data is input into a resampler to calculate the resampling weight.

[0073] Step S3: Use a resampler based on feature similarity to resample each sample consisting of time series features and basic model prediction errors, and assign a resampling weight to each sample. In other words, the resampler will assign higher resampling weights to samples that are considered to be more similar to future data distributions, and lower weights to samples that are considered to be more similar to future data distributions, so that the data distribution on the resampled set is more similar to the future. After obtaining a data set similar to the future data distribution, the optimal basic model combination weights can be calculated through the probability distribution of the basic model prediction errors, for example, a higher weight is assigned to a basic model with a smaller error variance, that is, a better effect. Furthermore, the model selection based on the dynamic performance of the primary model and the similarity between models includes the following sub-steps:

[0074] Step S3.1: All samples consisting of time series features and basic model prediction errors are divided into several stages according to time. Specifically, for historical data with a length of one year, if each month is regarded as a stage, all samples will be divided into twelve stages.

[0075] Step S3.2: For each stage, the average feature in the stage is calculated as the overall feature of the time period. For example, for the data set divided into twelve stages above, the time series features of all samples in each stage are averaged to obtain twelve overall time series features.

[0076] Step S3.3: For each sample, the similarity is calculated with the overall features of all stages to obtain a similarity change trend vector. For example, for the overall time features of the twelve stages mentioned above, each sample is calculated with the twelve overall time feature vectors, so each sample obtains a similarity change trend vector with a length of twelve.

[0077] Step S3.4: The similarity change trend vector is used as the resampling feature of the sample and input into the linear layer of the neural network to obtain the resampling weight of the sample.

[0078] The present invention aims to provide a framework based on online integration of different basic forecasting models, which can provide different model combinations and weights according to the forecasting performance of each model on different trading days, and output the integrated stock forecast sequence to achieve better stock sequence prediction accuracy.

[0079] Further, the stock prediction method of the present invention is specifically described as follows by taking examples:

[0080] Assuming that the CSI 300 stocks of the Shanghai Stock Exchange and the Shenzhen Stock Exchange are used, and assuming that the current date is 6:00 p.m. on May 19, 2020, the recommendation score of the CSI 300 stocks on May 20, 2020 is to be predicted. The data from January 1, 2015 to December 31, 2019 is used as the training set, and the data from February 20, 2020 to May 19, 2020 is used as the support set for resampling and estimating the data distribution.

[0081] Step 1: Perform data preprocessing and calculate the recommendation score of each stock based on the daily closing price and the next day's closing price. Divide the data set into several time periods, each of which contains data within 60 days before the required prediction date as the support set for resampling and estimating the data distribution, and the data on the required prediction date as the query set.

[0082] Step 2: For each time period, a time series feature extractor based on a recurrent neural network is used to extract time series features. Specifically, for each stock's daily data, a 360-dimensional fundamental data vector is input into a long short-term memory recurrent neural network (LSTM), which outputs a 64-dimensional feature vector, of which the first 32 dimensions together with the basic model prediction error data form a training data set, where each sample is a 32+m-dimensional vector (m is the number of basic models to be integrated); the last 32-dimensional data is input into the resampler to calculate the resampling weight.

[0083] Step 3: Use a resampler based on feature similarity to resample each sample consisting of both time series features and basic model prediction errors, and assign a resampling weight to each sample. Specifically, first divide all samples consisting of time series features and basic model prediction errors into several stages according to time, and calculate the average features within each stage as the overall features of the time period. For each sample, calculate the similarity with the overall features of all stages, obtain the similarity change trend vector, and use it as the resampling feature of the sample, and input it into the neural network to obtain the resampling weight of the sample.

[0084] Step 4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and obtain the linear ensemble weight generator.

[0085] Step 5: For the data of the day to be predicted, use the linear ensemble weight generator to generate the combined weights of different basic models on the data, thereby obtaining the final model ensemble prediction result.

[0086] Step S6: After the current prediction phase is completed, the prediction loss is calculated based on the label prediction value and the acquired label true value, so as to optimize the feature extractor and resampler.

[0087] Example 2

[0088] like Figure 2 The present invention also provides an online integration system of a stock prediction model based on resampling distribution estimation. The online integration system of a stock prediction model based on resampling distribution estimation can be implemented by executing the process steps of the online integration method of a stock prediction model based on resampling distribution estimation, that is, those skilled in the art can understand the online integration method of a stock prediction model based on resampling distribution estimation as a preferred implementation of the online integration system of a stock prediction model based on resampling distribution estimation.

[0089] The online integrated system of stock prediction model based on resampling distribution estimation provided by the present invention comprises:

[0090] Module M1: Obtain the basic model prediction results and stock data;

[0091] Module M2: Extract time series features using a time series feature extractor based on a recurrent neural network;

[0092] Module M3: Using a resampler based on feature similarity, resample each sample consisting of time series features and basic model prediction errors, and assign a resampling weight to each sample. This module can be divided into the following submodules:

[0093] Module M3.1: All samples consisting of time series features and basic model prediction errors are divided into several stages according to time;

[0094] Module M3.2: For each stage, calculate the average characteristics within the stage as the overall characteristics of the time period;

[0095] Module M3.3: For each sample, calculate the similarity with the overall features of all stages and obtain the similarity change trend vector;

[0096] Module M3.4: Use the similarity change trend vector as the sample resampling feature and input it into the neural network to obtain the resampling weight of the sample;

[0097] Module M4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and obtain the linear ensemble weight generator. The calculation of this module is based on the joint probability distribution of the time series features and the prediction error of the basic model on the resampled data set. This module assumes that the model prediction error and the extracted time series features obey a high-dimensional Gaussian distribution. The calculation formula of its probability distribution is as follows:

[0098]

[0099] in, is the mean estimate vector of the sample Gaussian distribution, is the covariance estimation matrix of the sample Gaussian distribution, a n is the weight value of the nth sample, x n is the nth sample vector, and T is the total number of samples.

[0100] Module M5: For the data of the next period of time, the linear integration weight generator is used to generate the combined weights of different basic models on the data, thereby obtaining the final model integration prediction result. When generating linear integration weights, it is necessary to calculate the conditional probability distribution of the basic model prediction error vector E and solve the optimal weight based on the distribution. The conditional probability distribution calculation formula under high-dimensional Gaussian distribution is as follows:

[0101]

[0102]

[0103] Among them, μ 1|2 is the mean vector of the Gaussian distribution that vector x1 obeys when vector x2 is given, ∑ 1|2 is the covariance matrix of the Gaussian distribution that x1 follows.

[0104] The optimal combination weight solution formula is as follows:

[0105]

[0106] Among them, w * is the optimal combination weight vector, 1 is a vector with all values ​​1, and ∑ is the covariance matrix of the Gaussian distribution of the model prediction error

[0107] Module M6: After the prediction phase, the mean square error (MSE) is calculated as the loss based on the label prediction value and the obtained label true value to train the feature extractor and resampler.

[0108] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.

[0109] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. An online integration method for stock prediction models based on resampling distribution estimation, characterized in that: include: Step S1: Obtain the basic model prediction results and stock data; Step S2: extracting time series features using a time series feature extractor based on a recurrent neural network; Step S3: using a resampler based on feature similarity, resample each sample consisting of the time series feature and the basic model prediction error, and assign a resampling weight to each sample; Step S4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and thereby obtain a linear ensemble weight generator; Step S5: using a linear ensemble weight generator to generate the combined weights of different basic models on the data, thereby obtaining the final model ensemble prediction result; Step S6: Calculate the prediction loss based on the label prediction value and the acquired label true value, so as to optimize the feature extractor and the resampler.

2. The online integration method of stock prediction model based on resampling distribution estimation according to claim 1 is characterized in that: The time series feature extractor based on the recurrent neural network reads the time series data, inputs it into the neural network, and outputs two different feature vectors, one of which is used to input the resampler to generate resampling weights, and the other vector and the corresponding basic model prediction error constitute a sample for distribution estimation.

3. The online integration method of stock prediction model based on resampling distribution estimation according to claim 1 is characterized in that: The step S3 comprises: Step S3.1: Divide all samples consisting of time series features and basic model prediction errors into multiple stages according to time; Step S3.2: For each stage, the average feature within the stage is calculated as the overall feature of the time period; Step S3.3: For each sample, calculate the similarity with the overall features of all stages respectively, and obtain the similarity change trend vector; Step S3.4: The similarity change trend vector is used as the resampling feature of the sample and input into the neural network to obtain the resampling weight of the sample.

4. The online integration method of stock prediction model based on resampling distribution estimation according to claim 1 is characterized in that: The linear ensemble weight generator is calculated on a resampled set that is closer to the future distribution. The model prediction error and the extracted time series features obey a high-dimensional Gaussian distribution, and the calculation formula for its probability distribution is as follows: in, is the mean estimate vector of the sample Gaussian distribution, is the covariance estimation matrix of the sample Gaussian distribution, a n is the weight value of the nth sample, x n is the nth sample vector, and T is the total number of samples.

5. The online integration method of stock prediction model based on resampling distribution estimation according to claim 4 is characterized in that: When generating linear integration weights, it is necessary to calculate the conditional probability distribution of the basic model prediction error vector E and solve the optimal weight based on the distribution. The conditional probability distribution calculation formula under the high-dimensional Gaussian distribution is as follows: Among them, μ |2 is the mean vector of the Gaussian distribution that vector x1 obeys when vector x2 is given, ∑ 1|2 is the covariance matrix of the Gaussian distribution that x1 obeys; The optimal combination weight solution formula is as follows: Among them, w * is the optimal combination weight vector, 1 is a vector with all values ​​1, and ∑ is the covariance matrix of the Gaussian distribution of the model prediction error; After the prediction phase is over, the mean square error is calculated based on the label prediction value and the obtained label true value as the loss to train the feature extractor and resampler.

6. An online integrated system for stock prediction models based on resampling distribution estimation, characterized in that: include: Module M1: Obtain the basic model prediction results and stock data; Module M2: Extract time series features using a time series feature extractor based on a recurrent neural network; Module M3: Using a feature similarity-based resampler, resample each sample consisting of a time series feature and a basic model prediction error, and assign a resampling weight to each sample; Module M4: Calculate the joint probability distribution parameters of the time series features and the prediction error of the basic model on the resampled set, and obtain the linear ensemble weight generator; Module M5: Use the linear ensemble weight generator to generate the combined weights of different basic models on the data, thereby obtaining the final model ensemble prediction result; Module M6: Calculate the prediction loss based on the label prediction value and the obtained label true value to optimize the feature extractor and resampler.

7. The online integrated system for stock prediction model based on resampling distribution estimation according to claim 6 is characterized in that: The time series feature extractor based on the recurrent neural network reads the time series data, inputs it into the neural network, and outputs two different feature vectors, one of which is used to input the resampler to generate resampling weights, and the other vector and the corresponding basic model prediction error constitute a sample for distribution estimation.

8. The online integrated system for stock prediction model based on resampling distribution estimation according to claim 6, characterized in that: The module M3 comprises: Module M3.1: All samples consisting of time series features and basic model prediction errors are divided into multiple stages according to time; Module M3.2: For each stage, calculate the average characteristics within the stage as the overall characteristics of the time period; Module M3.3: For each sample, calculate the similarity with the overall features of all stages and obtain the similarity change trend vector; Module M3.4: Use the similarity change trend vector as the sample resampling feature and input it into the neural network to obtain the resampling weight of the sample.

9. The online integrated system for stock prediction model based on resampling distribution estimation according to claim 6, characterized in that: The linear ensemble weight generator is calculated on a resampled set that is closer to the future distribution. The model prediction error and the extracted time series features obey a high-dimensional Gaussian distribution, and the calculation formula for its probability distribution is as follows: in, is the mean estimate vector of the sample Gaussian distribution, is the covariance estimation matrix of the sample Gaussian distribution, a n is the weight value of the nth sample, x n is the nth sample vector, and T is the total number of samples.

10. The online integrated system for stock prediction model based on resampling distribution estimation according to claim 9, characterized in that: When generating linear integration weights, it is necessary to calculate the conditional probability distribution of the basic model prediction error vector E and solve the optimal weight based on the distribution. The conditional probability distribution calculation formula under the high-dimensional Gaussian distribution is as follows: Among them, μ |2 is the mean vector of the Gaussian distribution that vector x1 obeys when vector x2 is given, ∑ 1|2 is the covariance matrix of the Gaussian distribution that x1 obeys; The optimal combination weight solution formula is as follows: Among them, w * is the optimal combination weight vector, 1 is a vector with all values ​​1, and ∑ is the covariance matrix of the Gaussian distribution of the model prediction error; After the prediction phase is over, the mean square error is calculated based on the label prediction value and the obtained label true value as the loss to train the feature extractor and resampler.

Citation Information

Patent Citations

  • Stock prediction method based on time series chain

    CN111062522A

  • Intelligent terminal and stock trend prediction method based LSTM thereof

    CN106991506A

  • Stock rise and fall prediction method based on multi-task self-supervised learning

    CN113159945A

  • Performing predictive analysis on usage analytics

    US20150370863A1