Commodity management method and device, electronic equipment and computer readable storage medium

By building a commodity management model based on commodity historical market data and market environment data, and using network sub-models to generate and adjust trading strategies, the problem of lack of risk resistance in traditional technologies is solved, and safer and more reliable commodity management is achieved.

CN119887406AInactive Publication Date: 2025-04-25ZHEJIANG TONGHUASHUN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510369632.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When optimizing investment portfolios, traditional commodity management technology ignores dynamic market changes and long-term development trends of commodities, resulting in the generated commodity management decisions that lack risk resistance and are prone to major losses.

Method used

By obtaining commodity historical market data and market environment data, an initial commodity management model is constructed, the first network sub-model processes data to generate an initial trading strategy, the second network sub-model estimates the trading day category, and adjusts the trading strategy according to the category to optimize the model.

Benefits of technology

It has achieved safer and more reliable product management, significantly improved the scientificity and risk resistance of product management, and can better adapt to market fluctuations and reduce potential risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887406A_ABST
    Figure CN119887406A_ABST
Patent Text Reader

Abstract

The invention discloses a commodity management method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining commodity historical market data and commodity market environment data, and constructing an initial commodity management model which comprises a first network sub-model and a second network sub-model; processing the commodity historical market data and the commodity market environment data by using a first network sub-model to obtain an initial transaction strategy of each commodity; processing the commodity market environment data by using a second network sub-model to obtain a transaction day estimation category; adjusting each initial transaction strategy according to the transaction day estimation category to obtain a target transaction strategy, and obtaining a target income result corresponding to each target transaction strategy; and optimizing the initial commodity management model according to each target income result until a target commodity management model is obtained for realizing commodity management. According to the scheme, the anti-risk capability of the commodity management strategy can be effectively improved, and safer and more reliable commodity management is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a commodity management method, and also to a commodity management device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the financial sector, commodity management technology plays a vital role in modern portfolio management. At present, traditional commodity management technology mainly focuses on maximizing the final benefits of commodities, that is, optimizing the portfolio with the final benefits as the core goal. However, this single-dimensional optimization method ignores the dynamic changes of the market and the long-term development trend of commodities, resulting in a serious lack of risk resistance in the final commodity management decisions, which is prone to major losses in the commodity management process.

[0003] Therefore, how to effectively improve the risk resistance of commodity management strategies and achieve safer and more reliable commodity management is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0004] The purpose of this application is to provide a commodity management method, which can effectively improve the risk resistance of commodity management strategies and achieve safer and more reliable commodity management; another purpose of this application is to provide a commodity management device, electronic device and computer-readable storage medium, all of which have the above-mentioned beneficial effects.

[0005] In a first aspect, the present application discloses a commodity management method, comprising:

[0006] Acquire commodity historical market data and commodity market environment data, and construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model;

[0007] Processing the commodity historical market data and the commodity market environment data using the first network sub-model to obtain an initial trading strategy for each commodity;

[0008] The commodity market environment data is processed by using the second network sub-model to obtain trading day estimation categories; wherein the trading day estimation categories include inflection point trading days and non-inflection point trading days;

[0009] Adjusting each of the initial trading strategies according to the estimated categories of the trading days to obtain a target trading strategy, and obtaining a target return result corresponding to each of the target trading strategies;

[0010] The initial commodity management model is optimized according to each of the target revenue results until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

[0011] Optionally, after the commodity historical market data and the commodity market environment data are processed by the first network sub-model to obtain an initial trading strategy for each commodity, the method further includes:

[0012] Performing a legitimacy analysis on each of the initial trading strategies to determine a legitimacy category of each of the initial trading strategies; wherein the legitimacy category includes a legal trading strategy and an illegal trading strategy;

[0013] Accordingly, each of the initial trading strategies is adjusted according to the estimated trading day category to obtain a target trading strategy, including:

[0014] Each of the legal trading strategies is adjusted according to the estimated category of the trading day to obtain the target trading strategy.

[0015] Optionally, the commodity management method further includes:

[0016] Obtaining strategy adjustment information of the illegal trading strategy;

[0017] The illegal transaction strategy is adjusted according to the strategy adjustment information to obtain the legal transaction strategy.

[0018] Optionally, the initial commodity management model further includes a third network sub-model; and the method further includes:

[0019] Processing the commodity historical market data using the third network sub-model to obtain commodity revenue of each of the commodities;

[0020] Accordingly, each of the initial trading strategies is adjusted according to the estimated trading day category to obtain a target trading strategy, including:

[0021] The initial trading strategies are adjusted according to the estimated categories of the trading days and the revenues of the commodities to obtain the target trading strategies.

[0022] Optionally, using the third network sub-model to process the commodity historical market data to obtain commodity revenue of each of the commodities includes:

[0023] Acquire commodity characteristics of each of the commodities according to the commodity historical market data;

[0024] Acquire commodity association relationships based on the commodity historical market data;

[0025] The third network sub-model is used to comprehensively analyze the commodity characteristics and the commodity association relationships to obtain the commodity revenue of each of the commodities.

[0026] Optionally, adjusting each of the initial trading strategies according to the estimated category of the trading day and the revenue of each of the commodities to obtain the target trading strategy includes:

[0027] The trading behaviors in each of the initial trading strategies are adjusted according to the revenue of each of the commodities, and the trading intensity in each of the initial trading strategies is adjusted according to the estimated category of the trading day to obtain the target trading strategy.

[0028] Optionally, after obtaining the commodity historical market data and commodity market environment data, the following is further included:

[0029] A preprocessing operation is performed on the commodity historical market data and the commodity market environment data; wherein the preprocessing operation includes a combination of one or more of a data cleaning operation, a missing value filling operation, and a data deduplication operation.

[0030] In a second aspect, the present application further discloses a commodity management device, comprising:

[0031] An acquisition module is used to acquire commodity historical market data and commodity market environment data to construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model;

[0032] A first processing module, configured to process the commodity historical market data and the commodity market environment data using the first network sub-model to obtain an initial trading strategy for each commodity;

[0033] A second processing module is used to process the commodity market environment data using the second network sub-model to obtain a trading day estimation category; wherein the trading day estimation category includes an inflection point trading day and a non-inflection point trading day;

[0034] An adjustment module, used to adjust each of the initial trading strategies according to the estimated category of the trading day, obtain a target trading strategy, and obtain a target return result corresponding to each of the target trading strategies;

[0035] The optimization module is used to optimize the initial commodity management model according to each of the target revenue results until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

[0036] In a third aspect, the present application further discloses an electronic device, comprising:

[0037] Memory for storing computer programs;

[0038] A processor is used to implement the steps of any one of the commodity management methods described above when executing the computer program.

[0039] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the commodity management methods described above are implemented.

[0040] The present application provides a commodity management method, which obtains commodity historical market data and commodity market environment data, and constructs an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model; the commodity historical market data and the commodity market environment data are processed by the first network sub-model to obtain an initial trading strategy for each commodity; the commodity market environment data is processed by the second network sub-model to obtain a trading day estimation category; wherein the trading day estimation category includes an inflection point trading day and a non-inflection point trading day; each of the initial trading strategies is adjusted according to the trading day estimation category to obtain a target trading strategy, and a target profit result corresponding to each of the target trading strategies is obtained; the initial commodity management model is optimized according to each of the target profit results until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

[0041] By applying the technical solution provided in this application, based on the historical commodity market data and commodity market environment data, the development trends of various commodities and the real market environment changes are taken into account, and the construction of a commodity management model is realized. Among them, taking commodity development trends into consideration not only helps to tap into potential high-yield assets, but also effectively avoids misjudgments caused by short-term market fluctuations; taking market environment changes into consideration enables commodity management strategies to better adapt to market fluctuations, that is, the above-mentioned inflection point trading days, thereby reducing potential risks caused by environmental changes. It can be seen that this technical solution takes commodity development trends and market environment changes into consideration under the premise of considering the final benefits of the commodity, and constructs a commodity management model based on multi-dimensional analysis, which helps to achieve safer and more reliable commodity management, and significantly improves the scientific nature and risk resistance of commodity management.

[0042] The commodity management device, electronic device and computer-readable storage medium provided in this application also have the above-mentioned technical effects, which will not be described in detail in this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0044] Figure 1 A flowchart of a commodity management method provided in this application;

[0045] Figure 2 A network framework diagram of a stock management system provided by this application;

[0046] Figure 3 A structural diagram of a commodity management device provided by this application;

[0047] Figure 4 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0048] The core of this application is to provide a commodity management method, which can effectively improve the risk resistance of the commodity management strategy and achieve safer and more reliable commodity management; another core of this application is to provide a commodity management device, electronic device and computer-readable storage medium, all of which have the above-mentioned beneficial effects.

[0049] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced 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 making creative work are within the scope of protection of this application.

[0050] The embodiment of the present application provides a commodity management method.

[0051] Please refer to Figure 1 , Figure 1 This is a flow chart of a commodity management method provided in the present application. The commodity management method may include the following S101 to S105.

[0052] S101: Acquire commodity historical market data and commodity market environment data, and construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model.

[0053] This step aims to obtain product-related data and build an initial model.

[0054] First, the commodity-related data obtained mainly include commodity historical market data and commodity market environment data. Among them, commodity historical market data can include relevant information of various commodities in a certain period of time in the past, such as price data, transaction volume, etc.; commodity market environment data mainly refers to various external factors that affect market operation and commodity price fluctuations, such as unemployment rate, natural disasters, policy adjustments, etc. In a possible application environment, the commodity can be specifically a stock, and the corresponding commodity market environment data can be specifically a stock market index. It can be imagined that the above-mentioned types of data can be obtained through public data interfaces or exchanges and other related channels.

[0055] Further, an initial commodity management model is constructed, which includes a first network sub-model and a second network sub-model. Different network sub-models are used to implement different data processing functions. The commodity management model is finally constructed and optimized by iteratively optimizing and training the commodity historical market data and commodity market environment data, i.e., the target commodity management model described below. It can be understood that since the commodity management model is trained based on the commodity historical market data and commodity market environment data, that is, the development trend of various commodities and the real market environment changes are taken into account to realize the construction of the commodity management model, based on the commodity management model, safer and more reliable commodity management can be achieved, thereby effectively improving the scientific nature and risk resistance of commodity management.

[0056] It should be noted that when training a model based on commodity historical market data and commodity market environment data, it can be divided into a training set, a test set, and a validation set to train the optimal commodity management model. In addition, when dividing the data, it can be implemented in chronological order. For example, the data far from the current time is used as the training set, the data in the middle of the current time is used as the test set, and the data close to the current time is used as the validation set.

[0057] In one embodiment of the present application, after obtaining commodity historical market data and commodity market environment data, it can also include: performing preprocessing operations on the commodity historical market data and commodity market environment data; wherein the preprocessing operations include one or more combinations of data cleaning operations, missing value filling operations, and data deduplication operations.

[0058] In an embodiment of the present application, before performing model training based on commodity historical market data and commodity market environment data, preprocessing operations such as data cleaning operations, missing value filling operations, data deduplication operations, etc. can be performed on it to effectively ensure the accuracy and completeness of the model training data, and then ensure the accuracy of the model, so as to achieve safer and more reliable commodity management.

[0059] S102: Using the first network sub-model to process commodity historical market data and commodity market environment data, to obtain an initial trading strategy for each commodity.

[0060] This step aims to realize the generation of the initial commodity trading strategy, which is obtained by processing the commodity historical market data and commodity market environment data by the first network sub-model in the initial network model. As mentioned above, the commodity historical market data may include relevant information of various commodities in a certain period of time in the past, including but not limited to the transaction price, transaction quantity, highest transaction price, lowest transaction price, transaction time, etc. of each category of commodities. Combined with the commodity market environment data in the corresponding time period, the initial trading strategy of each category of commodities can be learned based on the first network sub-model. The initial trading strategy refers to the trading strategy of various commodities in the future trading cycle compared with the historical time period, including but not limited to the trading behavior (such as buying or selling) and trading intensity (such as selling all or selling in proportion) of various commodities.

[0061] It is understandable that this application does not specifically limit the model architecture of the first network sub-model. In one possible implementation, the first network sub-model can be a network model based on SAC (an Actor-Critic algorithm that outputs transaction actions through an Actor network and evaluates the value of the transaction action through a Critic network). The SAC algorithm can improve the efficiency of strategy exploration through maximum entropy regularization, and combine the experience replay mechanism to alleviate the problem of insufficient samples to a certain extent.

[0062] S103: Processing the commodity market environment data using the second network sub-model to obtain trading day forecast categories; wherein the trading day forecast categories include turning point trading days and non-turning point trading days.

[0063] This step aims to achieve the estimation of trading day categories, which are obtained by processing the commodity market environment data by the second network sub-model in the initial network model. Among them, the estimated trading day categories include turning point trading days and non-turning point trading days. The turning point refers to the key time node when the price trend of commodities in the financial market changes significantly. This turning point may be from rising to falling, or from falling to rising. In other words, the turning point trading day is the key moment of market trend change. By effectively identifying the turning point trading day, it can help to achieve safer and more reliable commodity trading.

[0064] Similarly, this application does not make any specific limitations on the model architecture of the above-mentioned second network sub-model. In one possible implementation, the second network sub-model can specifically be a network model based on TCN (Temporal Convolutional Network) and Attention (self-attention mechanism). TCN is a convolutional neural network structure specifically used to process time series data. It can better capture long sequence dependencies and temporal contextual information through causal convolution and dilated convolution; the core idea of ​​Attention is to enable the model to focus on the most relevant part of the sequence when processing sequence data, reducing the interference of irrelevant information.

[0065] S104: Adjust each initial trading strategy according to the estimated category of the trading day, obtain the target trading strategy, and obtain the target profit result corresponding to each target trading strategy.

[0066] This step aims to adjust the initial trading strategy and obtain its profit results. Specifically, taking the inflection point trading day into consideration, the initial trading strategy of each commodity is adjusted to obtain the adjusted commodity trading strategy, that is, the above-mentioned target trading strategy. Here, the strategy adjustment based on the estimated trading day category mainly refers to the trading intensity. Taking stocks as an example, when the estimated trading day category is an inflection point trading day, it means that the market may be about to change significantly. At this time, it is believed that the trading opportunity is good, so a higher trading intensity is allowed, and a larger amount of buying or selling operations can be executed; when the estimated trading day category is a non-inflection point trading day, it means that the market volatility is small and it is not suitable for frequent or large-scale position adjustments, thereby limiting the trading intensity, executing a small amount of transactions or even suspending transactions to reduce unnecessary transaction costs and risks.

[0067] Further, after obtaining the target trading strategy for each type of commodity, the target trading strategy can be executed through the market environment to obtain the corresponding target profit result. It can be understood that the target profit result is used to realize model training feedback, that is, to adjust the parameters of the initial commodity management model according to each target profit result, so as to carry out the next round of model training, until a target commodity management model that meets the requirements is obtained (such as S105).

[0068] In one embodiment of the present application, after the commodity historical market data and commodity market environment data are processed by the first network sub-model to obtain the initial trading strategy for each commodity, the method may further include: performing a legality analysis on each initial trading strategy to determine the legality category of each initial trading strategy; wherein the legality category includes a legal trading strategy and an illegal trading strategy;

[0069] Accordingly, adjusting each initial trading strategy according to the estimated category of the trading day to obtain the target trading strategy may include: adjusting each legal trading strategy according to the estimated category of the trading day to obtain the target trading strategy.

[0070] In the embodiment of the present application, the screening function of the initial trading strategy is further added, aiming to eliminate illegal initial trading strategies to effectively ensure the reliability of the model. Therefore, after obtaining each initial trading strategy, a legitimacy analysis can be performed on it to determine legal and illegal trading strategies, and then only the legal trading strategies are used for subsequent model training. Among them, the legitimacy analysis of the initial trading strategy can be implemented with reference to conventional trading decision logic, which refers to the rules based on which traders make trading decisions in the market, including but not limited to market environment, risk aversion, and subjective factors of traders.

[0071] Furthermore, the commodity management method may also include: obtaining strategy adjustment information of illegal trading strategies; adjusting illegal trading strategies according to the strategy adjustment information to obtain legal trading strategies. In other words, illegal trading strategies can also be converted into legal trading strategies through strategy adjustment to continue to participate in subsequent model training, so as to effectively ensure a sufficient amount of training data, thereby effectively ensuring model accuracy. Here, the content of strategy adjustment includes but is not limited to trading behavior, trading intensity, etc., and strategy adjustment can also be implemented based on trading decision logic to effectively ensure its legality.

[0072] S105: Optimizing the initial commodity management model according to each target revenue result until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

[0073] This step aims to achieve model optimization to obtain the final target product management model, thereby achieving product management. As mentioned above, the target revenue results are used to achieve model training feedback, that is, to adjust the parameters of the initial product management model according to each target revenue result for the next round of model training. In this way, through iterative training, a target product management model that meets the requirements (such as the training cycle reaches the preset cycle, the model reaches the convergence target, etc.) can be obtained.

[0074] It can be seen that the commodity management method provided in the embodiment of the present application takes into account the development trends of various commodities and the real changes in the market environment based on the historical commodity market data and commodity market environment data, and realizes the construction of a commodity management model. Among them, taking commodity development trends into consideration not only helps to tap into potential high-yield assets, but also effectively avoids misjudgments caused by short-term market fluctuations; taking changes in the market environment into consideration enables commodity management strategies to better adapt to market fluctuations, that is, the above-mentioned inflection point trading days, thereby reducing potential risks caused by environmental changes. It can be seen that this technical solution, under the premise of considering the final benefits of the commodity, takes into account commodity development trends and changes in the market environment, and constructs a commodity management model based on multi-dimensional analysis, which helps to achieve safer and more reliable commodity management, and significantly improves the scientific nature and risk resistance of commodity management.

[0075] Based on the above embodiments:

[0076] In one embodiment of the present application, the initial commodity management model may further include a third network sub-model; the commodity management method may further include: using the third network sub-model to process commodity historical market data to obtain commodity revenue of each commodity;

[0077] Accordingly, adjusting each initial trading strategy according to the estimated category of the trading day to obtain the target trading strategy may include: adjusting each initial trading strategy according to the estimated category of the trading day and the revenue of each commodity to obtain the target trading strategy.

[0078] The initial commodity management model provided in the embodiment of the present application may also include a third network sub-model, which is used to process the commodity historical market data to realize the commodity revenue prediction of various commodities, so that the adjustment of each initial trading strategy can be realized by comprehensively estimating the transaction day category and the revenue of each commodity, and each target trading strategy can be obtained to further ensure the rationality of each target trading strategy. In other words, in the initial commodity management model, the first network sub-model is the main one, which is used to generate the initial trading strategy, and the second network sub-model and the third network sub-model are auxiliary, which are used to estimate the transaction day category and the revenue of various commodities, respectively, so that the initial trading strategy can be adjusted by comprehensively considering the transaction day category and the revenue of various commodities, and a more reasonable and effective target trading strategy can be obtained, thereby realizing model training.

[0079] The third network sub-model is used to process the commodity historical market data to obtain the commodity revenue of each commodity, which may include:

[0080] Obtain the commodity characteristics of each commodity based on the commodity historical market data;

[0081] Obtain product associations based on product historical market data;

[0082] The third network sub-model is used to conduct a comprehensive analysis of commodity characteristics and commodity associations to obtain the commodity revenue of each commodity.

[0083] The embodiment of the present application provides a method for estimating commodity revenue based on the third network sub-model, that is, the commodity revenue of each commodity can be predicted by comprehensively analyzing the commodity characteristics of each commodity and the correlation between commodities. Among them, commodity characteristics may include but are not limited to commodity price, transaction volume, average price, etc. Taking stocks as an example, stock characteristics may specifically include opening price, closing price, highest price, lowest price, transaction volume, average transaction amount and turnover rate, etc.

[0084] Similarly, this application does not make any specific limitations on the model architecture of the third network sub-model mentioned above. In one possible implementation, the third network sub-model can specifically be a network model based on Hawkes (a self-excitation model) and GAT (Graph Attention Network). Hawkes is used to describe the mutual influence of events. The multidimensional Hawkes process can simultaneously model events in multiple time series and estimate the mutual stimulation or contagion effects between these events. GAT is a deep learning model that applies an attention mechanism to a graph structure. It allows each node to aggregate features based on the attention weights with neighboring nodes, thereby achieving a more refined representation on complex graph data.

[0085] Among them, adjusting each initial trading strategy according to the estimated category of the trading day and the revenue of each commodity to obtain the target trading strategy can include: adjusting the trading behavior in each initial trading strategy according to the revenue of each commodity, and adjusting the trading intensity in each initial trading strategy according to the estimated category of the trading day to obtain the target trading strategy.

[0086] The embodiment of the present application provides a method for adjusting each initial trading strategy according to the estimated category of the trading day and the revenue of each commodity. Specifically, the revenue of each commodity determines the trading behavior, such as buying or selling, and the estimated category of the trading day determines the trading intensity, such as the buying ratio, the selling ratio, etc., so as to obtain the adjusted target trading strategy. For example, for commodities with higher commodity revenue, all of them can be sold, for commodities with medium commodity revenue, they can be sold at a ratio of 50%, and for commodities with lower commodity revenue, they can continue to be held without selling.

[0087] On this basis, the corresponding target trading strategies can also be sorted according to the revenue of each type of goods. For example, the goods can be sorted from high to low in order to achieve the sequential execution of the target trading strategies.

[0088] The embodiment of the present application takes stocks as an example and provides another commodity management method.

[0089] As mentioned above, traditional commodity management technology mainly focuses on maximizing the final profit of commodities, that is, optimizing the investment portfolio with the final profit as the core goal. However, this single-dimensional optimization method ignores the dynamic changes of the market and the long-term development trend of commodities, resulting in the final commodity management decision seriously lacking risk resistance and prone to major losses in the commodity management process. The traditional stock management model based on the SAC algorithm also has corresponding technical problems:

[0090] (1) The problem of sparse reward signals: In large-scale portfolio problems, reward signals are often too sparse, making it difficult for the model to effectively capture the potential performance of each stock and make differentiated trading decisions, resulting in slow network training convergence and poor strategy quality.

[0091] (2) Limited ability to balance returns and risks: SAC and other algorithms mainly focus on maximizing returns. In the process of strategy generation, they do not fully utilize external information such as market trends and asset correlations, and are unable to fully balance returns and risks.

[0092] (3) Insufficient trading efficiency and frequency control capabilities: Due to the lack of recognition of market turning points in trading behaviors or the failure to set corresponding cost constraints during the training process, some strategies have excessive trading frequencies, which not only increases trading costs but also amplifies the portfolio volatility risk to a certain extent.

[0093] (4) Weak adaptability to dynamic markets: Traditional models ignore the dynamic changes in the market environment (such as major events, market turning points, etc.). When testing across markets and time periods, it is difficult for traditional models to capture changes in market direction or adapt to new market volatility structures in a timely manner, resulting in unstable returns and poor performance in different market environments.

[0094] For further information, please refer to Figure 2 , Figure 2 This is a network framework diagram of a stock management system provided in this application. The network framework is a DRL (Deep Reinforcement Learning) framework based on "Relaxation-and-Refinement", which can be called R 2 -SAC (Relaxation-and-Refinement SAC) framework, which mainly includes relaxation strategy module, dual auxiliary module and re-optimization module. 2 -The implementation process of the stock management method of the SAC framework is as follows:

[0095] 1. Data input and preprocessing:

[0096] Obtain historical stock market data from public data interfaces or exchange subscription channels, perform preprocessing such as cleaning, deduplication, and missing value filling, and then divide it into training set, test set, and validation set in chronological order.

[0097] 2. Relaxation strategy module:

[0098] First, the SAC-Agent is initialized, the SAC network structure is constructed, and the model hyperparameters are set; further, for individual stocks, the SAC network outputs the initial trading strategy, including trading behavior (buy / sell / hold) and trading intensity (buy / sell ratio); then, the legality of the initial trading strategy is judged through the trading decision logic, and the illegal initial trading strategy is adjusted to form a rough strategy (legal trading strategy) for the trading intention of individual stocks as the input of the subsequent optimization module.

[0099] It is understandable that the introduction of relaxation strategies in the training phase enables the decomposition of complex portfolio management problems into learning tasks for single stock trading strategies. This can significantly alleviate the problem of sparse reward signals in large-scale portfolios and improve the convergence speed and stability of the model. In addition, this solution eliminates the practice of directly outputting the complete portfolio weights end-to-end, and reduces the coupling of the model through the relaxed coarse strategy, focusing on the learning objectives of single asset returns and risks.

[0100] 3. Dual auxiliary information acquisition:

[0101] (1) Market turning point prediction: The TCN network is used to extract the time series features of the market index (market environment data) in the last few days, and then the long-term dependency relationship is learned through the self-attention mechanism to output the probability or classification label of whether the next trading day is a turning point (turning point trading day or non-turning point trading day).

[0102] (2) Individual stock return scoring: Based on the Hawkes process model, the mutual influence of historical price fluctuation events among multiple stocks is extracted to form a correlation matrix (commodity association relationship). Then, based on the graph attention network, the local graph information of each stock (commodity characteristics) is aggregated to output the predicted return value or ranking score (commodity return) for the next period.

[0103] Specifically, since the multidimensional Hawkes process can describe a series of time-evolving events, the occurrence of any one event will increase the possibility of subsequent events and gradually decay over time. In the stock scenario, events can be defined as significant positive or negative returns. Multidimensional interactions mean that a large fluctuation in one stock may trigger the concomitant fluctuation of other stocks. Based on this, the events of multiple stocks at different time points are sorted in time and cross-compared. If it is found that the event of a certain stock has a strong triggering contribution to the event of another stock, an edge is added to the association graph, and finally an association graph is obtained, in which each node corresponds to a stock. If two stocks are strongly associated according to the multidimensional Hawkes process, the edge weight is set to 1, otherwise it is set to 0, thus forming a stock association graph. In addition, for each stock node, the seven-dimensional features such as opening price, closing price, highest price, lowest price, trading volume, average trading amount and turnover rate are collected, and the edge relationship obtained from the Hawkes graph is used as the input of GAT to output the yield prediction score for the next trading day.

[0104] Based on the dual auxiliary information, we can better grasp the key opportunities for portfolio adjustment during strategy execution, thereby overcoming the problem of slow response of traditional technology to dynamic market changes and enhancing the ability to adapt to downward markets or volatile markets.

[0105] 4. Optimize execution:

[0106] The trading intensity is automatically determined based on the market turning point prediction results, the output of the relaxation strategy module is integrated with the individual stock return score, and finally the buy or sell is prioritized based on the score. Finally, the final target trading strategy is submitted to the trading environment for execution, and the new account net value and return indicator (target return result) are obtained to provide feedback for the next round of training.

[0107] 5. Model iteration update:

[0108] According to the set training cycle or profit / risk target, the above steps are continuously iterated until the model performance reaches the expected value, and the final stock management model (target commodity management model) is obtained.

[0109] Finally, to verify the effectiveness of the present invention, comparative tests were conducted on four major markets (CSI 500, CSI 300, NASDAQ 100, and DJIA 30), and the results are shown in Table 1. Table 1 is a performance comparison analysis table of a CSI 500 market under various stock management systems provided in the present application, Table 2 is a performance comparison analysis table of a CSI 300 market under various stock management systems provided in the present application, Table 3 is a performance comparison analysis table of a NASDAQ 100 market under various stock management systems provided in the present application, and Table 4 is a performance comparison analysis table of a DJIA 30 market under various stock management systems provided in the present application. Among them, the performance indicators analyzed mainly include cumulative wealth (CW, Cumulative Wealth, the higher the value, the better the return), annualized percentage yield (APY, Annualized Percentage Yield, the higher the value, the better the annualized return), cumulative excess return (CER, Cumulative Excess Return, the higher the value, the more significant the excess return), maximum drawdown (MD, Maximum Drawdown, the lower the value, the stronger the risk resistance), annualized volatility (AVO, Annualized Volatility, the lower the value, the more stable the return), annualized Sharpe ratio (ASR, Annualized Sharpe Ratio, the higher the value, the better the risk-adjusted return), Calmar ratio (CR, Calmar Ratio, the higher the value, the better the balance between return and drawdown), Sortino ratio (SoR, Sortino Ratio, the higher the value, the better the control of downside risk). The symbol "↑" in the table indicates that the higher the performance indicator value, the better, and the symbol "↓" indicates that the lower the performance indicator value, the better. From Tables 1 to 4, it can be seen that the system based on the R2-SAC algorithm proposed in this application is superior to other comparison methods in all indicators in all markets and time intervals compared to the system based on the traditional algorithm (such as System, Market, SAC, SAC (T), Relax-SAC, Relax-SAC (T), Relax-SAC (S) shown in Table 1), achieving higher returns and lower risks. This result fully demonstrates that the R2-SAC algorithm has good robustness and generalization ability in dealing with dynamic stock markets, and reflects its practical value in the application of stock portfolio management in the real stock market.

[0110] Table 1 Comparative analysis of the performance of the CSI 500 market under various stock management systems

[0111]

[0112] Table 2 Comparative analysis of the performance of the CSI 300 market under various stock management systems

[0113]

[0114] Table 3 Performance comparison of NASDAQ 100 market under various stock management systems

[0115]

[0116] Table 4 DJIA 30 market performance comparison analysis under various stock management systems

[0117]

[0118] It can be seen that the stock management method provided in the embodiment of the present application has the following advantages:

[0119] (1) More efficiently train DRL models in large-scale combination scenarios, alleviating the training difficulties caused by sparse rewards;

[0120] (2) It can still balance returns and risks in a downward or highly volatile market, reduce the maximum drawdown and improve the overall return-risk ratio;

[0121] (3) Control invalid transactions and transaction costs, and reduce meaningless portfolio adjustments through market turning points and individual stock scoring mechanisms;

[0122] (4) It can better adapt to the turbulent and changing market environment and achieve stable return performance in cross-market and cross-time period tests.

[0123] An embodiment of the present application provides a commodity management device.

[0124] Please refer to Figure 3 , Figure 3 This is a structural diagram of a commodity management device provided by the present application, and the commodity management device may include:

[0125] Acquisition module 1, used to acquire commodity historical market data and commodity market environment data, and construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model;

[0126] The first processing module 2 is used to process the commodity historical market data and commodity market environment data using the first network sub-model to obtain an initial trading strategy for each commodity;

[0127] The second processing module 3 is used to process the commodity market environment data using the second network sub-model to obtain the estimated trading day categories; wherein the estimated trading day categories include inflection point trading days and non-inflection point trading days;

[0128] Adjustment module 4, used to adjust each initial trading strategy according to the estimated category of the trading day, obtain the target trading strategy, and obtain the target profit result corresponding to each target trading strategy;

[0129] The optimization module 5 is used to optimize the initial commodity management model according to each target revenue result until the target commodity management model is obtained, so as to implement commodity management by using the target commodity management model.

[0130] It can be seen that the commodity management device provided in the embodiment of the present application takes into account the development trends of various commodities and the actual changes in the market environment based on the commodity historical market data and commodity market environment data, and realizes the construction of a commodity management model. Among them, taking commodity development trends into consideration not only helps to tap into potential high-yield assets, but also effectively avoids misjudgments caused by short-term market fluctuations; taking market environment changes into consideration enables commodity management strategies to better adapt to market fluctuations, that is, the above-mentioned inflection point trading days, thereby reducing potential risks caused by environmental changes. It can be seen that this technical solution, under the premise of considering the final benefits of the commodity, takes into account commodity development trends and market environment changes, and constructs a commodity management model based on multi-dimensional analysis, which helps to achieve safer and more reliable commodity management, and significantly improves the scientific nature and risk resistance of commodity management.

[0131] In one embodiment of the present application, the commodity management device may further include an analysis module, which is used to perform a legality analysis on each initial trading strategy after processing the commodity historical market data and the commodity market environment data using the first network sub-model to obtain the initial trading strategy of each commodity, and determine the legality category of each initial trading strategy; wherein the legality category includes legal trading strategy and illegal trading strategy;

[0132] Accordingly, the adjustment module 4 can be specifically used to adjust each legal trading strategy according to the estimated category of the trading day to obtain the target trading strategy.

[0133] In one embodiment of the present application, the above-mentioned analysis module can also be used to obtain strategy adjustment information of illegal trading strategies; adjust the illegal trading strategies according to the strategy adjustment information to obtain legal trading strategies.

[0134] In one embodiment of the present application, the initial commodity management model further includes a third network sub-model; the commodity management device may further include a third processing module, which is used to process the commodity historical market data using the third network sub-model to obtain commodity revenue of each commodity;

[0135] Accordingly, the adjustment module 4 can be specifically used to adjust each initial trading strategy according to the estimated category of the trading day and the revenue of each commodity to obtain a target trading strategy.

[0136] In one embodiment of the present application, the above-mentioned third processing module can be specifically used to obtain the product characteristics of each product based on the historical market data of the product; obtain the product association relationship based on the historical market data of the product; use the third network sub-model to conduct a comprehensive analysis of the product characteristics and the product association relationship to obtain the product revenue of each product.

[0137] In one embodiment of the present application, the above-mentioned adjustment module 4 can be specifically used to adjust the trading behavior in each initial trading strategy according to the revenue of each commodity, and adjust the trading intensity in each initial trading strategy according to the estimated category of the trading day to obtain the target trading strategy.

[0138] In one embodiment of the present application, the commodity management device may also include a preprocessing module for performing preprocessing operations on the commodity historical market data and the commodity market environment data after acquiring the commodity historical market data and the commodity market environment data as mentioned above; wherein the preprocessing operation includes a combination of one or more of data cleaning operations, missing value filling operations, and data deduplication operations.

[0139] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0140] An embodiment of the present application provides an electronic device.

[0141] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0142] A memory 11, used for storing computer programs;

[0143] The processor 10 can implement the steps of any one of the above-mentioned commodity management methods when executing a computer program.

[0144] like Figure 4 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0145] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0146] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in the embodiment of the commodity management method.

[0147] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0148] Obtain commodity historical market data and commodity market environment data, and construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model;

[0149] The first network sub-model is used to process the commodity historical market data and commodity market environment data to obtain the initial trading strategy for each commodity;

[0150] The commodity market environment data is processed using the second network sub-model to obtain the estimated trading day categories; wherein the estimated trading day categories include turning point trading days and non-turning point trading days;

[0151] Adjust each initial trading strategy according to the estimated category of the trading day, obtain the target trading strategy, and obtain the target profit result corresponding to each target trading strategy;

[0152] The initial commodity management model is optimized according to each target revenue result until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

[0153] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0154] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0155] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0156] Of course, it should be noted that Figure 4 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 4 More or fewer components than shown, or combinations of certain components.

[0157] An embodiment of the present application provides a computer-readable storage medium.

[0158] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned commodity management methods can be implemented.

[0159] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0160] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0161] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0162] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0163] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0164] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A commodity management method, characterized in that: include: Acquire commodity historical market data and commodity market environment data, and construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model; Processing the commodity historical market data and the commodity market environment data using the first network sub-model to obtain an initial trading strategy for each commodity; The commodity market environment data is processed by using the second network sub-model to obtain trading day estimation categories; wherein the trading day estimation categories include inflection point trading days and non-inflection point trading days; Adjusting each of the initial trading strategies according to the estimated categories of the trading days to obtain a target trading strategy, and obtaining a target return result corresponding to each of the target trading strategies; The initial commodity management model is optimized according to each of the target revenue results until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

2. The commodity management method according to claim 1, characterized in that: After the commodity historical market data and the commodity market environment data are processed by the first network sub-model to obtain an initial trading strategy for each commodity, the method further includes: Performing a legitimacy analysis on each of the initial trading strategies to determine a legitimacy category of each of the initial trading strategies; wherein the legitimacy category includes a legal trading strategy and an illegal trading strategy; Accordingly, each of the initial trading strategies is adjusted according to the estimated trading day category to obtain a target trading strategy, including: Each of the legal trading strategies is adjusted according to the estimated category of the trading day to obtain the target trading strategy.

3. The commodity management method according to claim 2, characterized in that: Also includes: Obtaining strategy adjustment information of the illegal trading strategy; The illegal transaction strategy is adjusted according to the strategy adjustment information to obtain the legal transaction strategy.

4. The commodity management method according to any one of claims 1 to 3, characterized in that: The initial commodity management model further includes a third network sub-model; the method further includes: Processing the commodity historical market data using the third network sub-model to obtain commodity revenue of each of the commodities; Accordingly, each of the initial trading strategies is adjusted according to the estimated trading day category to obtain a target trading strategy, including: The initial trading strategies are adjusted according to the estimated categories of the trading days and the revenues of the commodities to obtain the target trading strategies.

5. The commodity management method according to claim 4, characterized in that: The third network sub-model is used to process the commodity historical market data to obtain commodity revenue of each commodity, including: Acquire commodity characteristics of each of the commodities according to the commodity historical market data; Acquire commodity association relationships based on the commodity historical market data; The third network sub-model is used to comprehensively analyze the commodity characteristics and the commodity association relationships to obtain the commodity revenue of each of the commodities.

6. The commodity management method according to claim 4, characterized in that: The initial trading strategies are adjusted according to the estimated categories of the trading days and the revenues of the commodities to obtain the target trading strategies, including: The trading behaviors in each of the initial trading strategies are adjusted according to the revenue of each of the commodities, and the trading intensity in each of the initial trading strategies is adjusted according to the estimated category of the trading day to obtain the target trading strategy.

7. The commodity management method according to claim 1, characterized in that: After obtaining commodity historical market data and commodity market environment data, it also includes: A preprocessing operation is performed on the commodity historical market data and the commodity market environment data; wherein the preprocessing operation includes a combination of one or more of a data cleaning operation, a missing value filling operation, and a data deduplication operation.

8. A commodity management device, characterized in that: include: An acquisition module is used to acquire commodity historical market data and commodity market environment data to construct an initial commodity management model; wherein the initial commodity management model includes a first network sub-model and a second network sub-model; A first processing module, configured to process the commodity historical market data and the commodity market environment data using the first network sub-model to obtain an initial trading strategy for each commodity; A second processing module is used to process the commodity market environment data using the second network sub-model to obtain a trading day estimation category; wherein the trading day estimation category includes an inflection point trading day and a non-inflection point trading day; An adjustment module, used to adjust each of the initial trading strategies according to the estimated category of the trading day, obtain a target trading strategy, and obtain a target return result corresponding to each of the target trading strategies; The optimization module is used to optimize the initial commodity management model according to each of the target revenue results until a target commodity management model is obtained, so as to implement commodity management using the target commodity management model.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the commodity management method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the commodity management method according to any one of claims 1 to 7 are implemented.