Deep learning stock price probability prediction method based on multi-modal wavelet decomposition

Through the combination of multimodal wavelet decomposition and deep learning model, the problems of insufficient fusion of multimodal information, limitations of prediction results and improper noise processing in the existing technology are solved, and more accurate and reliable stock price prediction is achieved, providing more Rich investment information.

CN119090638APending Publication Date: 2024-12-06EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411114227.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing stock price prediction methods lack multimodal information fusion, the output results are determined rather than probability distribution, and the noise processing is insufficient, which limits the accuracy and practicality of the prediction.

Method used

Using a deep learning method based on multimodal wavelet decomposition, the dynamic continuous features, dynamic classification features, static continuous features and static classification features are fused, and the autoregressive recursive neural network model is constructed to directly output the probability distribution of stock price changes. .

Benefits of technology

It improves the accuracy and stability of prediction, significantly improves the accuracy of prediction, provides richer investment decision information, and obtains excess returns in actual investment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090638A_ABST
    Figure CN119090638A_ABST
Patent Text Reader

Abstract

The invention provides a deep learning stock price probability prediction method based on multi-modal wavelet decomposition, and the method comprises the following steps: constructing a multi-modal feature system, and fusing the multi-source heterogeneous features of dynamic continuity, dynamic classification, static continuity, static classification and the like; performing wavelet decomposition on the dynamic continuous features, and adaptively filtering noise components under different scales; a parallel fusion strategy is adopted, and different modal features are spliced on the feature dimension; and constructing a probability density model by using an autoregressive recurrent neural network, and directly outputting probability distribution prediction of stock price change. According to the method, comprehensive share price influence factor description is provided through multi-modal feature fusion, noise is effectively removed through wavelet decomposition, and the probability prediction model outputs share price distribution closer to reality. Experiments show that the model is remarkably superior to the existing method in indexes such as NRMSE and ND, and considerable excess benefits are obtained in an actual investment strategy. The invention provides a new method for stock price prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of financial data analysis and prediction, and specifically relates to a deep learning stock price probability prediction method based on multimodal wavelet decomposition. The present invention uses wavelet decomposition, multimodal feature fusion and probability prediction techniques to improve the accuracy and reliability of stock price prediction and provide support for quantitative investment decisions. Background Art

[0002] Stock price prediction has always been a core topic in financial market research and has great economic value. Stock prices are affected by many complex factors and show highly nonlinear and dynamic characteristics, which brings great challenges to modeling and prediction. In the field of securities asset pricing, multi-factor models are an important theoretical basis for quantitative stock selection and stock price prediction. From Markowitz's modern portfolio theory, to Sharpe's capital asset pricing model (CAPM), to Fama and French's three-factor and five-factor models, scholars have continuously explored the factors that affect asset pricing and laid a theoretical foundation for stock price prediction. In recent years, deep learning methods based on big data technology have been widely used. Neural network models such as LSTM have shown superior performance in processing financial time series prediction tasks, providing important support for investment decisions. In addition, wavelet theory, as a time-frequency analysis tool, also shows unique advantages in processing non-stationary financial time series with mutations and discontinuities.

[0003] There are still some shortcomings in the existing stock price prediction methods. First, most methods are based on only a single data source or limited characteristic factors, and lack the effective fusion of multimodal information. Second, many models output a certain predicted value rather than a probability distribution that conforms to reality. In addition, the processing of noise in financial time series needs to be strengthened. Although some methods have certain noise resistance capabilities, most studies have not specifically addressed the noise in financial time series. These problems limit the accuracy and practicality of the prediction model to a certain extent. There is an urgent need for a stock price prediction method that can make full use of multimodal data, output probability distribution predictions, and effectively handle noise. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to propose a deep learning stock price probability prediction method based on multimodal wavelet decomposition. The method integrates multi-source heterogeneous information such as dynamic continuous features, dynamic classification features, static continuous features and static classification features, and fully mines the complementary information of different feature subspaces through the strategy of parallel fusion, and comprehensively describes the multiple dimensions that affect stock price fluctuations. At the same time, the present invention adopts an autoregressive recursive neural network architecture, which can directly output the probability distribution prediction of stock price changes, rather than a single determined value prediction, which is closer to the characteristics of the actual stock price in the form of probability distribution. In addition, the present invention introduces wavelet decomposition technology to denoise the original time series, adaptively filter out noise components at different scales, and improve the ability to capture the inherent fluctuation law. Through these innovations, the present invention effectively solves the problems of insufficient multimodal information fusion, limited prediction results, improper noise processing, etc. in the prior art, and provides a new solution for stock price prediction.

[0005] The present invention provides a deep learning stock price probability prediction method based on multimodal feature wavelet decomposition to solve the problems existing in the prior art, such as insufficient multimodal information fusion, limited prediction results, improper noise processing, etc.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A deep learning stock price probability prediction method based on multimodal feature wavelet decomposition, specifically including:

[0008] For the target stock, multimodal feature engineering is performed, which consists of 1 single-dimensional feature of stock price time series and m-1 auxiliary multi-dimensional features of modalities, including:

[0009] The stock price time series characteristics based on the past L time steps: Where d1 represents the dimension of the stock price time series characteristics at time t;

[0010] And auxiliary features of m-1 modes in the past L time steps:

[0011] where d i Represents the characteristic dimension of the i-th mode at time t;

[0012] There are m types of modal features, which are classified into dynamic continuous features, static continuous features, dynamic classification features and static classification features;

[0013] For the single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition;

[0014] Perform feature extraction on each modal feature;

[0015] Perform feature fusion on each modality feature;

[0016] Build a deep learning model with multimodal features to predict the probability distribution of stock prices in the next T time steps: Among them, x (1) ,...,x (m) Represents the characteristic data of all modes in the past L time steps.

[0017] Furthermore, the single-dimensional characteristics of the stock price time series include:

[0018] Based on the 6-year historical Daily OHLC financial data of the stock exchange, the closing price (Close) is selected as the single-dimensional feature of the stock price time series Where L represents the time step, reflecting the target price and prediction target of daily stock price changes as dynamic continuous features.

[0019] Furthermore, the m-1 multi-dimensional auxiliary features include:

[0020] Based on 6 years of historical Daily-level OHLC financial data from stock exchanges, as dynamic continuous features, including:

[0021] Opening price (Open), highest price (High), and lowest price (Low) reflect the daily price fluctuation range of the stock price;

[0022] Volume and Turnover reflect the trading activity;

[0023] The above data comes from Tushare Pro;

[0024] Quantitative factors use valuation factors, momentum factors, reversal factors and growth factors as dynamic continuous features, and the data comes from the Wind database;

[0025] See the table below for details:

[0026]

[0027] Attention Index: Baidu Index and Dongfang Fortune Stock Forum post volume, reflecting the public and market's attention to the stock; as a dynamic and continuous feature, the data comes from Baidu Index and Dongfang Fortune Stock Forum respectively;

[0028] Volatility: A 20-trading-day window is used to calculate the historical volatility of the stock price as a dynamic continuous feature; the formula is as follows:

[0029]

[0030] in: T=20,Ct represents the closing price of the tth trading day, r t represents the logarithmic return on the tth trading day;

[0031] Analyst Rating: It is divided into buy, hold and sell, reflecting the analysts’ optimism about the company’s prospects, and is a dynamic classification feature; the data comes from the Guotai An database;

[0032] News Event: It is divided into positive, negative and neutral, reflecting the positive or negative impact of news events on the company, as a dynamic classification feature; the data comes from the Guotai An database;

[0033] Index Weight: The weight data of the stock in the index, as a static continuous feature; the data comes from Tushare Pro;

[0034] Industry classification: Shenwan first-level industry classification is used, with a total of 28 categories, as static classification features; data comes from the Wind database;

[0035] Stock price classification (Price Level): According to the stock price from high to low, it is divided into high, medium and low price stocks, the top 10% high-priced stocks, the bottom 10% low-priced stocks, and the middle-priced stocks in the meantime, as a static classification feature; the data comes from Tushare Pro;

[0036] Market Cap Level: According to the stock market value from high to low, it is divided into high, medium and low market value, with the top 10% high market value, the bottom 10% low market value, and the medium market value during the period as a static classification feature; the data comes from Tushare Pro;

[0037] The above multi-source heterogeneous features together constitute a multimodal feature system, providing comprehensive data support for stock price prediction.

[0038] Furthermore, the single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition, including:

[0039] For the single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition to obtain J subsequences w (1,1) ,...,w (1,J) ,in, The purpose of this step is to remove the noise in the stock price data and extract the denoised signal.

[0040] Further, the feature extraction for each modal feature includes:

[0041] For each modality of data, use a feature extractor (such as MLP, Multiplayer Perceptron) to extract hidden features: where f i represents the feature extractor of the i-th modality, represents the d extracted from the i-th mode at time t h dimensional hidden features; among them, for the stock price time series feature (i=1), the denoised sequence w (1,j) , input into the feature extractor, and obtain the corresponding K hidden features h (1,j,1) ,...,h (1,j,K) , j = 1, 2, ..., J; where represents the Kth hidden feature extracted from the jth subsequence, k = 1, 2, ..., K.

[0042] Furthermore, feature fusion is performed on each modality feature, including:

[0043] Concatenate the K hidden feature subsequences and the hidden feature sequences of m-1 modes:

[0044]

[0045] in

[0046] Furthermore, the construction of a deep learning model with multimodal features includes:

[0047] The fused feature sequence H is input into the Auto-regressive Recurrent Neural Network (ARNN) model to predict the stock price probability distribution parameters (mean and variance) for the next T time steps:

[0048]

[0049] Where Predictor represents the prediction model, μ t ∈R and Respectively represent the predicted mean and variance of the stock price at time t; Gaussian distribution is adopted, that is,

[0050] Finally, the probability distribution of stock prices in the next T time steps is obtained:

[0051]

[0052] This distribution can be used to quantify the uncertainty of stock price forecasts and provide richer information for investment decisions;

[0053] During the training phase, the negative log-likelihood is used as the loss function:

[0054]

[0055] And use the gradient descent optimization algorithm to minimize this loss function and learn the parameters of the model.

[0056] The beneficial effects of the present invention are:

[0057] 1. The present invention comprehensively describes various factors affecting stock prices by fusing multimodal features, thereby improving the accuracy of prediction.

[0058] 2. The present invention introduces wavelet decomposition technology to reduce the noise of time series, effectively removes noise components of different scales, and improves the stability and reliability of prediction.

[0059] 3. The present invention adopts a probability density model to directly output the probability distribution of stock price changes, which better reflects the uncertainty of stock price changes and provides richer information for investment decisions.

[0060] 4. The present invention is significantly superior to existing methods in terms of indicators such as NRMSE and ND, and the prediction accuracy is greatly improved.

[0061] 5. The investment strategy constructed based on the prediction results of the present invention has achieved significant excess returns in actual backtesting, verifying the effectiveness of this method in actual investment decision-making.

[0062] In summary, the present invention not only enriches the research content of quantitative investment in theory, but also shows good effects in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 is a flow chart of the present invention;

[0064] Figure 2 This is the original time series chart of the daily K-line closing prices of a certain bank in 2023 in the present invention;

[0065] Figure 3 This is a time series diagram of the daily K-line closing prices of a certain bank in 2023 after wavelet decomposition and noise reduction;

[0066] Figure 4 This is a prediction effect diagram of a certain stock in the present invention;

[0067] Figure 5 This is a prediction effect diagram of a certain stock in the present invention;

[0068] Figure 6 This is a prediction effect diagram of a certain stock in the present invention;

[0069] Figure 7A comparison chart of the excess return of the investment strategy constructed by the method proposed in the present invention and the return of a certain index. DETAILED DESCRIPTION

[0070] The present invention will be further described below in conjunction with the accompanying drawings:

[0071] The present invention proposes a deep learning stock price probability prediction method based on multimodal wavelet decomposition, comprising:

[0072] (1) Construct a multimodal feature system, including dynamic continuous features, dynamic classification features, static continuous features, and static classification features;

[0073] (2) performing wavelet decomposition on the dynamic continuous features to obtain a denoised time series;

[0074] (3) Parallel fusion of features of each modality;

[0075] (4) Input the fused features into the autoregressive recurrent neural network to construct a probability density model;

[0076] (5) Output the probability distribution prediction of stock price changes.

[0077] The dynamic continuous features include OHLC data: opening price (Open), highest price (High), lowest price (Low), closing price (Close), reflecting the daily price fluctuation range of stock prices; trading volume (Volume) and transaction amount (Turnover), reflecting the trading activity; quantitative factors, mainly valuation factors, momentum factors, reversal factors and growth factors; attention index: Baidu Index, Dongcai Stock Bar posting volume, reflecting the public and market's attention to the stock; volatility (Volatility): using a 20-trading-day window to calculate the historical volatility level of the stock price.

[0078] The dynamic classification features include analyst ratings: divided into buy, hold and sell, reflecting the analysts' optimism about the company's prospects; and news events: divided into positive, negative and neutral, reflecting the positive or negative impact of news events on the company.

[0079] The static continuous features include index weight ratio (Index Weight): weight data of the stock in the index.

[0080] The static classification features include industry classification (Industry): using Shenwan first-level industry classification, a total of 28 categories; stock price classification (Price Level): according to the stock price from high to low, it is divided into high, medium and low price stocks; market value classification (Market CapLevel): according to the stock market value from high to low, it is divided into high, medium and low market value.

[0081] The wavelet decomposition adopts the following steps:

[0082] (1) Project the time series onto a series of wavelet basis functions;

[0083] (2) threshold processing of wavelet coefficients;

[0084] (3) Use the processed wavelet coefficients to reconstruct the denoised time series.

[0085] The parallel fusion adopts the following steps:

[0086] (1) Apply a feature extractor to the features of each modality;

[0087] (2) Concatenate the features extracted from different modalities in the feature dimension.

[0088] The probability density model adopts the Gaussian mixture distribution that the future stock price obeys autoregressive.

[0089] The following steps are also included:

[0090] Based on the probability distribution prediction results, an investment portfolio is constructed and backtested.

[0091] like Figure 1 As shown in FIG, the method mainly includes four key steps: multimodal feature extraction, wavelet decomposition denoising, feature fusion, and probability prediction based on auto-regressive recurrent neural network (ARNN).

[0092] 1. Problem Definition

[0093] The present invention aims to build a multimodal deep learning model for predicting the probability distribution of stock prices. There are m types of modal features, including time series data of volume and price market, technical indicators, quantitative factors and other data (such as research reports, news and public opinion, macro industry data, etc.). The goal is to use these multimodal features to predict the probability distribution of stock prices in the next T time steps.

[0094] Specifically, for the target stock, there is the stock price time series data of the past L time steps: Where d1 represents the dimension of the stock price feature at time t. At the same time, there are auxiliary data of other m-1 modes in the past L time steps: where d i Represents the characteristic dimension of the i-th mode at time t.

[0095] The task is to predict the probability distribution of stock prices in the next T time steps: Among them, x(1) ,...,x (m) Represents the characteristic data of all modes in the past L time steps.

[0096] 2. Wavelet decomposition

[0097] The present invention first analyzes the stock price time series Perform wavelet decomposition to reduce noise. The specific steps are as follows:

[0098] (1) Define the wavelet basis function under scale j and translation q:

[0099]

[0100] Among them, φ is the wavelet mother function (scaling function), and ψ is the corresponding wavelet function (wavelet function).

[0101] (2) Calculate the wavelet coefficients:

[0102]

[0103] d j [q] = ∫x (1) (t)ψ j,q (t)dt

[0104] Among them, a j [q] is called the approximation coefficients, which captures the low-frequency trend information of the time series; d j [q] is called detail coefficients, which captures the high-frequency detail information of the time series.

[0105] (3) Threshold processing of wavelet coefficients:

[0106] h λ (x) = x·I(|x|>λ)

[0107] Among them, the threshold is λ, and the hard threshold function h λ (x).

[0108] (4) Reconstruct the denoised time series:

[0109]

[0110] Figure 2 and Figure 3 The original time series of a bank's daily K-line closing prices throughout 2023 and the time series after wavelet decomposition and denoising are shown respectively.

[0111] 3. Multimodal feature extraction and fusion

[0112] The present invention constructs a multimodal feature system including dynamic continuous features, dynamic classification features, static continuous features and static classification features. For the stock price data mode, the signal after wavelet decomposition is divided into segments of length l. For other modes, the original data is directly divided into segments of length l. Then, a feature extractor (such as MLP) is applied to each segment to extract a segment of length d. h hidden features of .

[0113] Finally, a parallel fusion strategy is adopted to concatenate the features of different modalities in the feature dimension:

[0114]

[0115] The fused multimodal features are expressed as in This comprehensive feature will serve as the input for subsequent prediction models.

[0116] 4. Probabilistic prediction

[0117] The present invention uses an autoregressive recursive neural network (ARNN) to construct a probability density model. Assume that the stock price in the next T time steps obeys an autoregressive Gaussian mixture distribution:

[0118]

[0119] The distribution parameters are generated in the following way:

[0120] MLP(h t-1 )=[π t,1 ,...,π t,K ;μ t,1 ,...,μ t,K ; σ t,1 ,...,σ t,K ]

[0121] π t,k =Softmax(π t,k ), k=1,...,K

[0122] σ t,k =Softplus(σ t,k ), k=1,...,K

[0123] During the training phase, negative log-likelihood is used as the loss function:

[0124]

[0125] 5. Experimental Results

[0126] The present invention conducts an empirical analysis on a certain index component stock. Figure 4, Figure 5 and Figure 6 The prediction results of three stocks are shown separately.

[0127] In addition, the present invention also constructs a multi-factor stock selection strategy based on the prediction results of the model. Figure 7 As shown, the strategy achieved an excess return of 12.88% during the backtest period from July 2, 2023 to January 31, 2024, and the annualized excess return reached 25.76%.

[0128] In summary, the method proposed in the present invention performs well in the stock price prediction task. It is not only better than the existing methods in terms of prediction accuracy, but also shows good application value in actual investment strategies.

Claims

1. A deep learning stock price probability prediction method based on multimodal wavelet decomposition, characterized in that: The specific steps include: For the target stock, multimodal feature engineering is performed, which consists of 1 single-dimensional feature of stock price time series and m-1 auxiliary multi-dimensional features of modalities, including: The stock price time series characteristics based on the past L time steps: Where d1 represents the dimension of the stock price time series characteristics at time t; And auxiliary features of m-1 modes in the past L time steps: where d i Represents the characteristic dimension of the i-th mode at time t; There are m types of modal features, which are classified into dynamic continuous features, static continuous features, dynamic classification features and static classification features; For the single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition; Perform feature extraction on each modal feature; Perform feature fusion on each modality feature; Build a deep learning model with multimodal features to predict the probability distribution of stock prices in the next T time steps: Among them, x (1) ,...,x (m) Represents the characteristic data of all modes in the past L time steps.

2. The deep learning stock price probability prediction method according to claim 1 is characterized in that: The single-dimensional characteristics of the stock price time series include: Based on the 6-year historical Daily OHLC financial data of the stock exchange, the closing price is selected as the single-dimensional feature of the stock price time series Where L represents the time step, reflecting the target price and prediction target of daily stock price changes as dynamic continuous features.

3. The deep learning stock price probability prediction method according to claim 1 is characterized in that: The m-1 multi-dimensional auxiliary features include: Based on 6 years of historical Daily-level OHLC financial data from stock exchanges, as dynamic continuous features, including: Opening price, highest price, and lowest price reflect the daily price fluctuation range of the stock price; Trading volume and transaction amount reflect trading activity; Quantitative factors, using valuation factors, momentum factors, reversal factors and growth factors as dynamic continuous features; Attention Index: Baidu Index and Dongcai Stock Forum post volume, reflecting the public and market's attention to the stock; as a dynamic continuous feature; Volatility: Using a 20-trading-day window, calculate the historical volatility level of the stock price as a dynamic continuous feature; the formula is as follows: in: T=20,C t represents the closing price of the tth trading day, r t represents the logarithmic return on the tth trading day; Research report rating: divided into buy, hold and sell, reflecting the analyst's optimism about the company's prospects, as a dynamic classification feature; Public opinion events: divided into positive, negative and neutral, reflecting the positive or negative impact of news events on the company, as a dynamic classification feature; Index weight: The weight of the stock in the index, as a static continuous feature; Industry classification: Shenwan first-level industry classification is used, with a total of 28 categories, as static classification features; Stock price classification: According to the stock price from high to low, it is divided into high, medium and low price stocks, the top 10% high-priced stocks, the bottom 10% low-priced stocks, and the middle-priced stocks in the meantime, as a static classification feature; Market Cap Level: According to the stock market value from high to low, it is divided into high, medium and low market value, with the top 10% high market value, the bottom 10% low market value, and the medium market value in the meantime as a static classification feature.

4. The deep learning stock price probability prediction method according to claim 1 is characterized in that: The single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition, including: For the single-dimensional feature x of the stock price time series (1) Perform wavelet decomposition to obtain J subsequences w (1,1) ,...,w (1,J) ,in, j=1,2,...,J; remove the noise in the stock price data and extract the noise-reduced signal.

5. The deep learning stock price probability prediction method according to claim 1 is characterized in that: The feature extraction for each modal feature includes: For each modality of data, use the feature extractor to extract hidden features: i=1,2,...,m; where f i represents the feature extractor of the i-th modality, represents the d extracted from the i-th mode at time t h dimensional hidden features; among them, for the stock price time series feature (i=1), the denoised sequence w (1,j) , input into the feature extractor, and obtain the corresponding K hidden features h (1,j,1) ,...,h (1,j,K) , j = 1, 2, ..., J; where represents the Kth hidden feature extracted from the jth subsequence, k = 1, 2, ..., K.

6. The deep learning stock price probability prediction method according to claim 1, characterized in that: Perform feature fusion on each modality feature, including: Concatenate the K hidden feature subsequences and the hidden feature sequences of m-1 modes: in 7. The deep learning stock price probability prediction method according to claim 1, characterized in that: The construction of a deep learning model with multimodal features includes: The fused feature sequence H is input into the autoregressive recurrent neural network model to predict the stock price probability distribution parameters (mean and variance) for the next T time steps: Where Predictor represents the prediction model, μ t ∈R and Respectively represent the predicted mean and variance of the stock price at time t; Gaussian distribution is adopted, that is, Finally, the probability distribution of stock prices in the next T time steps is obtained: This distribution can be used to quantify the uncertainty of stock price forecasts and provide richer information for investment decisions; During the training phase, the negative log-likelihood is used as the loss function: And use the gradient descent optimization algorithm to minimize this loss function and learn the parameters of the model.