Task processing method and device, storage medium and electronic equipment
By displaying the configuration interface in the futures market to obtain data, determine and cluster processing target indicators, and calculate the contribution values of each factor, the problems of low efficiency and analysis limitations of attribution tasks in the existing technology are solved, and multi-dimensional futures market return fluctuation analysis is realized.
Patent Information
- Application Number
- CN202510313353.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, the attribution tasks of the futures market are inefficient in execution and have limitations in analysis. They mainly rely on manual experience and each target factor is described in futures from a single dimension, and it is impossible to fully understand the multidimensional factors that affect futures market returns fluctuations.
Provide a task processing method, which obtains the target description data of the futures market through the display configuration interface, determines the values of multiple target indicators, and performs clustering processing, calculates the contribution value of each factor to the fluctuation of returns, and outputs candidate factors that affect the fluctuation of futures market returns.
It improves the execution efficiency of attribution tasks, avoids the limitations of single-dimensional analysis, analyzes based on factors from multiple dimensions, and has a comprehensive understanding of the return fluctuations in the futures market.
Smart Images

Figure CN120355507A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular to a task processing method, device, storage medium and electronic device. Background Art
[0002] In the futures market, target factors are used to describe futures, and different target factors describe different dimensions. For example, the momentum factor is used to characterize the trend of price changes of futures, and the turnover rate factor is used to characterize the liquidity of futures. Usually, the regulatory agency of futures will regularly perform an attribution task to analyze the return volatility of a certain historical period in the futures market, and analyze the factors that affect the return volatility of the futures market during this historical period, so as to play a reference role for futures market participants to better maintain the stability of the futures market. For example, for the return volatility of a certain historical period, it is analyzed that a factor such as the short-term turnover rate causes the return volatility of the futures market during this historical period, so as to determine that the short-term turnover rate affects the return volatility of this historical period.
[0003] In the prior art, the above-mentioned attribution task is mainly performed through manual experience, and the execution efficiency is low. Moreover, each target factor involved in manual analysis describes futures from a single dimension, and usually the reasons affecting the return volatility of the futures market are not limited to a single dimension. Therefore, how to balance improving the execution efficiency of the attribution task and avoiding great limitations in the analysis of the futures market has become a technical problem to be solved urgently. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a task processing method, device, storage medium and electronic device to achieve a balance between improving the execution efficiency of the attribution task and avoiding great limitations in the analysis of the futures market. The specific technical solutions are as follows:
[0005] In a first aspect, this application provides a task processing method, which is applied to a task processing platform. The method includes:
[0006] Display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task;
[0007] Obtain the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed for the task and the target historical period;
[0008] Determine the access address of the specified futures market with the said market identifier, and access the said access address to obtain the target description data of each target futures in the specified futures market within the target time period; wherein, the end time of the said target time period is the end time of the said target historical period, and the start time is earlier than the start time of the target historical period;
[0009] Based on the obtained target description data, determine the values of multiple target indicators; wherein, each target indicator is used to characterize a target factor of a target futures, the target futures characterized by the multiple target indicators include all the said target futures and the types of target factors characterized by the multiple target indicators are multiple, and the value of each target indicator is the factor value of the target factor of the target futures characterized by the target indicator;
[0010] Perform clustering processing on the multiple target indicators to obtain multiple clustering indicators; wherein, the clustering processing is used to divide the target indicators that meet the specified conditions into one category, the said specified conditions include that the futures characterized belong to the same category, and each clustering indicator is used to characterize the target indicators divided into the same category;
[0011] For each clustering indicator, calculate the value of the clustering indicator based on the values of the target indicators characterized by the clustering indicator;
[0012] For each specified factor among the various specified factors, based on the value of the indicator used to characterize the specified factor, determine the contribution value of the specified factor to the profit fluctuation of the specified futures market within the said target historical period, and obtain the contribution value corresponding to the specified factor; wherein, the various specified factors include all the target factors characterized by the multiple target indicators and the factors characterized by the obtained clustering indicators;
[0013] Based on the contribution value corresponding to each specified factor, output the task execution result; wherein, the task execution result is the candidate factor that affects the profit fluctuation of the said specified futures market within the said target historical period.
[0014] In a second aspect, the present application provides a task processing device, which is applied to a task processing platform, and the device includes:
[0015] A display module, which is used to display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task;
[0016] A first acquisition module, which is used to acquire the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed for the task and the target historical period;
[0017] A first determination module, configured to determine an access address of a specified futures market with the market identifier, and access the access address to obtain target description data of each target futures in the specified futures market within a target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period;
[0018] A second determination module, configured to determine the values of multiple target indicators based on the obtained target description data; wherein, each target indicator is used to characterize a target factor of a target futures, the target futures characterized by the multiple target indicators include the respective target futures, and the types of target factors characterized by the multiple target indicators are multiple, and the value of each target indicator is the factor value of the target factor of the target futures characterized by the target indicator;
[0019] A clustering module, configured to perform clustering processing on the multiple target indicators to obtain multiple clustering indicators; wherein, the clustering processing is used to divide target indicators that meet specified conditions into one category, the specified conditions include that the futures characterized belong to the same category, and each clustering indicator is used to characterize the target indicators divided into the same category;
[0020] A calculation module, configured to calculate the value of each clustering indicator based on the values of the target indicators characterized by the clustering indicator;
[0021] A third determination module, configured to, for each specified factor among the various specified factors, determine the contribution value of the specified factor to the profit fluctuation of the specified futures market within the target historical period based on the value of the indicator used to characterize the specified factor, and obtain the contribution value corresponding to the specified factor; wherein, the various specified factors include the respective target factors characterized by the multiple target indicators and the factors characterized by the obtained clustering indicators;
[0022] An output module, configured to output a task execution result based on the contribution value corresponding to each specified factor; wherein, the task execution result is a candidate factor that affects the profit fluctuation of the specified futures market within the target historical period.
[0023] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0024] The memory is used to store a computer program;
[0025] The processor, when executing the program stored on the memory, implements the task processing method described in any one of the above.
[0026] Fourthly, the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the task processing method described in any one of the above is implemented.
[0027] Fifthly, the present application further provides a computer program product containing instructions, which when running on a computer, enables the computer to execute the task processing method described in any one of the above.
[0028] Beneficial effects of the embodiments of the present application:
[0029] The solution of the present application can provide a configuration interface for users to configure task information of a target attribution task. After obtaining the task information of the target attribution task configured by the user, based on the task information, the target description data of each target futures in the specified futures market within a target time period can be obtained from the access address of the specified futures market. The values of multiple target indicators are determined based on the obtained target description data of each target futures, and the determined multiple target indicators are clustered to obtain clustering indicators, thereby increasing the dimension of factors; based on the values of the indicators of each specified factor determined, the contribution value of each specified factor to the return fluctuation of the specified futures market within the target historical period is determined, and thus based on the contribution value corresponding to each specified factor, candidate factors affecting the return fluctuation of the specified futures market within the target historical period are output. It can be seen that the solution of the present application can effectively improve the efficiency of the specified attribution task, and analyze the attribution task based on factors in multiple dimensions. Therefore, the present application can take into account improving the execution efficiency of the attribution task and avoiding the limitations caused by each target factor being a single dimension.
[0030] Certainly, when implementing any product or method of the present application, it is not necessarily required to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0032] Figure 1 It is a schematic flowchart of a task processing method provided by an embodiment of the present application;
[0033] Figure 2 It is a schematic structural diagram of an exemplary clustering model provided by the present application;
[0034] Figure 3Schematic flowchart of another task processing method provided by an embodiment of the present application;
[0035] Figure 4 Schematic flowchart of yet another task processing method provided by an embodiment of the present application;
[0036] Figure 5 Schematic structural diagram of a task processing device provided by an embodiment of the present application;
[0037] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0038] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.
[0039] In the technical solutions of the present application, operations such as obtaining, storing, using, processing, transmitting, providing, and disclosing user personal information are all carried out under the condition of obtaining user authorization.
[0040] In order to balance improving the execution efficiency of the attribution task and avoiding the limitations caused by each target factor being a single dimension, an embodiment of the present application provides a task processing method, device, storage medium, and electronic device; a task processing method of the present application can be applied to a task processing platform, and the task processing platform can be software such as a web page, a client, and a small program that implements the task processing method. The present application does not limit the task processing platform. The method includes:
[0041] Display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task;
[0042] Obtain the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed for the task and the target historical period;
[0043] Determine the access address of the specified futures market with the market identifier, and access the access address to obtain the target description data of each target futures in the specified futures market within the target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period;
[0044] Based on the obtained target description data, determine the values of multiple target metrics; wherein, each target metric is used to characterize a target factor of a target futures contract, the target futures contracts characterized by the multiple target metrics include all the target futures contracts, and the types of target factors characterized by the multiple target metrics are multiple, and the value of each target metric is the factor value of the target factor of the target futures contract characterized by the target metric;
[0045] Perform clustering processing on the multiple target metrics to obtain multiple clustering metrics; wherein, the clustering processing is used to divide target metrics that meet specified conditions into one category, the specified conditions include that the characterized futures contracts belong to the same category, and each clustering metric is used to characterize the target metrics divided into the same category;
[0046] For each clustering metric, calculate the value of the clustering metric based on the values of the target metrics characterized by the clustering metric;
[0047] For each specified factor among the various specified factors, based on the value of the metric used to characterize the specified factor, determine the contribution value of the specified factor to the return volatility of the specified futures market within the target historical period, and obtain the contribution value corresponding to the specified factor; wherein, the various specified factors include all the target factors characterized by the multiple target metrics and the factors characterized by the obtained clustering metrics;
[0048] Based on the contribution value corresponding to each specified factor, output the task execution result; wherein, the task execution result is the candidate factor that affects the return volatility of the specified futures market within the target historical period.
[0049] The solution of this application can provide a configuration interface for users to configure the task information of the target attribution task. After obtaining the task information of the target attribution task configured by the user, based on the task information, from the access address of the specified futures market, obtain the target description data of each target futures contract in the target time period, determine the values of multiple target metrics based on the obtained target description data of each target futures contract, and perform clustering processing on the determined multiple target metrics to obtain clustering metrics, thereby increasing the dimension of the factors; based on the values of the metrics of each determined specified factor, determine the contribution value of each specified factor to the return volatility of the specified futures market within the target historical period, and thereby, based on the contribution value corresponding to each specified factor, output the candidate factors that affect the return volatility of the specified futures market within the target historical period. It can be seen that the solution of this application can effectively improve the efficiency of the specified attribution task, and perform the analysis of the attribution task based on factors in multiple dimensions. Therefore, this application can take into account improving the execution efficiency of the attribution task and avoiding the limitations caused by each target factor being single-dimensional.
[0050] The following introduces a task processing method provided by the present application in conjunction with the accompanying drawings.
[0051] Figure 1 It is a schematic flowchart of a task processing method provided by the present application. As Figure 1 shown, the method includes:
[0052] S101, display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task;
[0053] If a user wants to execute an attribution task, an instruction can be sent to the task processing platform. For example, the task processing platform can provide a trigger button for the attribution task, and when the user clicks the button, the task can be triggered to start, and thus the task processing platform can display the task configuration interface.
[0054] S102, obtain the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed for the task and the target historical period;
[0055] On the task configuration interface, the user can input or select the task information of the target attribution task. Exemplarily, if the user wants to conduct an attribution analysis on the futures return volatility of the futures market in Area A on March 4th in historical time, then the task information may include the market identifier of the futures market in Area A and the time period from March 4th.
[0056] S103, determine the access address of the specified futures market with the market identifier, and access the access address to obtain the target description data of each target futures in the specified futures market within the target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period;
[0057] Each futures market can provide an access address for data access. From the access address, the target description data of each target futures in the futures market can be obtained.
[0058] There can be various types of the target description data. For example: contract code, market date, closing price, and open interest, etc. The types of the obtained target description data can be set according to specific scenarios.
[0059] In the present application, since when constructing factors subsequently, the data used is not only the data of the target historical period, therefore, the obtained target description data of each futures includes not only the target description data of each target futures in the target historical period, but also the target description data of each target futures in the time period before the target historical period.
[0060] Exemplarily, the target historical period is from N to N - 7 days; then the target time period can be from N to N - 60 days. N is the end time of the target time period. Specifically, the target historical period is from March 31st to March 24th; then the target time period can be from March 31st to February 1st, and March 31st is the end time of the target time period.
[0061] S104. Based on the obtained target description data, determine the values of multiple target indicators; wherein, each target indicator is used to represent a target factor of a target futures contract. The target futures contracts represented by these multiple target indicators include all these target futures contracts, and the types of target factors represented by these multiple target indicators are multiple. The value of each target indicator is the factor value of the target factor of the target futures contract represented by this target indicator.
[0062] Each futures contract can correspond to multiple factors. For example, momentum factor, volatility factor, term structure factor, turnover rate factor, etc. Moreover, each type of factor can be divided into three categories: long - term, medium - term, and short - term. For example, the momentum factor of any futures contract can be divided into long - term momentum factor, medium - term momentum factor, and short - term momentum factor.
[0063] Among them, the momentum factor is used to reflect the continuity of the futures price trend; the volatility factor is used to measure the intensity of the futures price fluctuation; the term structure factor reflects the supply - demand relationship of futures through the price differences of different maturity contracts; the turnover rate is used to measure the trading activity of assets.
[0064] For each of the target futures contracts, there can be the same type of target factors. For example, futures A, futures B, and futures C can all have the factor of the long - term momentum factor type.
[0065] Next, exemplarily introduce the calculation methods of the momentum factor, volatility factor, term structure factor, and turnover rate factor.
[0066] Among them, the construction method of the momentum factor is: where p t is the futures price at time t; p t-n is the futures price at n time units before time t. In this embodiment, t can be the end time of the target historical period.
[0067] n can be set to three different values to obtain short - term momentum, medium - term momentum, and long - term momentum. For example, when the time unit is days, n = 5 can be set to construct the short - term momentum factor; n = 20 can be set to construct the medium - term momentum factor; n = 60 can be set to construct the long - term momentum factor.
[0068] In different scenarios, the time unit can be different, such as days, weeks, months, etc.
[0069] Among them, the construction method of the term structure factor is as follows:
[0070] Among them, P mt is the closing price of the m-th contract from the nearest to the farthest delivery date of the variety on day t, and T m is the delivery date of the m-th contract, and T m - T1 is the number of days between T m and T1. P 1t is the closing price of the 1st contract from the nearest to the farthest delivery date of the variety on day t. It can be understood that the delivery dates of different contracts of each futures are different. Therefore, the delivery dates of the m-th contract and the 1st contract may not be on the same day.
[0071] For the term structure factor constructed in the above manner, further processing can be performed to make it smoother and more stable. The processing method is as follows:
[0072]
[0073] S t,b is the more smoothed structural term factor after processing. b can be set to three different values to obtain the short-term structural term factor, the medium-term structural term factor, and the long-term structural term factor. For example, when the time unit is days, b = 5 can be set to construct the short-term term structure factor; b = 20 can be set to construct the medium-term term structure factor, and b = 60 can be set to construct the long-term term structure factor.
[0074] Among them, the construction method of the turnover rate factor is as follows:
[0075] Among them, the V t is the trading volume at time t, and P t is the open interest at time t.
[0076] For the turnover rate factor constructed in the above manner, further processing can be performed to make it smoother and more stable. The processing method is as follows:
[0077]
[0078] T t,b is the more smoothed turnover rate factor after processing. b can be set to three different values to obtain the short-term turnover rate factor, the medium-term turnover rate factor, and the long-term turnover rate factor. For example, when the time unit is days, b = 5 can be set to construct the short-term turnover rate factor; b = 20 can be set to construct the medium-term turnover rate factor, and b = 60 can be set to construct the long-term turnover rate factor.
[0079] Among them, the construction method of the volatility factor is as follows:
[0080] Among them, is the average return rate,
[0081] x t-i is the return rate with respect to time t-i, and p t-i is the closing price at time t-i, and p t-i-1 is the closing price at time t-i-1. t can be the end time of the target historical period.
[0082] δ t is the volatility factor. i can be set to three different values to obtain the short-term volatility factor, medium-term volatility factor, and long-term volatility factor. For example, when the time unit is days, i = 5 can be set to construct the short-term volatility factor; i = 20 can be set to construct the medium-term volatility factor, and i = 60 can be set to construct the long-term volatility factor.
[0083] In this application, the closing price of the futures can be determined in the following manner:
[0084] Use the closing price of the contract with the largest open interest on the current day as the closing price of the futures. If the contract with the largest open interest on the current day is the same as that on the previous day, no modification is made. If they are different, the following logic is used to calculate the closing price of the futures on the current day:
[0085] P t = PC t ×∏ t f t ;
[0086] Among them, f t = PY t ÷PC t ; PY t is the closing price on day t of the contract with the largest open interest on day t-1. PC t is the closing price on day t of the contract with the largest open interest on day t. f t is the restoration factor on day t. If there is no contract switch on day t, its value is 1. P t is the closing price of the futures variety on day t.
[0087] The target factor may further include an industry factor. The construction method of the industry factor can be to first classify the industries of each target futures, and then construct a variable matrix H ij . Among them, H ij represents whether the futures variety i belongs to the classification j. If it is, the value is 1; otherwise, the value is 0. The industry factor is used to characterize the classification of each target futures.
[0088]
[0089]
[0090] Table 1
[0091] The above Table 1 is an exemplary classification result obtained by classifying the industries of each target futures.
[0092] S105. Perform clustering processing on the multiple target indicators to obtain multiple clustering indicators; wherein, the clustering processing is used to divide the target indicators that meet the specified conditions into one category, and the specified conditions include that the represented futures belong to the same category, and each clustering indicator is used to represent the target indicators divided into the same category.
[0093] Generally, the indicators of each target futures belonging to the same industry can be clustered into one category, and the indicators belonging to the same factor category can be clustered into one category.
[0094] However, in this application, clustering processing is performed on the multiple indicators, comprehensively considering multiple dimensions such as the industry category and factor category of the futures, to obtain a more accurate clustering result.
[0095] Each clustering indicator can be used to represent a clustering factor, and the clustering factor can represent each indicator belonging to the same category, and the various indicators can be indicators of different futures.
[0096] Optionally, the performing clustering processing on the multiple target indicators to obtain multiple clustering indicators includes:
[0097] Input the vector features respectively corresponding to the multiple target indicators into a pre-trained clustering model to obtain a clustering result; wherein, the clustering model is used to map each received input data to a specified projection space, and the difference in the positions of the various input data mapped to the specified projection space represents the category difference between the various input data; wherein, the vector feature corresponding to each target indicator is composed of the vectorized content of the target indicator and the vectorized content of the value of the target indicator.
[0098] Based on the clustering result, determine multiple clustering indicators.
[0099] The solution of this embodiment can input the feature vectors of the multiple indicators determined above into a pre-completed clustering model, for example, input the feature vectors of the indicators of factors such as the long-term momentum factor, long-term turnover rate factor, short-term term structure factor, and industry factor of each target futures into the pre-completed clustering model.
[0100] Thus, the model can perform clustering on each indicator to obtain a clustering result. Exemplarily, one of the clustering results can represent that Indicator A, Indicator B, and Indicator C are in one category.
[0101] Based on the clustering results, clustering metrics can be determined. Each clustering metric can also indicate the respective target metrics belonging to the same class. Each clustering metric can also characterize a target factor.
[0102] S106. For each clustering metric, calculate the value of the clustering metric based on the values of the target metrics characterized by the clustering metric.
[0103] Each clustering metric can indicate the respective target metrics belonging to the same class, and each target metric has its own value. Thus, using the values of the target metrics indicated by each clustering metric, the value of the clustering metric can be determined. For example, the average of the values of the target metrics can be calculated to obtain the value of the clustering metric.
[0104] S107. For each designated factor among the various designated factors, based on the value of the metric used to characterize the designated factor, determine the contribution value of the designated factor to the return volatility of the specified futures market within the target historical period, and obtain the contribution value corresponding to the designated factor; wherein, the various designated factors include the respective target factors characterized by the multiple target metrics and the factors characterized by the obtained clustering metrics.
[0105] The designated factor described in this embodiment refers to each factor type. For example, futures A, futures B, and futures C all have a long-term momentum factor, and the long-term momentum factor can be used as a factor type.
[0106] There is a linear relationship between the various designated factors and the return volatility of the futures market. Thus, based on the linear relationship between the various designated factors and the return volatility of the futures market, the contribution value of each designated factor to the return volatility of the specified futures market within the target historical period can be calculated.
[0107] Optionally, the step of "for each designated factor among the various designated factors, based on the value of the metric used to characterize the designated factor, determine the contribution value of the designated factor to the return volatility of the specified futures market within the target historical period, and obtain the contribution value corresponding to the designated factor" includes:
[0108] For each designated factor among the various designated factors, based on the first formula and the value of the metric used to characterize the designated factor, determine the target coefficient of the designated factor for each target futures; wherein, the target coefficient of the designated factor for each target futures represents the degree of contribution of the designated factor to the return volatility of the target futures within the target historical period.
[0109] Based on the target coefficient of the designated factor for each target futures and the second formula, determine the contribution value of the designated factor to the return volatility of the specified futures market within the target historical period, and obtain the contribution value corresponding to the designated factor.
[0110] Among them, the first formula includes:
[0111] R i = F i,j r j + ε i ;
[0112] R i is a vector representing the return volatility of each target futures in the target historical period, and each element in the vector represents the return volatility of the target futures indicated by the element; F i,j is a matrix of the values of the indicators of the specified factors of each target futures, where i represents futures and j represents specified factors, and each element in F i,j represents the value of the indicator of the specified factor of the target futures indicated by the element, r j is a vector representing the target coefficients of each specified factor, and each element in r j represents the target coefficient of the specified factor indicated by the element, ε i is a vector of the error terms preset for the target futures, and each element in ε i represents the error term preset for the target futures indicated by the element.
[0113] The second formula includes:
[0114] Rf j = r j ⊙ (W 1,i F i,j );
[0115] Rf j is a vector representing the contribution value of each specified factor to the return volatility of the specified futures market in the target historical period, and each element in Rf j is the contribution value of the specified factor indicated by the element, W 1,i is a vector representing the preset weight values of the specified futures market for each target futures, and each element in W 1,i is the preset weight value of the target futures indicated by the element. In this application, for the convenience of calculation, the values of the indicators of each specified factor can be used to construct a factor matrix f t,i,j ; in f t,i,j , t refers to the target historical period, i represents futures, and j represents factor types. It should be emphasized that the long-term momentum factor, short-term momentum factor, and medium-term momentum factor belong to three categories respectively. Similarly, the term structure factor, turnover rate factor, turnover rate convolution factor, and volatility factor can also be divided into long-term, short-term, and medium-term categories.
[0116] Among them, the ⊙ symbol refers to the Hadamard product, and the Hadamard product calculation is such that the corresponding elements between two vectors are multiplied to obtain a new vector.
[0117] To unify the dimension, the values of the indicators of the specified factor can be standardized, that is, each column in the factor matrix f t,i,j is standardized. The standardization process includes:
[0118]
[0119] Among them, the F t,i,j is the factor matrix after standardization. is the mean value of factor j of futures i in the specified time period; is the standard deviation of factor j of futures i in the specified time period. The specified time period can be the target historical period or other time periods with the end time of the target historical period as the end time. The F t,i,j is the same as F i,j .
[0120] For the first formula, where R i , F i,j and ε i are known quantities, r j can be calculated by the least squares method.
[0121] For the second formula, using the calculated r j , Rf j can be calculated.
[0122] Each element in the calculated Rf j is the contribution value of a specified factor. Exemplarily, the specified factor indicated by Rf1 is the long-term momentum factor, with a value of 3%; the specified factor indicated by Rf5 is the short-term turnover rate factor, with a value of -5%.
[0123] In addition, the risk compensation of the specified futures market can be obtained according to the following formula:
[0124] RM t = W 1,i F i,j r j + W 1,i ε i .
[0125] Among them, RM t is the risk compensation of the specified futures market.
[0126] S108. Output the task execution result based on the contribution value corresponding to each specified factor. The task execution result is a candidate factor that affects the profit fluctuation of the specified futures market during the target historical period.
[0127] Based on the contribution value corresponding to each calculated specified factor, the task execution result can be output. The task execution result is the determined candidate factor that affects the profit fluctuation of the specified futures market during the target historical period.
[0128] Specifically, to output the task execution result, the candidate factors that affect the profit fluctuation of the specified futures market during the target historical period and the contribution values of the candidate factors can be displayed on a specified page for the user to refer to. Alternatively, the user can obtain the contribution value corresponding to each calculated specified factor for further analysis.
[0129] The present application does not limit the specific implementation manner of outputting the task execution result.
[0130] The solution of the present application can provide a configuration interface for the user to configure the task information of the target attribution task. After obtaining the task information of the target attribution task configured by the user, based on the task information, the target description data of each target futures in the specified futures market during the target time period can be obtained from the access address of the specified futures market. The values of multiple target indicators are determined based on the obtained target description data of each target futures, and the determined multiple target indicators are clustered to obtain clustering indicators, thereby increasing the dimension of the factors. Based on the values of the indicators of each determined specified factor, the contribution value of each specified factor to the profit fluctuation of the specified futures market during the target historical period is determined. Thus, based on the contribution value corresponding to each specified factor, a candidate factor that affects the profit fluctuation of the specified futures market during the target historical period is output. It can be seen that the solution of the present application can effectively improve the efficiency of the specified attribution task and perform the analysis of the attribution task based on factors of multiple dimensions. Therefore, the present application can take into account improving the execution efficiency of the attribution task and avoiding the limitations caused by each target factor being a single dimension.
[0131] Figure 2 It is a schematic flowchart of another task processing method provided by the present application. As Figure 2 shown, before determining the contribution value of each specified factor in each of the specified factors to the profit fluctuation of the specified futures market during the target historical period and obtaining the contribution value corresponding to the specified factor, the method further includes:
[0132] S109. Obtain the associated relationship data of each target futures.
[0133] Figure 2 The content of S101 - S108 is the same as that of the above - mentioned embodiment, and will not be elaborated here.
[0134] The associated - relationship data can be pre - determined. For example, if two futures belong to the same industry, the associated relationship is relatively strong, and a quantitative associated - relationship value can be determined between any two futures.
[0135] Exemplarily, the associated - relationship data can be a graph representing the associated relationships between various target futures. Each vertex in the graph represents a futures, and the edge between vertices represents the associated relationship.
[0136] S110, construct a futures relationship matrix based on the associated - relationship data of each target futures; wherein, in the futures relationship matrix, each element is used to represent the correlation degree between any two target futures;
[0137] Exemplarily, the futures relationship matrix is G ij , where i and j respectively represent futures, and any element of G ij represents the correlation degree between two futures. For example, if G ab = 1, it means that the correlation degree between futures a and futures b is 1.
[0138] S111, construct a target filter using the futures relationship matrix;
[0139] The step of constructing a target filter using the futures relationship matrix includes:
[0140] Construct a graph convolutional kernel using a predetermined formula as the target filter; where the predetermined formula includes:
[0141]
[0142] where Y xx is the graph convolutional kernel, G xy is the futures relationship matrix, and each element in G xy is used to represent the correlation degree between the two futures indicated by this element. I is a preset identity matrix, is obtained by self - loop enhancement of G xy , and is the degree matrix.
[0143] Exemplarily, if there are n varieties in total, G xy is an n×n matrix.
[0144] is G after self - loop enhancement xy , specifically for Gxy Add the identity matrix I to connect each node to itself.
[0145] Let \(D\) be the degree matrix, where the degree represents the number of edges directly connected to the node, i.e., the number of edges directly connected to the node.
[0146] The calculation method of the degree matrix is: for each row element of \(A\), sum them to get the degree of each node.
[0147] For example, for the above the degrees of each node are: Node 1: 1 + 1 = 2, Node 2: 1 + 1 + 1 = 3, Node 3: 1 + 1 = 2. The degree matrix is to arrange the degrees diagonally as a matrix, and the non - diagonal elements are 0, so finally we get:
[0148] We can use the calculated and to construct the graph convolution kernel \(Y\) xx .
[0149] S112, using the target filter, filter the values of each target index to perform noise reduction processing on each target index, and use the remaining indices after noise reduction processing as each auxiliary index;
[0150] Correspondingly, each specified factor also includes the factor represented by each auxiliary index.
[0151] When performing the noise reduction operation, we can multiply the factor matrix \(f\) t,i,j constructed by using each target index with \(Y\) xx to obtain the noise - reduced factor matrix. Each element in the noise - reduced factor matrix is the value of the target factor of the specified futures indicated by this element after noise reduction. The factor value of the factor represented by each auxiliary index is the value of this auxiliary index.
[0152] The obtained convolution kernel can suppress high - frequency noise, smooth the values of each target index in the factor matrix, and make the values of the target indices of futures with strong correlation approach.
[0153] The value of each element in the noise - reduced factor matrix can be used as the value of the auxiliary index.
[0154] The type of the factor corresponding to each index after noise reduction is different from the type of the factor corresponding to each index before noise reduction. For example, if an index represents the long - term momentum factor of futures A, the auxiliary index obtained after noise reduction of this index can be used as the long - term momentum convolution factor of futures A.
[0155] Thus, each of the target metrics includes each of the auxiliary metrics. As a result, the dimension of the category of factors analyzed during the attribution task is richer. When executing S107, the factor matrix used is constructed using each of the target metrics that includes each of the auxiliary metrics.
[0156] Optionally, the clustering process on the multiple target metrics to obtain multiple clustering metrics includes:
[0157] Input the vector features corresponding to the multiple target metrics into a pre-trained clustering model to obtain a clustering result; wherein, the clustering model is used to map each received input data to a specified projection space, and the difference in the positions of the input data mapped to the specified projection space represents the category difference between the input data; wherein, the vector feature corresponding to each target metric is composed of the vectorized content of the target metric and the vectorized content of the value of the target metric.
[0158] Based on the clustering result, determine multiple clustering metrics.
[0159] Figure 3 This is a schematic diagram of a model structure of the clustering model provided by this application. As Figure 3 shown, the clustering model includes an encoder, a generator, and a discriminator.
[0160] Next, introduce the training method of the clustering model:
[0161] The training method of the clustering model includes:
[0162] Step A1, obtain the vector features corresponding to multiple true metrics, and input the vector features corresponding to the multiple true metrics into the discriminator, so that the discriminator learns the vector features of the multiple true metrics to determine whether the metric corresponding to the input vector feature is a true metric; each true metric is used to represent a target factor of a sample futures contract, and the vector feature corresponding to each true metric is composed of the vectorized content of the true metric and the vectorized content of the value of the true metric.
[0163] The target factor of the sample futures contract can be calculated using the futures data of historical time, and the calculation method is the same as that in the above embodiments, so it will not be elaborated here.
[0164] Step A2: Based on the vector features corresponding to multiple real indicators, construct vector features to obtain sample vector features, and trigger the generator to use the sample vector features to generate vector features corresponding to multiple simulated indicators, where each simulated indicator is used to represent any target factor of any simulated futures; and input the generated vector features corresponding to the simulated indicators into the discriminator to determine whether the simulated indicators with the received vector features are real indicators through the discriminator.
[0165] The construction of vector features based on the vector features corresponding to multiple real indicators can specifically be to splice the vector features corresponding to multiple real indicators to obtain sample vector features. The sample vector features can be used as the input of the generator.
[0166] The generator can sample the sample vector features to generate vector features corresponding to multiple simulated indicators respectively.
[0167] Step A3: Based on the discrimination results of the discriminator on the simulated indicators corresponding to the received vector features, determine the first loss value of the generator.
[0168] The first loss value can be calculated according to a preset first loss function.
[0169] The first loss function can be: L(G(z),x)=||G(z)-x||1+λ||z n ;
[0170] where L(G(z),x) represents the loss value, G(z) is the sample vector feature, x is the vector feature of the simulated indicator output by the generator, z n is the vector feature noise component of the generated simulated indicator, and λ is the regularization coefficient.
[0171] Step A4: Adjust the parameters of the generator based on the first loss value, and return to execute the step of triggering the generator to use the sample vector features to generate vector features corresponding to multiple simulated indicators respectively until the generator converges.
[0172] The determination condition for the generator to converge can be that the first loss value is less than a specified value.
[0173] Step A5: Use the trained generator to generate vector features corresponding to multiple target simulation metrics, and input the generated vector features corresponding to multiple target simulation metrics into the encoder; wherein, each target simulation metric has a class label; and, the encoder is used to map each input data to a specified projection space; the difference in the positions of each input data mapped to the specified projection space represents the class difference between each input data.
[0174] Step A6: Determine the second loss value of the encoder based on the clustering result of each target simulation metric by the encoder and the class label of each target simulation metric.
[0175] The first loss value can be calculated according to a preset second loss function.
[0176] Step A7: Adjust the encoder based on the second loss value, and return to execute the step of using the trained generator to generate vector features corresponding to multiple target simulation metrics until the encoder converges.
[0177] The determination condition for the convergence of the generator can be that the first loss value is less than a specified value.
[0178] Through the solution of this embodiment, effective clustering processing can be performed on multiple target metrics to obtain multiple clustering metrics, so that when performing attribution task analysis, each clustering metric can be analyzed, effectively enriching the dimension of the factors targeted in the attribution task analysis.
[0179] Next, a specific example is used to introduce the task processing method of the present application, as Figure 4 shown, the task processing method may include:
[0180] S401: Collect futures market data;
[0181] S401 corresponds to the above S101 - S103. Details are not elaborated here.
[0182] S402: Construct industry factors, construct style factors, and construct clustering factors;
[0183] S402 corresponds to the above S104 - S105. Details are not elaborated here. When constructing the clustering factors, the clustering model used can be the ClusterGAN model.
[0184] S403: Risk compensation decomposition;
[0185] Risk compensation refers to the income fluctuation. Risk compensation decomposition is to find out the factors that affect the income fluctuation.
[0186] S404. Calculate the returns of each factor;
[0187] S403 - S404 corresponds to S106 - S107 above.
[0188] S405. The display device displays.
[0189] S405 corresponds to S108 above.
[0190] The solution of this embodiment constructs industry factors and style factors, and uses a knowledge graph and a ClusterGAN model to construct clustering factors, expressing the sources of risk compensation in the futures market from multiple perspectives through factors. Finally, the risk compensation in the futures market is decomposed into a combined form of the risk compensations of each factor, so as to better represent the sources of risk compensation.
[0191] Corresponding to the above task processing method, this application provides a task processing method. Figure 5 It is a schematic structural diagram of a task processing device provided by an embodiment of this application; the device is applied to a task processing platform, and the device includes:
[0192] A display module 501, configured to display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task.
[0193] A first acquisition module 502, configured to acquire task information of the target attribution task configured by a user based on the task configuration interface; wherein, the task information includes a market identifier of a specified futures market to be analyzed for the task and a target historical period.
[0194] A first determination module 503, configured to determine an access address of the specified futures market with the market identifier, and access the access address to obtain target description data of each target futures in the specified futures market within a target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period.
[0195] A second determination module 504, configured to determine the values of a plurality of target indicators based on the acquired target description data; wherein, each target indicator is used to characterize a target factor of a target futures, the target futures characterized by the plurality of target indicators include the respective target futures, and the types of target factors characterized by the plurality of target indicators are multiple, and the value of each target indicator is the factor value of the target factor of the target futures characterized by the target indicator.
[0196] The clustering module 505 is used to perform clustering processing on the multiple target metrics to obtain multiple clustering metrics; wherein, the clustering processing is used to divide the target metrics that meet the specified conditions into one category, and the specified conditions include that the futures represented belong to the same category, and each clustering metric is used to represent the target metrics divided into the same category;
[0197] The calculation module 506 is used to calculate the value of each clustering metric based on the value of the target metric represented by the clustering metric for each clustering metric;
[0198] The third determination module 507 is used to determine the contribution value of each specified factor in each of the specified factors to the return volatility of the specified futures market during the target historical period based on the value of the metric used to represent the specified factor, and obtain the contribution value corresponding to the specified factor; wherein, the specified factors include each target factor represented by the multiple target metrics and the factors represented by the obtained clustering metrics;
[0199] The output module 508 is used to output the task execution result based on the contribution value corresponding to each specified factor; wherein, the task execution result is the candidate factor that affects the return volatility of the specified futures market during the target historical period.
[0200] The solution of the present application can provide a configuration interface for the user to configure the task information of the target attribution task. After obtaining the task information of the target attribution task configured by the user, based on the task information, from the access address of the specified futures market, obtain the target description data of each target futures in the target time period, determine the values of multiple target metrics based on the obtained target description data of each target futures, and perform clustering processing on the determined multiple target metrics to obtain clustering metrics, thereby increasing the dimension of the factors; determine the contribution value of each specified factor to the return volatility of the specified futures market during the target historical period based on the value of the metric of each determined specified factor, and thereby output the candidate factor that affects the return volatility of the specified futures market during the target historical period based on the contribution value corresponding to each specified factor. It can be seen that the solution of the present application can effectively improve the efficiency of the specified attribution task, and perform the analysis of the attribution task based on factors in multiple dimensions, so that the present application can take into account improving the execution efficiency of the attribution task and avoiding the limitations caused by each target factor being a single dimension.
[0201] Optionally, the clustering module includes:
[0202] An input unit for inputting the vector features corresponding to the multiple target metrics into a pre-trained clustering model respectively to obtain a clustering result; wherein, the clustering model is used to map each received input data to a specified projection space, and the difference in the positions of the input data mapped to the specified projection space represents the class difference between the input data; wherein, the vector feature corresponding to each target metric is composed of the vectorized content of the target metric and the vectorized content of the value of the target metric.
[0203] A determination unit for determining a plurality of clustering metrics based on the clustering result.
[0204] Optionally, the device further includes:
[0205] A second acquisition module for acquiring the correlation relationship data of each target futures contract.
[0206] A first construction module for constructing a futures relationship matrix based on the correlation relationship data of each target futures contract; wherein, in the futures relationship matrix, each element is used to represent the correlation degree between any two target futures contracts.
[0207] A second construction module for constructing a target filter using the futures relationship matrix.
[0208] A filtering module for filtering the values of each target metric using the target filter to perform noise reduction processing on each target metric, and taking the remaining metrics after the noise reduction processing as each auxiliary metric.
[0209] Correspondingly, each specified factor further includes the factor represented by each auxiliary metric.
[0210] Optionally, the second construction module includes:
[0211] A construction unit for constructing a graph convolutional kernel as the target filter using a predetermined formula; wherein, the predetermined formula includes:
[0212]
[0213] wherein, Y xx is the graph convolutional kernel, G xy is the futures relationship matrix, and each element in G xy is used to represent the correlation degree between the two futures indicated by the element, I is a preset identity matrix, is obtained by self-loop enhancement of G xy and is the degree matrix.
[0214] Optionally, the clustering model includes an encoder, a generator, and a discriminator; the training method of the clustering model includes:
[0215] Obtain the vector features corresponding to multiple true indicators, and input the vector features corresponding to the multiple true indicators into the discriminator, so that the discriminator learns the vector features of the multiple true indicators to determine whether the indicator corresponding to the input vector feature is a true indicator; each true indicator is used to represent a target factor of a sample futures, and the vector feature corresponding to each true indicator is composed of the vectorized content of the true indicator and the vectorized content of the value of the true indicator;
[0216] Based on the vector features corresponding to multiple true indicators respectively, construct vector features to obtain sample vector features, trigger the generator to use the sample vector features to generate vector features corresponding to multiple simulated indicators respectively, and each simulated indicator is used to represent any target factor of any simulated futures; and input the vector features corresponding to the generated simulated indicators into the discriminator to determine whether the simulated indicators with the received vector features are true indicators through the discriminator;
[0217] Based on the discrimination results of the discriminator on the simulated indicators corresponding to the received vector features, determine the first loss value of the generator;
[0218] Based on the first loss value, adjust the parameters of the generator, and return to execute the step of triggering the generator to use the sample vector features to generate vector features corresponding to multiple simulated indicators respectively until the generator converges;
[0219] Use the trained generator to generate vector features corresponding to multiple target simulated indicators respectively, and input the vector features corresponding to the generated multiple target simulated indicators into the encoder; wherein, each target simulated indicator has a class label; and the encoder is used to map each input data to a specified projection space; the difference in the positions of the mapped input data in the specified projection space represents the class difference between the input data;
[0220] Based on the clustering results of the encoder for each target simulated indicator and the class labels of each target simulated indicator, determine the second loss value of the encoder;
[0221] Based on the second loss value, adjust the encoder, and return to execute the step of using the trained generator to generate vector features corresponding to multiple target simulated indicators respectively until the encoder converges.
[0222] Optionally, the third determination module includes:
[0223] The first determination unit is configured to determine, for each specified factor among the various specified factors, a target coefficient of the specified factor with respect to each target futures based on a first formula and the value of an index representing the specified factor; wherein, the target coefficient of the specified factor with respect to each target futures represents: the contribution degree of the specified factor to the return fluctuation of the target futures during the target historical period;
[0224] The second determination unit is configured to determine, based on the target coefficient of the specified factor with respect to each target futures and a second formula, the contribution value of the specified factor to the return fluctuation of the specified futures market during the target historical period, and obtain the contribution value corresponding to the specified factor;
[0225] Wherein, the first formula includes:
[0226] R i =F i,j r j +ε i ;
[0227] R i is a vector representing the return fluctuations of each target futures during the target historical period, and each element in the vector represents the return fluctuation of the target futures indicated by the element; F i,j is a matrix representing the values of the indicators of the specified factors of each target futures, where i represents futures and j represents specified factors, and each element in F i,j represents the value of the indicator of the specified factor of the target futures indicated by the element, r j is a vector representing the target coefficients of each specified factor, and each element in r j represents the target coefficient of the specified factor indicated by the element, ε i is a vector of error terms preset for the target futures, and each element in ε i represents the error term preset for the target futures indicated by the element;
[0228] The second formula includes:
[0229] Rf j =r j ⊙(W 1,i F i,i );
[0230] Rf j is a vector representing the contribution values of each specified factor to the return fluctuation of the specified futures market during the target historical period, and each element in Rf j is the contribution value of the specified factor indicated by the element, W 1,i is a vector representing the preset weight values of the specified futures market for each target futures, and W 1,iEach element therein is a preset weight value of the target futures indicated by the element.
[0231] The embodiment of the present application also provides an electronic device, as Figure 6 shown, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604. Among them, the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
[0232] The memory 603 is used to store a computer program;
[0233] When the processor 601 is used to execute the program stored on the memory 603, the task processing method described in any one of the above is implemented.
[0234] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0235] The communication interface is used for communication between the above electronic device and other devices.
[0236] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0237] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0238] In another embodiment provided by the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above task processing methods are implemented.
[0239] In another embodiment provided by the present application, a computer program product including instructions is further provided. When it runs on a computer, the computer is caused to execute any of the task processing methods in the above embodiments.
[0240] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
[0241] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0242] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are emphasized.
[0243] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A task processing method, characterized in that, Applied to a task processing platform, the method includes: Display a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task; Obtain the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed for the task and the target historical period; Determine the access address of the specified futures market with the market identifier, and access the access address to obtain the target description data of each target futures in the specified futures market within the target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period; Based on the obtained target description data, determine the values of multiple target indicators; wherein, each target indicator is used to represent a target factor of a target futures, the target futures represented by the multiple target indicators include all of the target futures, and the types of target factors represented by the multiple target indicators are multiple, and the value of each target indicator is the factor value of the target factor of the target futures represented by the target indicator; Perform clustering processing on the multiple target indicators to obtain multiple clustering indicators; wherein, the clustering processing is used to divide the target indicators that meet the specified conditions into one category, the specified conditions include that the represented futures belong to the same category, and each clustering indicator is used to represent the target indicators divided into the same category; For each clustering indicator, calculate the value of the clustering indicator based on the values of the target indicators represented by the clustering indicator; For each specified factor among the various specified factors, based on the value of the indicator used to represent the specified factor, determine the contribution value of the specified factor to the profit fluctuation of the specified futures market within the target historical period, and obtain the contribution value corresponding to the specified factor; wherein, the various specified factors include all of the target factors represented by the multiple target indicators and the factors represented by the obtained clustering indicators; Based on the contribution value corresponding to each specified factor, output a task execution result; wherein, the task execution result is a candidate factor that affects the profit fluctuation of the specified futures market within the target historical period.
2. The method according to claim 1, wherein The performing clustering processing on the multiple target indicators to obtain multiple clustering indicators includes: Input the vector features respectively corresponding to the multiple target indicators into a pre-trained clustering model to obtain a clustering result; wherein, the clustering model is used to map each received input data to a specified projection space, and the difference in the positions of the input data mapped to the specified projection space represents the category difference between the input data; wherein, the vector feature corresponding to each target indicator is composed of the vectorized content of the target indicator and the vectorized content of the value of the target indicator; Based on the clustering result, determine multiple clustering indicators.
3. The method according to claim 1, characterized in that, Before determining, for each specified factor among the various specified factors, the contribution value of the specified factor to the return volatility of the specified futures market within the target historical period based on the value of the indicator used to characterize the specified factor and obtaining the contribution value corresponding to the specified factor, the method further includes: Obtain the correlation relationship data of each target futures; Based on the correlation relationship data of each target futures, construct a futures relationship matrix; wherein, in the futures relationship matrix, each element is used to characterize the correlation degree between any two target futures; Use the futures relationship matrix to construct a target filter; Use the target filter to filter the values of each target indicator to perform noise reduction processing on each target indicator, and use the remaining indicators after the noise reduction processing as each auxiliary indicator; Correspondingly, each specified factor further includes the factor characterized by each auxiliary indicator.
4. The method according to claim 3, characterized in that The using the futures relationship matrix to construct a target filter includes: Use a predetermined formula to construct a graph convolutional kernel as the target filter; wherein, the predetermined formula includes: Among them, Y xx is the graph convolution kernel, G xy is the futures relationship matrix, and each element in G xy is used to represent the correlation degree between the two futures indicated by this element. I is the preset identity matrix, is obtained by enhancing the self-loop of G xy , and is the degree matrix.
5. The method according to claim 1 or 2, characterized in that, The clustering model includes an encoder, a generator, and a discriminator; the training method of the clustering model includes: Obtain the vector features corresponding to each of a plurality of true indicators, and input the vector features corresponding to each of the plurality of true indicators into the discriminator, so that the discriminator learns the vector features of the plurality of true indicators to determine whether the indicator corresponding to the input vector feature is a true indicator; each true indicator is used to characterize a target factor of a sample futures, and the vector feature corresponding to each true indicator is composed of the vectorized content of the true indicator and the vectorized content of the value of the true indicator; Based on the vector features corresponding to each of the plurality of true indicators, perform vector feature construction to obtain sample vector features, trigger the generator to use the sample vector features to generate the vector features corresponding to each of a plurality of simulated indicators, and each simulated indicator is used to characterize any target factor of any simulated futures; and input the vector features corresponding to the generated simulated indicators into the discriminator to determine whether the simulated indicators with the received vector features are true indicators through the discriminator; Based on the discrimination results of the discriminator on the simulated indicators corresponding to the received vector features, determine the first loss value of the generator; Based on the first loss value, adjust the parameters of the generator, and return to execute the step of triggering the generator to use the sample vector features to generate the vector features corresponding to each of a plurality of simulated indicators until the generator converges; Use the trained generator to generate the vector features corresponding to each of a plurality of target simulated indicators, and input the vector features corresponding to each of the generated plurality of target simulated indicators into the encoder; wherein, each target simulated indicator has a class label; and, the encoder is used to map each input data to a specified projection space; the difference in the positions of each input data mapped to the specified projection space characterizes the class difference between each input data; Determine a second loss value of the encoder based on the clustering results of each target simulation metric by the encoder and the class labels of each target simulation metric. Adjust the encoder based on the second loss value, and return to execute the step of using the trained generator to generate vector features corresponding to each of the multiple target simulation metrics until the encoder converges.
6. The method according to any one of claims 1-5, characterized in that For each of the specified factors, based on the value of the metric used to characterize the specified factor, determine the contribution value of the specified factor to the return volatility of the specified futures market during the target historical period, and obtain the contribution value corresponding to the specified factor, including: For each of the specified factors, based on the first formula and the value of the metric used to characterize the specified factor, determine the target coefficient of the specified factor for each target futures; wherein, the target coefficient of the specified factor for each target futures represents: the contribution degree of the specified factor to the return volatility of the target futures during the target historical period. Based on the target coefficient of the specified factor for each target futures and the second formula, determine the contribution value of the specified factor to the return volatility of the specified futures market during the target historical period, and obtain the contribution value corresponding to the specified factor. Wherein, the first formula includes: R i = F i,j r j + ε i ; R i is a vector representing the return volatility of each target futures during the target historical period, and each element in the vector represents the return volatility of the target futures indicated by this element; F i,j is a matrix representing the values of the indicators of the specified factors of each target futures, where i represents the futures and j represents the specified factor, and each element in F i,j represents the value of the indicator of the specified factor of the target futures indicated by this element, r j is a vector representing the target coefficients of each specified factor, and each element in r j represents the target coefficient of the specified factor indicated by this element, ε i is a vector of the error terms preset for the target futures, and each element in ε i represents the error term preset for the target futures indicated by this element; The second formula includes: Rf j = r j ⊙ (W 1,i F i,j ) ; Rf j is a vector representing the contribution value of each specified factor to the return volatility of the specified futures market within the target historical period, Rf j Each element in it is the contribution value of the specified factor indicated by this element, W 1,i is a vector representing the preset weight value of the specified futures market for each target futures, W 1,i Each element in it is the preset weight value of the target futures indicated by this element.
7. A task processing device, characterized in that, Applied to a task processing platform, the device includes: A display module for displaying a task configuration interface; wherein, the task configuration interface is a configuration interface for a target attribution task. A first acquisition module for acquiring the task information of the target attribution task configured by the user based on the task configuration interface; wherein, the task information includes the market identifier of the specified futures market to be analyzed and the target historical period. A first determination module for determining the access address of the specified futures market with the market identifier, accessing the access address to obtain the target description data of each target futures in the specified futures market during the target time period; wherein, the end time of the target time period is the end time of the target historical period, and the start time is earlier than the start time of the target historical period. A second determination module for determining the values of multiple target metrics based on the obtained target description data; wherein, each target metric is used to characterize a target factor of a target futures, the target futures characterized by the multiple target metrics include the respective target futures, and the types of target factors characterized by the multiple target metrics are multiple, and the value of each target metric is the factor value of the target factor of the target futures characterized by the target metric. A clustering module for performing clustering processing on the multiple target metrics to obtain multiple clustering metrics; wherein, the clustering processing is used to divide the target metrics that meet the specified conditions into one category, the specified conditions include that the characterized futures belong to the same category, and each clustering metric is used to characterize the target metrics divided into the same category. A calculation module for calculating the value of each clustering metric based on the value of the target metric characterized by the clustering metric. A third determination module, configured to, for each specified factor among the various specified factors, determine a contribution value of the specified factor to the return volatility of the specified futures market within the target historical period based on the value of the index used to characterize the specified factor, and obtain the contribution value corresponding to the specified factor; wherein the various specified factors include the various target factors characterized by the multiple target indexes and the factors characterized by the obtained clustering indexes; An output module, configured to output a task execution result based on the contribution value corresponding to each specified factor; wherein the task execution result is a candidate factor that affects the return volatility of the specified futures market within the target historical period.
8. The device according to claim 7, characterized in that, The clustering module includes: An input unit, configured to input the vector features respectively corresponding to the multiple target indexes into a pre-trained clustering model to obtain a clustering result; wherein the clustering model is configured to map each received input data to a specified projection space, and the difference in the positions of the various input data mapped to the specified projection space characterizes the class difference between the various input data; wherein the vector feature corresponding to each target index is composed of the vectorized content of the target index and the vectorized content of the value of the target index; A determination unit, configured to determine multiple clustering indexes based on the clustering result.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is configured to store a computer program; The processor is configured to implement the method according to any one of claims 1-6 when executing the program stored on the memory.
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 the processor, the method according to any one of claims 1-6 is implemented.