Resource allocation method and device, electronic equipment and storage medium
By determining the sub-resource group of the stationary sequence in the pairing trading strategy and performing resource allocation operations based on the current average daily value difference and confidence interval, the interference problem of value difference changes caused by changes in pairing resource operation is solved, and the accuracy of resource allocation is improved.
Patent Information
- Application Number
- CN202411566630.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-11
Smart Images

Figure CN119599790A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a resource allocation method, device, electronic device and storage medium. Background Art
[0002] The pair trading strategy is a market neutral strategy. Specifically, it means finding resources with similar historical value trends in the market and pairing them. When the value difference of the paired resources deviates from the historical mean, the two resources are restored to a long-term equilibrium relationship through resource allocation.
[0003] The pair trading strategy assumes that the competition between paired resources will never change and that paired resources will always develop synchronously. However, the change in value difference is not necessarily due to abnormal value fluctuations, but may also be due to changes in the relative operating conditions between paired resources. This value change, which does not affect actual returns, will interfere with resource allocation.
[0004] Therefore, how to improve the accuracy of resource allocation has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a resource allocation method, device, electronic device and storage medium, aiming to improve the accuracy of resource allocation.
[0006] To achieve the above object, a first aspect of an embodiment of the present application proposes a resource allocation method, the resource allocation method comprising:
[0007] Determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group, the daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer;
[0008] Obtain the current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is the difference between the current average daily value of the first sub-resource group and the current average daily value of the second sub-resource group;
[0009] Get the confidence interval of the target resource group;
[0010] According to the comparison result of the current daily average value difference and the confidence interval, a resource allocation operation is performed on the target resource group.
[0011] In some embodiments, determining the first sub-resource group and the second sub-resource group corresponding to the target resource group includes:
[0012] Grouping the resources in the target resource group evenly to obtain a first group and a second group;
[0013] Determine the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value;
[0014] When the second sequence corresponding to the target resource group is a stable sequence, the first group is determined as the first sub-resource group, and the second group is determined as the second sub-resource group; the second sequence includes the daily average values of the first group and the second group in the historical resource allocation cycle.
[0015] In some embodiments, after determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, determining the first group as the first sub-resource group and before determining the second group as the second sub-resource group, the resource allocation method includes:
[0016] Determine whether the difference between the daily average value of the first group and the second group satisfies mean reversion during the historical resource allocation cycle;
[0017] When the difference satisfies mean regression, it is determined that the daily average values of the first group and the second group in the historical resource allocation cycle are stationary sequences.
[0018] In some embodiments, after determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, determining the first group as the first sub-resource group and before determining the second group as the second sub-resource group, the resource allocation method includes:
[0019] When the difference does not satisfy mean reversion, the weight parameter is adjusted, and the average daily value of the first group and the average daily value of the second group are determined according to the adjusted weight parameter until the difference between the average daily value of the first group and the second group satisfies mean reversion.
[0020] In some embodiments, after determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, and before determining the first group as the first sub-resource group and determining the second group as the second sub-resource group, the resource allocation method includes:
[0021] In the case that the difference does not satisfy mean reversion, the resources in the target resource group are regrouped, and the adjusted daily average values of the first group and the second group are determined until the difference between the daily average values of the first group and the second group satisfies mean reversion.
[0022] In some embodiments, before determining the first sub-resource group and the second sub-resource group corresponding to the target resource group, the resource allocation method further includes:
[0023] Acquire initial characteristic data of resources in the resource pool; the initial characteristic data includes at least one of the following: net profit rate data, operating income data, and market share data;
[0024] Regularize the initial feature data to obtain the target feature data;
[0025] The stocks are grouped according to the target characteristic data to obtain multiple target resource groups.
[0026] In some embodiments, when the daily average value of the first sub-resource group is greater than the daily average value of the second sub-resource group, performing the resource allocation operation on the target resource group according to the comparison result of the current daily average value difference and the confidence interval includes:
[0027] When the current daily average value difference is greater than the first target value, the holding rate of the resources of the first resource group is reduced, and the holding rate of the resources of the second resource group is increased;
[0028] When the current daily average value difference is less than the second target value, the holding rate of the resources of the first resource group is increased, and the holding rate of the resources of the second resource group is reduced;
[0029] The first target value and the second target value are determined based on the confidence interval, the first target value is the maximum value of the confidence interval, and the second target value is the minimum value of the confidence interval.
[0030] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a resource allocation device, the resource allocation device comprising:
[0031] A determination module, used to determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in a historical resource allocation cycle, the daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group, the daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer;
[0032] A first acquisition module is used to acquire the current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is the difference between the current average daily value of the first sub-resource group and the current average daily value of the second sub-resource group;
[0033] A second acquisition module is used to obtain a confidence interval of a target resource group;
[0034] The execution module is used to execute the resource allocation operation on the target resource group according to the comparison result of the current daily average value difference and the confidence interval.
[0035] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0036] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0037] The resource allocation method, device, electronic device and storage medium proposed in the present application determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the daily average values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group, the daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is characterized by the price-to-sales ratio of the resource on the i-th resource allocation day, i is a positive integer; obtain the current daily average value difference between the first sub-resource group and the second sub-resource group; the current daily average value difference is the difference between the current daily average value of the first sub-resource group and the current daily average value of the second sub-resource group; obtain the confidence interval of the target resource group; and perform resource allocation operations on the target resource group according to the comparison result of the current daily average value difference and the confidence interval. In this way, by grouping resources and determining the resource allocation operation based on the comparison results of the daily average value difference between the first sub-resource group and the second sub-resource group and the confidence interval, the interference caused by value changes that do not affect the actual benefits to the resource allocation can be eliminated, thereby improving the accuracy of resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is one of the flow charts of the resource allocation method provided in the embodiment of the present application;
[0039] Figure 2 yes Figure 1 One of the flowcharts of step S101 in;
[0040] Figure 3 yes Figure 1Flowchart 2 of step S101 in;
[0041] Figure 4 This is the second flowchart of the resource allocation method provided in the embodiment of the present application;
[0042] Figure 5 is a structural diagram of a resource allocation device provided in an embodiment of the present application;
[0043] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0047] First, some nouns involved in this application are analyzed:
[0048] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0049] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0050] Information Extraction: A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
[0051] Based on this, the embodiments of the present application provide a resource allocation method, device, electronic device and storage medium, aiming to improve the accuracy of resource allocation.
[0052] The resource allocation method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the resource allocation method in the embodiments of the present application is described.
[0053] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0054] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0055] The resource allocation method provided in the embodiment of the present application relates to the field of financial technology. The resource allocation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the resource allocation method, etc., but is not limited to the above forms.
[0056] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0057] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0058] Figure 1 is an optional flowchart of the resource allocation method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S104.
[0059] Step S101, determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the daily average value includes the average daily value of the first sub-resource group and the average daily value of the second sub-resource group, the average daily value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer.
[0060] In an embodiment of the present application, the target resource group can be obtained by grouping the resources in the resource pool. When grouping the resources in the resource pool, the grouping can be performed according to the target characteristic data of the resources. The target characteristic data may include but is not limited to net profit margin data, operating income data, and market share data. In an example, resources with similar net profit margin data, operating income data, and market share data can be divided into a target resource group so that the characteristics of the resources in each resource group are similar.
[0061] In the embodiment of the present application, each target resource group corresponds to a first sub-resource group and a second sub-resource group. When the target resource group is divided into two sub-resource groups, an average grouping method can be adopted to evenly group the resources in the target resource group.
[0062] In an embodiment of the present application, the first sequence can be understood as a sequence including the average daily values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle. The daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group. The daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle can be understood as the average value of the values of each resource in the resource group on the i-th resource allocation day. Therefore, it can be understood that when grouping the target resource groups, it is necessary to satisfy that the daily average values of the first sub-resource group and the second sub-resource group corresponding to the target resource group in the historical resource allocation cycle are a stable sequence.
[0063] In an embodiment of the present application, the value of a resource on the i-th resource allocation day is characterized by the price-to-sales ratio of the resource on the i-th resource allocation day, where i is a positive integer. Among them, the price-to-sales ratio (P / S ratio) can be understood as a financial indicator used to evaluate the value of a company relative to its sales revenue. In one example, the price-to-sales ratio can be determined by the ratio of the company's market value to its annual sales revenue. In another example, the price-to-sales ratio can be determined by the ratio of the share price per share to the sales revenue per share.
[0064] In the embodiment of the present application, when grouping resources, the KNN algorithm can be used for grouping. The K-Nearest Neighbors (KNN) algorithm is a commonly used supervised learning method for classification and regression tasks. By using the KNN algorithm, the accuracy of resource grouping can be improved.
[0065] Step S102, obtaining the current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is the difference between the current average daily value of the first sub-resource group and the current average daily value of the second sub-resource group.
[0066] In an embodiment of the present application, after the target resource group is divided into a first sub-resource group and a second sub-resource group, the current daily average value difference between the first sub-resource group and the second sub-resource group is obtained. The current daily average value difference can be understood as the difference between the current daily average value of the first sub-resource group and the current daily average value of the second sub-resource group. The current daily average value of the first sub-resource group can be understood as the average value of the value of each resource in the first sub-resource group on the current resource allocation day. The current daily average value of the second sub-resource group can be understood as the average value of the value of each resource in the second sub-resource group on the current resource allocation day.
[0067] Step S103: obtaining a confidence interval of the target resource group.
[0068] In the embodiments of the present application, a confidence interval (CI) is a tool used to estimate the range of an unknown parameter (such as a population mean, proportion, etc.). The confidence interval provides an interval estimate within which we have a certain degree of confidence (such as 95% or 99%) that the true parameter value will fall. In one example, a 95% confidence interval means that in multiple samplings, 95% of the confidence intervals calculated from the samples will contain the population parameter.
[0069] In the embodiments of the present application, in, represents the mean, z represents the critical value of the standard normal distribution, σ 2 In general, z is 1.96 at a 95% confidence level.
[0070] In the embodiment of the present application, when determining the confidence interval of the target resource group, the mean of the daily average value difference between the first sub-resource group and the second sub-resource group in the historical resource allocation cycle is first determined. When determining the mean of the daily average value difference, first obtain the difference between the daily average value of the first sub-resource group and the daily average value of the second sub-resource group on each trading day. Then, the average value of the difference corresponding to all trading days in the historical resource allocation cycle is determined as the mean of the daily average value difference.
[0071] In the embodiment of the present application, after determining the mean, it is also necessary to determine the variance of the daily average value difference between the first sub-resource group and the second sub-resource group in the historical resource allocation cycle according to the mean. Finally, the confidence interval of the daily average value difference between the first sub-resource group and the second sub-resource group in the historical resource allocation cycle can be determined according to the mean and the variance.
[0072] Step S104: performing resource allocation operations on the target resource group according to the comparison result of the current daily average value difference and the confidence interval.
[0073] In an embodiment of the present application, after the current average daily value difference and the confidence interval, the allocation operation of the resources of the target resource group can be determined by comparing the relationship between the current average daily value difference and the confidence interval. In one example, when the current average daily value difference is greater than the maximum value of the confidence interval, the holding rate of the resources of the first resource group is reduced, and the holding rate of the resources of the second resource group is increased. In another example, when the current average daily value difference is less than the second target value, the holding rate of the resources of the first resource group is increased, and the holding rate of the resources of the second resource group is reduced.
[0074] Steps S101 to S104 shown in the embodiment of the present application are performed by determining the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the average daily value includes the average daily value of the first sub-resource group and the average daily value of the second sub-resource group, the average daily value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, i is a positive integer; obtain the current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is the difference between the current average daily value of the first sub-resource group and the current average daily value of the second sub-resource group; obtain the confidence interval of the target resource group; and perform resource allocation operations on the target resource group based on the comparison result of the current average daily value difference and the confidence interval. In this way, by grouping resources and determining the resource allocation operation based on the comparison results of the daily average value difference between the first sub-resource group and the second sub-resource group and the confidence interval, the interference caused by value changes that do not affect the actual benefits to the resource allocation can be eliminated, thereby improving the accuracy of resource allocation.
[0075] See also Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S203:
[0076] Step S201, grouping resources in the target resource group evenly to obtain a first group and a second group;
[0077] Step S202, determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value;
[0078] Step S203, when the second sequence corresponding to the target resource group is a stable sequence, the first group is determined as the first sub-resource group, and the second group is determined as the second sub-resource group; the second sequence includes the daily average values of the first group and the second group in the historical resource allocation cycle.
[0079] Specifically, when dividing the resources in the target resource group into the first sub-resource group and the second sub-resource group, the resources in the target resource group are first evenly grouped to obtain the first group and the second group, as long as the number of resources in the first group and the second group are equal.
[0080] In the embodiment of the present application, the daily average value of the first group is the average value of the values of the resources in the first group on the i-th resource allocation day. The daily average value of the second group is the average value of the values of the resources in the first group on the i-th resource allocation day. When determining the daily average value, the initial weight parameter of the daily average value is first obtained, and the daily average value of the first group and the daily average value of the second group are calculated based on the initial weight parameter.
[0081] In the embodiment of the present application, the second sequence can be understood as a sequence including the daily average values of the first group and the second group in the historical resource allocation cycle. In the case where the second sequence corresponding to the target resource group is a stable sequence, the first group can be determined as the first sub-resource group, and the second group can be determined as the second sub-resource group.
[0082] In the embodiment of the present application, if the difference between the daily average values of the first group and the second group satisfies the mean reversion, it can be determined that the second sequence corresponding to the target resource group is a stationary sequence. Mean reversion can be understood as a trend of reverting to the mean with a high probability regardless of whether it is above or below the mean.
[0083] In this embodiment, by determining that the first sub-resource group and the second sub-resource group are a stable sequence when evenly grouping the resources in the target resource group, the accuracy of resource allocation can be improved.
[0084] See also Figure 3 In some embodiments, step S101 may further include steps S301 to S302:
[0085] After step S202 and before step S203, the resource allocation method may further include but is not limited to steps S301 to S302:
[0086] Step S301: determining whether the difference between the daily average values of the first group and the second group in the historical resource allocation cycle satisfies mean reversion;
[0087] Step S302: when the difference satisfies mean regression, it is determined that the daily average values of the first group and the second group in the historical resource allocation period are a stationary sequence.
[0088] Specifically, after determining the daily average value of the first group and the daily average value of the second group, it is necessary to determine whether the daily average value of the first group and the daily average value of the second group are stationary sequences.
[0089] In the embodiment of the present application, whether the daily average value of the first group and the daily average value of the second group are a stationary sequence can be determined by judging whether the difference between the daily average values of the first group and the second group satisfies mean regression. If the difference satisfies mean regression, it can be determined that the daily average values of the first group and the second group in the historical resource allocation cycle are stationary sequences.
[0090] In the embodiment of the present application, the second sequence may be divided into several segments, and the variance of each segment may be calculated. If the variances of the segments are similar, it may be determined that the second sequence is a stationary sequence.
[0091] In this embodiment, by determining whether the difference between the daily average values of the first group and the second group satisfies mean regression, it can be accurately determined that the second sequence is a stationary sequence, thereby improving the accuracy of resource allocation.
[0092] In some embodiments, after determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, determining the first group as the first sub-resource group and before determining the second group as the second sub-resource group, the resource allocation method includes:
[0093] When the difference does not satisfy mean reversion, the weight parameter is adjusted, and the average daily value of the first group and the average daily value of the second group are determined according to the adjusted weight parameter until the difference between the average daily value of the first group and the second group satisfies mean reversion.
[0094] Specifically, before allocating resources, it is necessary to ensure that the second sequence corresponding to the target resource group is a stationary sequence. Therefore, in the historical resource allocation cycle, if the difference between the daily average values of the first group and the second group does not satisfy the mean reversion, the resource value distribution within the first group and the second group is required.
[0095] In an embodiment of the present application, the average daily value of the first group and the average daily value of the second group can be adjusted by adjusting the weight parameter. The average daily value of the first group and the average daily value of the second group are re-determined according to the adjusted weight parameter. And it is determined that the difference between the adjusted average daily values of the first group and the second group in the historical resource allocation cycle satisfies the mean reversion. In the case of a non-stationary sequence, the weight parameter is continuously adjusted until the difference between the average daily values of the first group and the second group satisfies the mean reversion.
[0096] In this embodiment, the accuracy of resource allocation can be improved by continuously adjusting the weight parameter to ensure that the difference between the daily average values of the first group and the second group satisfies mean regression.
[0097] In some embodiments, after determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, determining the first group as the first sub-resource group and before determining the second group as the second sub-resource group, the resource allocation method includes:
[0098] When the difference does not satisfy mean regression, the resources in the target resource group are regrouped, and the adjusted daily average values of the first group and the second group are determined until the difference between the daily average values of the first group and the second group satisfies mean regression.
[0099] Specifically, the average daily value of the first group and the second group can also be adjusted by regrouping. When grouping the resources in the target resource group, only the average grouping is performed, and the characteristics of the resources in each group are not limited. Therefore, the order of the resources in the target resource group can be disrupted, and the average grouping can be regrouped, and the average daily value of the first group and the average daily value of the second group after regrouping can be determined. It is judged that the difference between the average daily values of the first group and the second group after regrouping in the historical resource allocation cycle satisfies the mean reversion. In the case of not being a stationary sequence, the regrouping is continued until the difference between the average daily values of the first group and the second group satisfies the mean reversion.
[0100] In this embodiment, the accuracy of resource allocation can be improved by continuously adjusting and regrouping to ensure that the difference between the daily average values of the first group and the second group meets the mean reversion.
[0101] In some embodiments, before determining the first sub-resource group and the second sub-resource group corresponding to the target resource group, the resource allocation method further includes:
[0102] Acquire initial characteristic data of resources in the resource pool; the initial characteristic data includes at least one of the following: net profit rate data, operating income data, and market share data;
[0103] Regularize the initial feature data to obtain the target feature data;
[0104] The stocks are grouped according to the target characteristic data to obtain multiple target resource groups.
[0105] Specifically, before determining the first sub-resource group and the second sub-resource group corresponding to the target resource group, it is necessary to group the resources in the resource pool to obtain a plurality of target resource groups.
[0106] In the embodiment of the present application, the initial feature data of each resource in the resource pool is first obtained, and the initial feature data may include but is not limited to net profit rate data, operating income data, financial leverage data, market share data, industry attribution data, etc. Then, the initial feature data is regularized, and the accuracy of the feature data can be improved through regularization.
[0107] In an embodiment of the present application, the target resource group can be obtained by grouping the resources in the resource pool. When grouping the resources in the resource pool, the grouping can be performed according to the target characteristic data of the resources. In one example, resources with similar net profit margin data, operating income data, and market share data can be divided into a target resource group so that the characteristics of the resources in each resource group are similar.
[0108] In this embodiment, by grouping resources according to target characteristic data, the similarity of each group of data can be improved, thereby improving the accuracy of the resource allocation operation.
[0109] In some embodiments, when the daily average value of the first sub-resource group is greater than the daily average value of the second sub-resource group, performing a resource allocation operation on the target resource group according to a comparison result of the current daily average value difference and the confidence interval includes:
[0110] When the current daily average value difference is greater than the first target value, the holding rate of the resources of the first resource group is reduced, and the holding rate of the resources of the second resource group is increased;
[0111] When the current daily average value difference is less than the second target value, the holding rate of the resources of the first resource group is increased, and the holding rate of the resources of the second resource group is reduced;
[0112] The first target value and the second target value are determined based on the confidence interval, the first target value is the maximum value of the confidence interval, and the second target value is the minimum value of the confidence interval.
[0113] Specifically, the resource allocation operation for the target resource group can be determined based on the comparison result of the current daily average value difference and the confidence interval. The confidence interval provides an interval estimate within which there is a certain degree of confidence (such as 95% or 99%) that the true parameter value will fall.
[0114] In the embodiment of the present application, the first target value can be understood as the maximum value of the confidence interval, and the second target value can be understood as the minimum value of the confidence interval.
[0115] In the embodiment of the present application, a 95% confidence interval is taken as an example. Under the premise that the average daily value of the first sub-resource group is greater than the average daily value of the second sub-resource group, when the current average daily value difference is greater than the first target value, it means that there is a 95% probability that the first sub-resource group has more resources than the second sub-resource group. Then, the holding rate of resources of the first resource group is reduced, and the holding rate of resources of the second resource group is increased. When increasing and decreasing, it can be done according to the preset ratio.
[0116] In the embodiment of the present application, when the current daily average value difference is less than the second target value, it means that there is a 95% probability that the first sub-resource group has fewer resources than the second sub-resource group. Then the holding rate of resources in the first resource group is increased, and the holding rate of resources in the second resource group is reduced. When increasing and decreasing, it can be done according to a preset ratio. When the current daily average value difference regresses to the 95% confidence interval, the allocation is stopped.
[0117] In this embodiment, by allocating resources of the target resource group according to the comparison result of the current daily average value difference and the confidence interval, the accuracy of resource allocation can be improved.
[0118] See also Figure 4 , is the second flow chart of the resource allocation method provided in the embodiment of the present application. Figure 4 As shown, the resource allocation method provided in the embodiment of the present application may include the following steps:
[0119] Step S401: Read data. Characteristic data: operating data, financial data, sales data. Basic data: P / B.
[0120] Step S402: regularizing feature data.
[0121] Step S403: Use the KNN model to find M groups of similar stocks, each group containing N stocks.
[0122] Step S404: Select the first group of stocks.
[0123] Step S405: Divide the N stocks into two secondary groups, randomly assign initial weights, and calculate the average P / S.
[0124] Step S406: Determine whether the P / S of the two secondary group stocks is a stable sequence, if not, proceed to S407, if yes, proceed to S408.
[0125] Step S407: adjust the secondary group or adjust the weight, and return to step S406.
[0126] Step S408: Complete the model construction of the group of stocks.
[0127] Step S409: Select the next group of stocks for model building.
[0128] Step S410: Complete the construction of all group stock models.
[0129] Step S411: Calculate the mean and variance of the difference between the average P / B of the two secondary groups in each group, and calculate the 95% confidence interval.
[0130] Step S412: Real-time monitoring, determining the stock transaction based on the average P / B difference and the 95% confidence interval.
[0131] In this specific embodiment, the resource is stock as an example for explanation. The KNN (K-Nearest Neighbors) model is a model used for classification and regression tasks, that is, "grouping stocks according to target feature data to obtain multiple target resource groups" and "determining the first sub-resource group and the second sub-resource group corresponding to the target resource group" in the present application solution.
[0132] In the embodiments of the present application, the specific implementation can be found in the above description and will not be repeated here.
[0133] See also Figure 5 , is a structural diagram of a resource allocation device provided in an embodiment of the present application, which can implement the above-mentioned resource allocation method, and the device includes:
[0134] A determination module is used to determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group, the daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer;
[0135] A first acquisition module is used to acquire the current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is the difference between the current average daily value of the first sub-resource group and the current average daily value of the second sub-resource group;
[0136] A second acquisition module is used to obtain a confidence interval of a target resource group;
[0137] The execution module is used to execute the resource allocation operation on the target resource group according to the comparison result of the current daily average value difference and the confidence interval.
[0138] The specific implementation of the resource allocation device is substantially the same as the specific implementation of the resource allocation method described above, and will not be described in detail herein.
[0139] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above resource allocation method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0140] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0141] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0142] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the resource allocation method of the embodiment of this application;
[0143] Input / output interface 603, used to implement information input and output;
[0144] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0145] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );
[0146] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0147] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned resource allocation method is implemented.
[0148] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] The resource allocation method, device, electronic device and storage medium provided in the embodiments of the present application determine the first sub-resource group and the second sub-resource group corresponding to the target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the daily average values of the first sub-resource group and the second sub-resource group in the historical resource allocation cycle, the daily average value includes the daily average value of the first sub-resource group and the daily average value of the second sub-resource group, the daily average value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is characterized by the price-to-sales ratio of the resource on the i-th resource allocation day, i is a positive integer; obtain the current daily average value difference between the first sub-resource group and the second sub-resource group; the current daily average value difference is the difference between the current daily average value of the first sub-resource group and the current daily average value of the second sub-resource group; obtain the confidence interval of the target resource group; and perform resource allocation operations on the target resource group according to the comparison result of the current daily average value difference and the confidence interval. In this way, by grouping resources and determining the resource allocation operation based on the comparison result of the daily average value difference between the first sub-resource group and the second sub-resource group and the confidence interval, the accuracy of resource allocation is improved.
[0150] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0151] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0152] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0154] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0155] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0156] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0157] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0160] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.
Claims
1. A resource allocation method, characterized in that: The resource allocation method comprises: Determine a first sub-resource group and a second sub-resource group corresponding to a target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in a historical resource allocation cycle, the average daily value includes the average daily value of the first sub-resource group and the average daily value of the second sub-resource group, the average daily value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer; Obtaining a current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is a difference between a current average daily value of the first sub-resource group and a current average daily value of the second sub-resource group; Obtaining a confidence interval of the target resource group; According to the comparison result of the current daily average value difference and the confidence interval, a resource allocation operation is performed on the target resource group.
2. The resource allocation method according to claim 1, characterized in that: The step of determining the first sub-resource group and the second sub-resource group corresponding to the target resource group includes: Evenly grouping the resources in the target resource group to obtain a first group and a second group; Determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value; When the second sequence corresponding to the target resource group is a stable sequence, the first group is determined as the first sub-resource group, and the second group is determined as the second sub-resource group; the second sequence includes the daily average value of the first group and the second group during the historical resource allocation period.
3. The resource allocation method according to claim 2, characterized in that: After determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, and before determining the first group as the first sub-resource group and determining the second group as the second sub-resource group, the resource allocation method includes: Determine whether the difference between the daily average values of the first group and the second group satisfies mean reversion during the historical resource allocation period; In the case where the difference satisfies mean regression, it is determined that the daily average values of the first group and the second group in the historical resource allocation cycle are a stationary sequence.
4. The resource allocation method according to claim 2, characterized in that: After determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, and before determining the first group as the first sub-resource group and determining the second group as the second sub-resource group, the resource allocation method includes: When the difference does not satisfy mean reversion, the weight parameters are adjusted, and the average daily value of the first group and the average daily value of the second group are determined according to the adjusted weight parameters until the difference between the average daily values of the first group and the second group satisfies mean reversion.
5. The resource allocation method according to claim 2, characterized in that: After determining the daily average value of the first group and the daily average value of the second group based on the initial weight parameter of the daily average value, and before determining the first group as the first sub-resource group and determining the second group as the second sub-resource group, the resource allocation method includes: In the case that the difference does not satisfy mean reversion, the resources in the target resource group are regrouped, and the adjusted daily average values of the first group and the second group are determined until the difference between the daily average values of the first group and the second group satisfies mean reversion.
6. The resource allocation method according to claim 1, characterized in that: Before determining the first sub-resource group and the second sub-resource group corresponding to the target resource group, the resource allocation method further includes: Acquire initial characteristic data of resources in the resource pool; the initial characteristic data includes at least one of the following: net profit rate data, operating income data, and market share data; Performing regularization processing on the initial feature data to obtain target feature data; The stocks are grouped according to the target characteristic data to obtain a plurality of target resource groups.
7. The resource allocation method according to claim 1, characterized in that: In a case where the daily average value of the first sub-resource group is greater than the daily average value of the second sub-resource group, performing a resource allocation operation on the target resource group according to a comparison result of the current daily average value difference and the confidence interval includes: When the current daily average value difference is greater than the first target value, reducing the holding rate of resources in the first resource group and increasing the holding rate of resources in the second resource group; When the current daily average value difference is less than the second target value, increasing the holding rate of resources in the first resource group and decreasing the holding rate of resources in the second resource group; The first target value and the second target value are determined based on the confidence interval, the first target value is the maximum value of the confidence interval, and the second target value is the minimum value of the confidence interval.
8. A resource allocation device, characterized in that: The resource allocation device comprises: A determination module, used to determine a first sub-resource group and a second sub-resource group corresponding to a target resource group, wherein the first sequence corresponding to the target resource group is a stationary sequence, the first sequence includes the average daily values of the first sub-resource group and the second sub-resource group in a historical resource allocation cycle, the average daily value includes the average daily value of the first sub-resource group and the average daily value of the second sub-resource group, the average daily value of the sub-resource group on the i-th resource allocation day in the historical resource allocation cycle is the average value of the values of each resource in the resource group on the i-th resource allocation day, the value of the resource on the i-th resource allocation day is represented by the price-to-sales ratio of the resource on the i-th resource allocation day, and i is a positive integer; A first acquisition module is used to acquire a current average daily value difference between the first sub-resource group and the second sub-resource group; the current average daily value difference is a difference between a current average daily value of the first sub-resource group and a current average daily value of the second sub-resource group; A second acquisition module, used to acquire the confidence interval of the target resource group; An execution module is used to execute a resource allocation operation on the target resource group according to a comparison result of the current average daily value difference and the confidence interval.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the resource allocation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the resource allocation method according to any one of claims 1 to 7 is implemented.