Parameter optimization method and device for stock price path prediction model, equipment and storage medium

Through the DeepONet network framework and Soft MoE mechanism, K DeepONet expert models are integrated, and the problem of local optimal solutions and inefficient computing efficiency in the parameter optimization of stock price path prediction model is solved, achieving efficient and accurate parameter optimization.

CN119558971APending Publication Date: 2025-03-04太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411701683.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The prior art is prone to falling into local optimal solutions in the parameter optimization of stock price path prediction models, and the calculation efficiency is inefficient, especially when dealing with large data sets or complex models. The problem is more prominent.

Method used

The DeepONet network framework is used to integrate K DeepONet expert models with the Soft MoE mechanism. By randomly generating initial parameters, generating historical stock price paths, feature extraction and dimensionality reduction, and building the DeepONet network framework and integrated expert model, efficient optimization of the stock price path prediction model parameters is achieved.

Benefits of technology

It effectively avoids the problem of falling into local optimal solutions in parameter optimization, significantly enhances the global optimization capability of the parameter optimization model, improves the calculation efficiency, and reduces the calculation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558971A_ABST
    Figure CN119558971A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter optimization method and device for a stock price path prediction model, equipment and a storage medium. In the scheme, firstly, initial parameters of a plurality of groups of stock price path prediction models are randomly generated according to a preset parameter range, and a plurality of different historical stock price paths are generated based on the plurality of groups of initial parameters; performing feature extraction and dimension reduction processing on the plurality of historical stock price paths, and constructing a DeepONet network framework based on the plurality of historical stock price paths and a feature set after dimension reduction; and then integrating K DeepONet expert models as a parameter optimization model by adopting a Soft MoE mechanism, and optimizing parameters of the stock price path prediction model by utilizing the parameter optimization model. According to the technical scheme, a plurality of DeepONet expert models are integrated by adopting a Soft MoE mechanism, so that the calculation efficiency is improved while falling into a local optimal solution during parameter optimization is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a parameter optimization method, device, equipment and storage medium for a stock price path prediction model. Background Art

[0002] Stock price path prediction plays a vital role in asset allocation and risk management of large insurance companies. The stock price path prediction model can predict a variety of possible future stock market scenarios, providing financial institutions with a basis for assessing portfolio risks and formulating sound investment strategies. These predicted stock price paths can not only help institutions optimize asset allocation ratios and reduce risks in daily operations, but also test the financial institutions' tolerance in extreme market situations (such as financial crises).

[0003] However, the stock price path prediction model relies heavily on accurate initial parameter range configuration. Once the initial parameter range is improperly set, convergence problems may occur. To address this problem, traditional parameter optimization methods use exhaustive trial and error or grid search methods, but these two methods have significant defects. Specifically, traditional parameter optimization methods are not only prone to falling into local optimal solutions, but also have low computational efficiency when the number of parameters and the range of values ​​increase, especially when dealing with large data sets or complex models. The problem is more prominent. Therefore, developing an efficient and accurate parameter optimization method is crucial to improving the accuracy and practicality of the stock price path prediction model. Summary of the invention

[0004] Based on the above problems, the present application provides a parameter optimization method, device, equipment and storage medium for a stock price path prediction model. The purpose is to improve the parameter optimization efficiency while avoiding falling into a local optimal solution when optimizing the parameters of the stock price prediction model, so as to achieve efficient and accurate optimization of the parameters of the stock price prediction model.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] The first aspect of the present application provides a parameter optimization method for a stock price path prediction model, the method comprising:

[0007] Randomly generating multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range;

[0008] Based on the multiple groups of the initial parameters, generating multiple different historical stock price paths using the stock price path prediction model;

[0009] Performing feature extraction and dimensionality reduction processing on the multiple different historical stock price paths to obtain a feature set after dimensionality reduction;

[0010] Constructing a DeepONet network framework based on the multiple different historical stock price paths and the feature set after dimensionality reduction;

[0011] Based on the DeepONet network framework, Soft MoE mechanism is adopted to integrate K DeepONet expert models as parameter optimization models; K is a positive integer;

[0012] The parameters of the stock price path prediction model are optimized through the parameter optimization model.

[0013] In a possible implementation, the constructing a DeepONet network framework based on the multiple different historical stock price paths and the feature set after dimensionality reduction includes:

[0014] Standardizing the multiple different historical stock price paths;

[0015] The standardized multiple different historical stock price paths are used as the branch network input of the DeepONet network, and the reduced dimension feature set is used as the main network input of the DeepONet network to construct the DeepONet network framework.

[0016] In a possible implementation, the DeepONet network framework is based on the Soft MoE mechanism to integrate K DeepONet expert models as parameter optimization models, including:

[0017] Training K DeepONet expert models; the K DeepONet expert models are all based on the DeepONet network architecture but use different initialization parameters and training samples;

[0018] Determine the weight of each DeepONet expert model through the gating network;

[0019] Based on the weight of each DeepONet expert model, the outputs of the K DeepONet expert models are weighted averaged as the output of the parameter optimization model.

[0020] In a possible implementation, determining the weight of each DeepONet expert model through a gating network includes:

[0021] Using the reduced-dimensional features as input to a gating network;

[0022] Obtaining the original output values ​​of the gated network output layer corresponding to K DeepONet expert models;

[0023] The weight of each DeepONet expert model is determined based on the original output values ​​of the K DeepONet expert models; the sum of the weights of the K DeepONet expert models is equal to 1; the weights of the K DeepONet expert models respectively represent the probability of each DeepONet expert model being selected.

[0024] In a possible implementation, after integrating K DeepONet expert models as parameter optimization models using the Soft MoE mechanism based on the DeepONet network framework, the method further includes:

[0025] Performing training optimization on the parameter optimization model based on the loss function;

[0026] The specific formula of the loss function is:

[0027]

[0028] Among them, MSE is the mean square error, n is the number of samples, Θ i is the initial parameter, The output of the model is optimized for the parameters.

[0029] In a possible implementation, after optimizing the parameters of the stock price path prediction model by using the parameter optimization model, the method further includes:

[0030] Using the output of the parameter optimization model as the initial input of the Kalman filter;

[0031] The Kalman filter is iteratively updated to output the parameters of the further optimized stock price path prediction model.

[0032] The second aspect of the present application provides a parameter optimization device for a stock price path prediction model, the device comprising:

[0033] An initial parameter generation module, used to randomly generate multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range;

[0034] A path generation module, used to generate a plurality of different historical stock price paths based on a plurality of groups of the initial parameters and using the stock price path prediction model;

[0035] A feature extraction module, used to perform feature extraction and dimensionality reduction processing on the multiple different historical stock price paths to obtain a feature set after dimensionality reduction;

[0036] A DeepONet construction module, used for constructing a DeepONet network framework based on the multiple different historical stock price paths and the feature set after dimensionality reduction;

[0037] An integration module, used to integrate K DeepONet expert models as parameter optimization models based on the DeepONet network framework using a Soft MoE mechanism; wherein K is a positive integer;

[0038] The optimization module is used to optimize the parameters of the stock price path prediction model through the parameter optimization model.

[0039] In a possible implementation, the DeepONet building block includes:

[0040] A standardization unit, used for standardizing the plurality of different historical stock price paths;

[0041] The input determination unit is used to use the standardized multiple different historical stock price paths as the branch network input of the DeepONet network, and use the reduced dimension feature set as the main line network input of the DeepONet network to build the DeepONet network framework.

[0042] The third aspect of the present application provides a parameter optimization device for a stock price path prediction model, the device comprising: a processor and a memory:

[0043] The memory is used to store program code and transmit the program code to the processor;

[0044] The processor is used to execute the steps of the parameter optimization method of the stock price path prediction model provided in any implementation of the first aspect according to the instructions in the program code.

[0045] A fourth aspect of the present application provides a computer-readable storage medium for storing program code, wherein the program code is used to execute the steps of a parameter optimization method for a stock price path prediction model as provided in any implementation of the first aspect.

[0046] Compared with the prior art, this application has the following beneficial effects:

[0047] In the technical solution of the present application, firstly, multiple groups of initial parameters of the stock price path prediction model are randomly generated according to a preset parameter range; then, based on the multiple groups of initial parameters, the stock price path prediction model is used to generate multiple different historical stock price paths; secondly, feature extraction and dimensionality reduction processing are performed on the multiple different historical stock price paths to obtain a feature set after dimensionality reduction; again, a DeepONet network framework is constructed based on the multiple different historical stock price paths and the feature set after dimensionality reduction; then, based on the DeepONet network framework, a Soft MoE mechanism is used to integrate K DeepONet expert models as a parameter optimization model; finally, the parameters of the stock price path prediction model are optimized based on the parameter optimization model.

[0048] In the implementation scheme of this application, by integrating multiple DeepONet expert models using the Soft MoE mechanism, it is effectively avoided to fall into the local optimal solution during parameter optimization, thereby significantly enhancing the global optimization capability of the overall parameter optimization model. Based on the operator mapping mechanism of DeepONet, the parameter optimization model can quickly learn the complex relationship between input and output, and the dynamic weighting mechanism of Soft MoE greatly reduces the calculation time and improves the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0050] Figure 1 A flow chart of a parameter optimization method for a stock price path prediction model provided in an embodiment of the present application;

[0051] Figure 2 A flow chart of another parameter optimization method of a stock price path prediction model provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of a parameter optimization model structure provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of the structure of a parameter optimization device for a stock price path prediction model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] As described above, current parameter optimization methods are not only prone to falling into local optimal solutions, but also have low computational efficiency when the number of parameters and the range of values ​​increase. This problem is particularly prominent when dealing with large data sets or complex models.

[0055] After research, the inventor proposed a parameter optimization method, device, equipment and storage medium for a stock price path prediction model. First, multiple groups of initial parameters of the stock price path prediction model are randomly generated according to a preset parameter range; then, based on the multiple groups of initial parameters, multiple different historical stock price paths are generated using the stock price path prediction model; secondly, feature extraction and dimensionality reduction processing are performed on multiple different historical stock price paths to obtain a reduced feature set; again, a DeepONet network framework is constructed based on multiple different historical stock price paths and the reduced feature set; then, based on the DeepONet network framework, a Soft MoE mechanism is used to integrate K DeepONet expert models as a parameter optimization model; finally, the parameters of the stock price path prediction model are optimized based on the parameter optimization model.

[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0057] The stock price prediction model is a mathematical model constructed based on historical data, which aims to reveal the law of stock price changes and predict future price trends. In the embodiment of the present application, the stock price prediction model takes the Heston model as an example. In the actual application process, the stock price prediction model that can be optimized by the technical solution of the present application is not limited to the Heston model.

[0058] In the embodiment of the present application, the formula of the Heston model is:

[0059]

[0060] Where μ is the expected return on the asset, S t is the asset price at time t, ν t is the volatility at time t, κ is the mean reversion rate of volatility, θ is the average level of long-term volatility, ξ is the volatility of volatility, and Represent two standard Brownian motions with a correlation coefficient ρ between them.

[0061] See also Figure 1, which is a flow chart of a parameter optimization method for a stock price path prediction model provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0062] S101. Randomly generate multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range.

[0063] Each stock price path prediction model has different initial parameters.

[0064] In the embodiment of the present application, the preset parameter range is set according to the commonly used parameter range of the stock price path prediction model that needs to be optimized.

[0065] In an embodiment of the present application, multiple groups of initial parameters of the stock price path prediction model are generated by random sampling within a preset parameter range.

[0066] The random sampling method may be uniform sampling, stratified sampling, etc. The specific selection depends on the application scenario and is not limited in detail here.

[0067] In an example implementation, the stock price path prediction model is the Heston model, and the parameters of the Heston model Θ = [v0, k, θ, ξ, ρ], where v0 is the initial volatility, κ is the mean reversion speed of volatility, θ is the average level of long-term volatility, ξ is the volatility of volatility, and ρ is the standard Brownian motion. and The correlation coefficient of .

[0068] In an exemplary implementation, the parameter range of the Heston model is preset to

[0069] υ0∈[0.05, 0.5],κ∈[0.1, 5],θ∈[0.01, 0.5],ξ∈[0.1, 2],ρ∈[−0.9, 0.9],

[0070] In this example, 50,000 sets of parameters are uniformly sampled from the preset parameter range as the initial parameters of the Heston model. Uniform sampling means that the probability of each parameter value being selected within its preset range is equal.

[0071] Optionally, uniform sampling may generate uniformly distributed samples within a preset parameter range by a linear interpolation method, and the specific uniform sampling method is not limited herein.

[0072] S102: Based on multiple groups of initial parameters, a stock price path prediction model is used to generate multiple different historical stock price paths.

[0073] In an embodiment of the present application, based on the multiple groups of initial parameters generated in the previous step, they are respectively assigned to the corresponding parameters of the stock price path prediction model, and based on each group of initial parameters, multiple corresponding historical stock price paths are simulated and generated.

[0074] In an example implementation, according to the formula of the Heston model, based on the 50,000 sets of initial parameters generated in the previous step, 10 historical stock price paths S(t) are generated for each set of initial parameters, and each path contains data of stock trading days in one year. Where T is the stock trading days in one year, and t is the time point of each trading day in this year. For example, there are 252 stock trading days in a year, so let T = 252.

[0075] Generate 50000*10=500000 historical stock price paths based on 50000 sets of initial parameters.

[0076] Optionally, in order to facilitate subsequent data analysis and processing, after generating multiple historical price paths, the generated multiple historical price paths can be written into an Excel table through the pandas tool.

[0077] First, create a DataFrame to store the data for all the paths and then write it to an Excel file using the pandas to_excel function.

[0078] S103, performing feature extraction and dimensionality reduction processing on a plurality of different historical stock price paths to obtain a feature set after dimensionality reduction.

[0079] Feature extraction refers to extracting the most representative features or attributes from raw data. These features can better describe the essential characteristics of the data.

[0080] Dimensionality reduction refers to the process of converting high-dimensional data into low-dimensional data without losing or minimizing information loss. Dimensionality reduction can reduce the complexity of data and improve computational efficiency.

[0081] After generating multiple historical stock price paths in the previous step, feature extraction and dimensionality reduction are performed on them to extract the most representative features and reduce the complexity of the data.

[0082] In the embodiments of the present application, feature extraction may include calculating the mean, standard deviation, maximum, minimum, skewness, kurtosis and other statistics of the time series, or extracting technical indicators such as trading signals, support and resistance levels. These features can help to better understand the structure and regularity of the data, thereby providing useful information for subsequent model training and prediction. The feature extraction method is not specifically limited here.

[0083] In the embodiment of the present application, the dimensionality reduction process can be implemented by a linear method (such as principal component analysis PCA) or a nonlinear method (such as t-SNE). The dimensionality reduction process method is not specifically limited here.

[0084] In an exemplary implementation, feature extraction can be performed based on the statistical features of daily yield. Specifically, let the daily yield

[0085]

[0086] Where S(T) is the historical stock price path simulated in the previous step, i is the time point, T is the stock trading day of a year, and Δt=1 / T.

[0087] Analyze daily returns These features can reveal the fluctuation patterns and trends of stock prices. In this example, 43 sets of features including mean, variance, autocorrelation coefficient, skewness, kurtosis, etc. are extracted.

[0088] Among them, the mean is the average of daily returns, reflecting the average change trend of stock prices; the variance is the variance of daily returns, measuring the volatility of stock prices; the autocorrelation coefficient is the correlation of daily returns at different time intervals, which is used to detect whether there is autocorrelation in stock prices; the skewness is the degree of skewness of the daily return distribution, reflecting the asymmetry of the distribution; the kurtosis is the sharpness of the daily return distribution, which is used to detect whether there are outliers or extreme events.

[0089] In practical applications, directly using these high-dimensional features for model training may lead to problems such as low computational efficiency and overfitting. Therefore, it is necessary to perform dimensionality reduction on the above 43 sets of features.

[0090] Optionally, the extracted features are reduced in dimension to the dimension of the parameters of the stock price path prediction model that needs to be optimized. For example, if the number of parameters of the stock price path prediction model that needs to be optimized is 5, the extracted features are reduced in dimension to a feature set with a dimension of 5.

[0091] In the embodiment of the present application, in order to ensure the consistency and comparability of the data, and to improve the effect and stability of subsequent data analysis or model training, the extracted features are normalized before the dimensionality reduction process. Normalization can be achieved by a variety of methods such as minimum-maximum scaling, Z-score standardization, or decimal calibration. The specific choice depends on the data characteristics and analysis requirements, and is not specifically limited here.

[0092] In an exemplary implementation, the 43 sets of features extracted above are first subjected to maximum and minimum value normalization. For a given feature α, its minimum value is α min , the maximum value is αmax , the standardized feature α * The calculation formula is as follows

[0093]

[0094] This formula scales the feature values ​​to between 0 and 1, eliminating the dimensional differences between different features and making model training more stable.

[0095] In an example implementation, the Principal Component Analysis (PCA) class in the scikit-learn library is used to reduce the dimension of the standardized features. First, the standardized feature data is converted into the scikit-learn DataFrame or two-dimensional array format. Then, a PCA object is created and the dimension of the reduced feature is set to 5 (i.e., the number of output Heston model parameters). Finally, the fit_transform method of the PCA object is called to perform dimensionality reduction.

[0096] After PCA dimensionality reduction, a new feature matrix is ​​obtained with a dimension of 5. This matrix contains the features after dimensionality reduction, which will be used for subsequent model construction and training.

[0097] S104. Construct a DeepONet network framework based on multiple different historical stock price paths and the feature set after dimensionality reduction.

[0098] The DeepONet network framework is a neural network architecture based on deep learning, which can efficiently learn the mapping relationship between operators (such as differential operators) and can achieve fast prediction of continuous functions with a small amount of training data.

[0099] The DeepONet network framework consists of two main neural network components: the main network and the branch network. The main network is responsible for processing the input function (such as initial conditions or boundary conditions), while the branch network is responsible for processing the information of a specific point or position of the output function. By combining the outputs of these two network components, DeepONet can achieve the mapping from input function to output function.

[0100] In the embodiment of the present application, a plurality of different historical stock price paths and the features after dimensionality reduction are used as the input of the DeepONet network framework, and the corresponding main line network and branch network are constructed.

[0101] S105. Based on the DeepONet network framework, the Soft MoE mechanism is adopted to integrate K DeepONet expert models as parameter optimization models.

[0102] In the embodiment of the present application, K is a positive integer. In order to further improve the performance and efficiency of the model, based on the DeepONet network framework constructed in the previous step, a soft mixture of experts (SoftMoE) integration strategy is used to integrate K DeepONet expert models.

[0103] The integrated DeepONet expert model is used as a parameter optimization model to achieve parameter optimization of the stock price path prediction model.

[0104] Soft MoE is a neural network architecture that can improve the performance and efficiency of the model by mixing multiple expert models.

[0105] In the embodiment of the present application, by adopting the Soft MoE mechanism to integrate multiple DeepONet expert models, it is possible to effectively avoid the parameter optimization model from falling into the local optimal solution, while effectively improving the overall computing efficiency.

[0106] S106. Optimizing the parameters of the stock price path prediction model through a parameter optimization model.

[0107] In an embodiment of the present application, the parameters of the stock price path prediction model are optimized according to the parameter optimization model constructed in the previous step.

[0108] In an exemplary implementation, initial parameters are input into a parameter optimization model, and the output of the parameter optimization model is the optimized parameters.

[0109] In the embodiment of the present application, by combining the DeepONet network framework and the Soft MoE integration strategy, it is effectively avoided to fall into the local optimal solution during parameter optimization, thereby significantly enhancing the global optimization capability of the overall parameter optimization model. Based on the operator mapping mechanism of DeepONet, the parameter optimization model can quickly learn the complex relationship between input and output, and with the dynamic weighting mechanism of Soft MoE, the calculation time is greatly reduced and the calculation efficiency is improved.

[0110] Figure 2 Another flow chart of a parameter optimization method for a stock price path prediction model provided in an embodiment of the present application. In the embodiment introduced by this figure, a more detailed description is provided for the implementation of the parameter optimization method for a stock price path prediction model.

[0111] like Figure 2 The parameter optimization method of the stock price path prediction model shown includes the following steps:

[0112] S201. Randomly generate multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range.

[0113] S202: Based on multiple groups of initial parameters, a stock price path prediction model is used to generate multiple different historical stock price paths.

[0114] S203, performing feature extraction and dimensionality reduction processing on a plurality of different historical stock price paths to obtain a feature set after dimensionality reduction.

[0115] The implementation of S201-S203 is basically the same as S101-S103 in the method embodiment described above, and will not be elaborated here. For related technical implementations, please refer to the introduction and description of S101-S103 above.

[0116] S204: Standardize multiple different historical stock price paths.

[0117] In the embodiment of the present application, the multiple different historical stock price paths generated in S202 are standardized to eliminate the impact caused by the magnitude difference between different paths, so that the price data of all paths are comparable in value.

[0118] In an example implementation, the normalization process may include calculating the difference between the historical stock price at each time point and the average price of the path it is on, and then dividing it by the standard deviation of the price of the path.

[0119] In the embodiment of the present application, through standardization processing, it can be ensured that the DeepONet network can more accurately capture the patterns and laws of price changes when processing different historical stock price paths.

[0120] S205, using the standardized multiple different historical stock price paths as the branch network input of the DeepONet network, and using the feature set after dimensionality reduction as the main network input of the DeepONet network to construct a DeepONet network framework.

[0121] In the embodiment of the present application, a DeepONet network framework is constructed, and the multiple different historical stock price paths after the standardization process in the previous step are used as the branch network input of the DeepONet network. The branch network processes these historical stock price paths and extracts key price change information and potential price patterns from them.

[0122] At the same time, the reduced feature set is used as the mainline network input of the DeepONet network. The reduced feature set contains important information in the stock price path and has been compressed into a lower-dimensional space for more efficient processing. The mainline network further extracts valuable information related to stock price changes from these low-dimensional features.

[0123] In an example implementation, a multi-layer fully connected layer or a one-dimensional convolutional layer structure is used to process multiple different historical stock price paths after standardization, and a rectified linear unit (ReLU) or a hyperbolic tangent function (tanh) is selected as an activation function to enhance the nonlinear expression ability of the network. Similarly, for the feature set after dimensionality reduction, a multi-layer fully connected layer is also used for processing, and a corresponding activation function is used.

[0124] In the embodiment of the present application, the DeepONet network framework combines the results of the branch network and the main line network to deeply learn the complex relationship between the stock price path and the features after dimensionality reduction. This combination enables the network to better understand the internal mechanism of stock price changes and make more accurate predictions based on this.

[0125] In the implementation of this application, the parameters of the stock price path prediction model can be output by performing an inner product operation on the last dimension of the branch network and the main line network in the DeepONet network framework.

[0126] S206. Train K DeepONet expert models.

[0127] In the embodiment of the present application, K DeepONet expert models are trained, denoted as Each DeepONet expert model is based on the DeepONet network architecture built in the previous step, but uses different initial parameters and training samples during the training process. The diversity between models is used to improve the stability and accuracy of the overall model.

[0128] In the embodiment of the present application, K is a positive integer, and the value of K is determined by comprehensively testing the balance between stability and computational complexity.

[0129] Specifically, multiple experiments can be conducted to observe the performance of the model under different K values, and finally a K value that can both ensure the stability of the model and effectively control the amount of calculation is selected.

[0130] S207, determining the weight of each DeepONet expert model through a gating network;

[0131] In the embodiment of the present application, a gating network g(x) is introduced to dynamically calculate the weight of each DeepONet expert model. This gating network can intelligently assign weights to each DeepONet expert model based on the input features.

[0132] In the embodiment of the present application, the feature set after dimensionality reduction is used as the input of the gating network.

[0133] Get the original output value g of the gated network output layer corresponding to K DeepONet expert models k (x), k = 1, ..., K, where g k (x) is the original output value of the Kth DeepONet expert model.

[0134] In an exemplary implementation, the original output values ​​of the gated network output layer corresponding to the K DeepONet expert models can be obtained through forward propagation.

[0135] In the embodiment of the present application, the weight of each DeepONet expert model is determined based on the original output values ​​of K DeepONet expert models. The sum of the weights of the K DeepONet expert models is equal to 1.

[0136] The weights of the K DeepONet expert models actually represent the probability of each DeepONet expert model being selected on the current input feature line, where

[0137]

[0138] In an example implementation, the original output values ​​of the K DeepONet expert models are processed through a softmax activation function to output the weights of the K DeepONet expert models.

[0139] The embodiment of the present application introduces a gating network, which can dynamically adjust the weights of each expert model according to the input features, thereby achieving effective fusion of the outputs of multiple expert models and improving the stability and accuracy of the overall model.

[0140] S208. Based on the weight of each DeepONet expert model, the outputs of the K DeepONet expert models are weighted averaged as the output of the parameter optimization model.

[0141] In the embodiment of the present application, according to the weight of each DeepONet expert model, its output is weighted averaged to obtain the output y(x) of the parameter optimization model, where

[0142]

[0143] In an embodiment of the present application, Soft MoE can dynamically adjust the weights of each DeepONet expert model according to different input features, thereby improving the prediction performance of the overall model.

[0144] Figure 3 A schematic diagram of a parameter optimization model structure provided in an embodiment of the present application. Figure 3As shown in the figure, the input is the extracted features of the historical stock price path and the daily stock price return. After the weights are determined by the gating network, they are input into the main network and branch network of K DeepONet expert models integrated by Soft MoE. Then, the outputs of the K DeepONet expert models are weighted averaged to obtain the output of the parameter optimization model.

[0145] The Normalize operation in the output part is used to ensure that the weight of each expert is within a certain range (for example, the sum normalized to 1), which allows the outputs of all experts to be weighted proportionally. The Add operation is used to add the input features to the features after a series of transformations (such as convolution and activation functions). This structure can alleviate the gradient vanishing problem and enhance the expressiveness of the model.

[0146] S209: Perform training optimization on the parameter optimization model based on the loss function.

[0147] In the embodiment of the present application, the mean square error (MSE) is used as the loss function to train and optimize the parameter optimization model.

[0148] Specifically, the specific formula of the loss function is

[0149]

[0150] Among them, MSE is the mean square error as the loss function of this model, n is the number of samples, Θ i is the initial parameter, The output of the model is optimized for the parameters. This loss function calculates the average of the squared errors between the model output and the true value.

[0151] In an example implementation, the model parameters can be optimized by a back-propagation algorithm to minimize the loss function. During the training process, a suitable optimizer (such as Adam or L-BFGS) and learning rate can be selected, and multiple rounds of training (epochs) can be performed. In each round of training, the training set is used to update the parameters, and the parameter optimization model performance is evaluated on the validation set.

[0152] S210: Using the output of the parameter optimization model as the initial input of the Kalman filter.

[0153] The Kalman filter is a recursive algorithm used to estimate the state of a dynamic system from a series of incomplete or uncertain measurements in the presence of noise.

[0154] In an embodiment of the present application, the output of the parameter optimization model is used as the initial state vector or initial prediction value of the Kalman filter to further improve the accuracy and stability of the parameters.

[0155] S211. Iteratively update the Kalman filter to output the parameters of the further optimized stock price path prediction model.

[0156] In the embodiment of the present application, after multiple iterations, the Kalman filter outputs a more accurate and stable prediction value as a parameter of the optimized stock price path prediction model.

[0157] In the embodiment of the present application, by constructing a DeepONet network framework and training multiple DeepONet expert models, dynamic weight allocation is achieved in combination with a gated network, which effectively improves the accuracy and stability of parameter optimization of the stock price path prediction model. The predicted parameters are further optimized using a Kalman filter, further improving the prediction performance. The embodiment of the present application can make full use of the information in the historical stock price path and deeply explore the inherent laws of stock price changes. At the same time, the Soft MoE mechanism is used to integrate K DeepONet expert models, which reduces the risk of single model prediction and improves the robustness and generalization ability of the overall model.

[0158] Optionally, the trained parameter optimization model can be used to estimate the parameters of new stock price paths. The predictive performance of the model can be evaluated by comparing it with the true parameters.

[0159] In an example implementation, the mean absolute percentage error (MAPE) may be used as a comparison indicator. The specific formula of MAPE is as follows:

[0160]

[0161] where r i is the true parameter of the test set, is the parameter predicted by the ensemble network, and n is the size of the test set. This formula calculates the average absolute percentage error between the predicted value and the true value.

[0162] Optionally, the predicted model parameters are applied to the analysis of actual stock market dynamics to support investment decision making and improve the effectiveness of the strategy.

[0163] Based on the parameter optimization method of the stock price path prediction model provided in the aforementioned embodiment, the present application also provides a parameter optimization device of the stock price path prediction model. Figure 4 This is a schematic diagram of the structure of a parameter optimization device for a stock price path prediction model provided in an embodiment of the present application. Figure 4As shown, the parameter optimization device of the stock price path prediction model includes: an initial parameter generation module 401, a path generation module 402, a feature extraction module 403, a DeepONet construction module 404, an integration module 405 and an optimization module 406.

[0164] The initial parameter generation module 401 is used to randomly generate multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range.

[0165] In the embodiment of the present application, each stock price path prediction model corresponds to different initial parameters.

[0166] In the embodiment of the present application, the preset parameter range is set according to the commonly used parameter range of the stock price path prediction model that needs to be optimized.

[0167] In an embodiment of the present application, multiple groups of initial parameters of the stock price path prediction model are generated by random sampling within a preset parameter range.

[0168] The random sampling method may be uniform sampling, stratified sampling, etc. The specific selection depends on the application scenario and is not limited in detail here.

[0169] The path generation module 402 is used to generate a plurality of different historical stock price paths based on a plurality of groups of initial parameters using a stock price path prediction model.

[0170] In the embodiment of the present application, multiple groups of initial parameters generated by the initial parameter generation module 401 are respectively assigned to corresponding parameters of the stock price path prediction model, and multiple corresponding historical stock price paths are simulated and generated based on each group of initial parameters.

[0171] Optionally, in order to facilitate subsequent data analysis and processing, after generating multiple historical price paths, the generated multiple historical price paths can be written into an Excel table through the pandas tool.

[0172] First, create a DataFrame to store the data for all the paths and then write it to an Excel file using the pandas to_excel function.

[0173] The feature extraction module 403 is used to perform feature extraction and dimensionality reduction processing on a plurality of different historical stock price paths to obtain a feature set after dimensionality reduction.

[0174] In the embodiment of the present application, feature extraction and dimensionality reduction processing are performed on the multiple historical stock price paths generated by the path generation module 402 to extract the most representative features and reduce the complexity of the data.

[0175] In the embodiments of the present application, feature extraction may include calculating the mean, standard deviation, maximum, minimum, skewness, kurtosis and other statistics of the time series, or extracting technical indicators such as trading signals, support and resistance levels. These features can help to better understand the structure and regularity of the data, thereby providing useful information for subsequent model training and prediction. The feature extraction method is not specifically limited here.

[0176] In the embodiment of the present application, the dimensionality reduction process can be implemented by a linear method (such as principal component analysis PCA) or a nonlinear method (such as t-SNE). The dimensionality reduction process method is not specifically limited here.

[0177] In the embodiment of the present application, in order to ensure the consistency and comparability of the data, and to improve the effect and stability of subsequent data analysis or model training. Before performing the dimensionality reduction process, the feature extraction module 403 normalizes the extracted features. The normalization process can be implemented by a variety of methods such as minimum-maximum scaling, Z-score standardization, or decimal calibration. The specific selection depends on the data characteristics and analysis requirements, and is not specifically limited here.

[0178] The DeepONet construction module 404 is used to construct a DeepONet network framework based on a plurality of different historical stock price paths and a feature set after dimensionality reduction.

[0179] In the embodiment of the present application, the multiple different historical stock price paths generated by the path generation module 402 and the features after dimensionality reduction by the feature extraction module 403 are used as inputs of the DeepONet network framework, and the corresponding main line network and branch network are constructed.

[0180] The integration module 405 is used to integrate K DeepONet expert models as parameter optimization models based on the DeepONet network framework using the Soft MoE mechanism.

[0181] In the embodiment of the present application, K is a positive integer. In order to further improve the performance and efficiency of the model,

[0182] Based on the DeepONet network framework built on DeepONet building block 404, using the Soft Mixture of Experts, Soft MoE) integration strategy, integrating K DeepONet expert models.

[0183] The integrated DeepONet expert model is used as a parameter optimization model to achieve parameter optimization of the stock price path prediction model.

[0184] Soft MoE is a neural network architecture that can improve the performance and efficiency of the model by mixing multiple expert models.

[0185] In the embodiment of the present application, by adopting the Soft MoE mechanism to integrate multiple DeepONet expert models, it is possible to effectively avoid the parameter optimization model from falling into the local optimal solution, while effectively improving the overall computing efficiency.

[0186] The optimization module 406 is used to optimize the parameters of the stock price path prediction model through the parameter optimization model.

[0187] In the embodiment of the present application, the parameters of the stock price path prediction model are optimized according to the parameter optimization model constructed in the integration module 405.

[0188] The embodiment of the present application combines the functions of the initial parameter generation module 401, the path generation module 402, the feature extraction module 403, the DeepONet construction module 404, the integration module 405 and the optimization module 406, effectively avoiding falling into the local optimal solution during parameter optimization, thereby significantly enhancing the global optimization capability of the overall parameter optimization model. Based on the operator mapping mechanism of DeepONet, the parameter optimization model can quickly learn the complex relationship between input and output, and with the dynamic weighting mechanism of Soft MoE, the calculation time is greatly reduced and the calculation efficiency is improved.

[0189] Optionally, the DeepONet construction module 304 includes a normalization unit and an input determination unit.

[0190] The normalization unit is used to normalize multiple different historical stock price paths.

[0191] In the embodiment of the present application, a plurality of different historical stock price paths are standardized by a standardization unit to eliminate the influence caused by the magnitude difference between different paths, so that the price data of all paths are comparable in value.

[0192] The input determination unit is used to use the standardized multiple different historical stock price paths as the branch network input of the DeepONet network, and use the reduced dimension feature set as the main line network input of the DeepONet network to build the DeepONet network framework.

[0193] In the embodiment of the present application, a DeepONet network framework is constructed, and multiple different historical stock price paths after being standardized by the standardization unit are used as branch network inputs of the DeepONet network. The branch network processes these historical stock price paths and extracts key price change information and potential price patterns from them.

[0194] At the same time, the reduced feature set is used as the mainline network input of the DeepONet network. The reduced feature set contains important information in the stock price path and has been compressed into a lower-dimensional space for more efficient processing. The mainline network further extracts valuable information related to stock price changes from these low-dimensional features.

[0195] In the embodiment of the present application, the DeepONet network framework combines the results of the branch network and the main line network to deeply learn the complex relationship between the stock price path and the features after dimensionality reduction. This combination enables the network to better understand the internal mechanism of stock price changes and make more accurate predictions based on this.

[0196] In the implementation of this application, the parameters of the stock price path prediction model can be output by performing an inner product operation on the last dimension of the branch network and the main line network in the DeepONet network framework.

[0197] Optionally, the integration module 405 is specifically used for:

[0198] Train K DeepONet expert models; the K DeepONet expert models are all based on the DeepONet network architecture but use different initialization parameters and training samples;

[0199] Determine the weight of each DeepONet expert model through the gating network;

[0200] Based on the weight of each DeepONet expert model, the outputs of K DeepONet expert models are weighted averaged as the output of the parameter optimization model.

[0201] Optionally, the weights of each DeepONet expert model are determined by a gating network, including:

[0202] Use the reduced-dimensional features as the input of the gating network;

[0203] Get the original output values ​​of the gated network output layer corresponding to K DeepONet expert models;

[0204] The weight of each DeepONet expert model is determined based on the original output values ​​of the K DeepONet expert models; the sum of the weights of the K DeepONet expert models is equal to 1; the weights of the K DeepONet expert models respectively represent the probability of each DeepONet expert model being selected.

[0205] Optionally, the parameter optimization device of the stock price path prediction model also includes a training module and a Kalman filter optimization module.

[0206] The training module is used to train and optimize the parameter optimization model based on the loss function;

[0207] The specific formula of the loss function is:

[0208]

[0209] Among them, MSE is the mean square error, n is the number of samples, Θ i is the initial parameter, Output of the parameter optimization model.

[0210] A Kalman filter optimization module is used to use the output of the parameter optimization model as the initial input of the Kalman filter;

[0211] The parameters of the stock price path prediction model are further optimized by iteratively updating the output through the Kalman filter.

[0212] In addition, an embodiment of the present application also provides a parameter optimization device for a stock price path prediction model, and the parameter optimization device for a stock price path prediction model includes a processor and a memory.

[0213] The memory is used to store the program code and transmit the program code to the processor;

[0214] The processor is used to execute the steps of the parameter optimization method of the stock price path prediction model introduced in any of the above method embodiments according to the instructions in the program code.

[0215] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the program is executed by a processor, a parameter optimization method for a stock price path prediction model as described in any of the method embodiments is implemented.

[0216] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0217] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A parameter optimization method for a stock price path prediction model, characterized in that: The method comprises: Randomly generating multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range; Based on the multiple groups of the initial parameters, generating multiple different historical stock price paths using the stock price path prediction model; Performing feature extraction and dimensionality reduction processing on the multiple different historical stock price paths to obtain a feature set after dimensionality reduction; Constructing a DeepONet network framework based on the multiple different historical stock price paths and the feature set after dimensionality reduction; Based on the DeepONet network framework, Soft MoE mechanism is adopted to integrate K DeepONet expert models as parameter optimization models; K is a positive integer; The parameters of the stock price path prediction model are optimized through the parameter optimization model.

2. The method according to claim 1, characterized in that The DeepONet network framework is constructed based on the multiple different historical stock price paths and the feature set after dimensionality reduction, including: Standardizing the multiple different historical stock price paths; The standardized multiple different historical stock price paths are used as the branch network input of the DeepONet network, and the reduced dimension feature set is used as the main network input of the DeepONet network to construct the DeepONet network framework.

3. The method according to claim 2, characterized in that The method of integrating K DeepONet expert models as parameter optimization models based on the DeepONet network framework and using the SoftMoE mechanism includes: Training K DeepONet expert models; the K DeepONet expert models are all based on the DeepONet network architecture but use different initialization parameters and training samples; Determine the weight of each DeepONet expert model through the gating network; Based on the weight of each DeepONet expert model, the outputs of the K DeepONet expert models are weighted averaged as the output of the parameter optimization model.

4. The method according to claim 3, characterized in that The weight of each DeepONet expert model is determined by the gating network, including: Using the reduced-dimensional features as input to a gating network; Obtaining the original output values ​​of the gated network output layer corresponding to K DeepONet expert models; The weight of each DeepONet expert model is determined based on the original output values ​​of the K DeepONet expert models; the sum of the weights of the K DeepONet expert models is equal to 1; the weights of the K DeepONet expert models respectively represent the probability of each DeepONet expert model being selected.

5. The method according to claim 1, characterized in that: After integrating K DeepONet expert models as parameter optimization models using the Soft MoE mechanism based on the DeepONet network framework, the method further includes: Performing training optimization on the parameter optimization model based on the loss function; The specific formula of the loss function is: Among them, MSE is the mean square error, n is the number of samples, Θ i is the initial parameter, The output of the model is optimized for the parameters.

6. The method according to claim 1, characterized in that After optimizing the parameters of the stock price path prediction model by the parameter optimization model, the method further includes: Using the output of the parameter optimization model as the initial input of the Kalman filter; The Kalman filter is iteratively updated to output the parameters of the further optimized stock price path prediction model.

7. A parameter optimization device for a stock price path prediction model, characterized in that: The device comprises: An initial parameter generation module, used to randomly generate multiple groups of initial parameters of the stock price path prediction model according to a preset parameter range; A path generation module, used to generate a plurality of different historical stock price paths based on a plurality of groups of the initial parameters and using the stock price path prediction model; A feature extraction module, used to perform feature extraction and dimensionality reduction processing on the multiple different historical stock price paths to obtain a feature set after dimensionality reduction; A DeepONet construction module, used for constructing a DeepONet network framework based on the multiple different historical stock price paths and the feature set after dimensionality reduction; An integration module, used to integrate K DeepONet expert models as parameter optimization models based on the DeepONet network framework using a Soft MoE mechanism; wherein K is a positive integer; The optimization module is used to optimize the parameters of the stock price path prediction model through the parameter optimization model.

8. The device according to claim 7, characterized in that The DeepONet building blocks include: A standardization unit, used for standardizing the plurality of different historical stock price paths; The input determination unit is used to use the standardized multiple different historical stock price paths as the branch network input of the DeepONet network, and use the reduced dimension feature set as the main line network input of the DeepONet network to build the DeepONet network framework.

9. A parameter optimization device for a stock price path prediction model, characterized in that: include: Processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the parameter optimization method of the stock price path prediction model according to any one of claims 1 to 6 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the steps of the parameter optimization method of the stock price path prediction model described in any one of claims 1 to 6.