Quantitative transaction strategy generation method and device, equipment, storage medium and product

By combining genetic programming and reinforcement learning with grammatical constraints in the generation of quantitative trading strategies, the problems of large computing power consumption and low strategy quality in the existing technology are solved, efficient and high-quality trading strategy generation is achieved, and the use of rule strategies and reinforcement learning strategies is balanced.

CN119599798APending Publication Date: 2025-03-11CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411513118.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing quantitative trading strategy generation methods consume too much computing power, resulting in low quality of trading strategies and difficult to effectively balance rule strategies and reinforcement learning strategies.

Method used

By constraining genetic programming according to preset grammar rules, a feature set strategy is generated, and the strategy is optimized using reinforcement learning module, and the optimal strategy is finally fed back to the constrained genetic programming for screening to obtain a quantitative trading strategy.

Benefits of technology

It effectively reduces computing power consumption, improves the quality of trading strategies, realizes the balance between rule strategies and reinforcement learning strategies, increases part of the interpretability, and generates better trading strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599798A_ABST
    Figure CN119599798A_ABST
Patent Text Reader

Abstract

The invention discloses a quantitative transaction strategy generation method and device, equipment, a storage medium and a product, and relates to the technical field of financial investment, and the method comprises the steps: carrying out the constraint of genetic programming according to a preset grammar rule corresponding to a preset investment idea; generating a feature set strategy through the constrained genetic programming; optimizing a feature set strategy through a reinforcement learning module; and the optimal strategy is fed back to the constrained genetic programming for screening, and a quantitative transaction strategy is obtained. According to the method, the genetic programming is constrained according to the grammar rule corresponding to the investment concept, the search space of the genetic programming is effectively cut through the grammar, the rationality of the combination is ensured, and the computing power consumption is reduced; according to the method, omission of rule strategies in a search space is eliminated through reinforcement learning, effective feature sets are optimized, computing power consumption is further reduced, therefore, better transaction strategies can be generated, and the automatic process from the features to the strategies is superior to the manual process depending on personal experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial investment technology, and in particular to a quantitative trading strategy generation method, device, equipment, storage medium and product. Background Art

[0002] In financial investment, quantitative strategy analysts often adhere to certain investment concepts (for example, a certain type of technical analysis, or fundamental analysis, macro analysis, or a combination of investment methodologies) to develop quantitative trading strategies. Reinforcement learning in machine learning is widely used in the construction of quantitative trading strategies. However, feature engineering is not closely related to model and strategy generation. It is often necessary to first construct a feature set based on experience, then train the model to evaluate the results, and finally try to improve the construction of the feature set based on the results. This process is a manual process that relies on the personal experience of strategy developers and is prone to omissions in incomplete thinking. The use of genetic programming alone has a slow convergence in target optimization and consumes a lot of computing power. The training time is difficult to estimate. The use of reinforcement learning alone requires high computing power and slow convergence when the feature set is large, and cannot effectively solve the balance between rule strategy and reinforcement learning strategy. Summary of the invention

[0003] The main purpose of this application is to provide a quantitative trading strategy generation method, device, equipment, storage medium and product, aiming to solve the technical problem that the existing method for generating quantitative trading strategies consumes too much computing power, resulting in low trading strategy quality.

[0004] To achieve the above objectives, the present application proposes a method for generating a quantitative trading strategy, the method comprising:

[0005] Constraining the genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to the preset investment philosophy;

[0006] Generate a feature set strategy through genetic programming after the constraints;

[0007] Optimizing the feature set strategy through a reinforcement learning module to obtain an optimal strategy;

[0008] The optimal strategy is fed back to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0009] In one embodiment, the preset grammar rules include population generation grammar rules, population intersection grammar rules and population variation grammar rules, and the population generation grammar rules, the population intersection grammar rules and the population variation grammar rules all include terminal symbols and non-terminal symbols;

[0010] Before the step of constraining the genetic programming according to the preset grammar rules to obtain the constrained genetic programming, the method further includes:

[0011] The population generation grammar rules, population intersection grammar rules and population variation grammar rules are generated according to the investors' preset investment philosophy through the Backsnauer paradigm.

[0012] In one embodiment, the step of constraining the genetic programming according to the preset grammar rules to obtain the constrained genetic programming includes:

[0013] According to preset grammar rules, the population generation stage, population crossover stage and population mutation stage of genetic programming are constrained to obtain constrained genetic programming.

[0014] In one embodiment, the step of constraining the population generation phase, population crossover phase, and population mutation phase of genetic programming according to preset grammar rules to obtain constrained genetic programming includes:

[0015] Constraining the structure of individuals in the population generation stage of genetic programming according to the population generation grammar rule, wherein the population generation grammar rule is a context-free grammar rule;

[0016] Constraining the intersection points in the population crossover phase of genetic programming according to the population crossover grammar rule;

[0017] Constraints are imposed on mutation points in the population mutation phase of genetic programming according to the population mutation grammar rules to obtain constrained genetic programming.

[0018] In one embodiment, the step of optimizing the feature set strategy through a reinforcement learning module to obtain the best strategy includes:

[0019] Generate trading actions according to the environment state through the reinforcement learning module, and the trading actions include opening long, closing long, opening short, closing short and no operation;

[0020] receiving feedback information from the market environment regarding the transaction action, wherein the feedback information includes rewards or penalties;

[0021] The feature set strategy is optimized according to the feedback information to obtain the best strategy.

[0022] In one embodiment, the step of feeding back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy includes:

[0023] Feedback the investment result corresponding to the optimal strategy as the individual fitness of the constrained genetic programming;

[0024] Performing population crossover and population mutation operations according to the individual fitness through the constrained genetic programming;

[0025] A better feature set is selected from the optimal strategy to obtain a quantitative trading strategy.

[0026] In addition, to achieve the above purpose, the present application also proposes a quantitative trading strategy generation device, the quantitative trading strategy generation device comprising:

[0027] A genetic programming constraint module, used to constrain genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to preset investment concepts;

[0028] A feature set generation module, used for generating a feature set strategy through genetic programming after the constraints;

[0029] A reinforcement learning optimization module, used to optimize the feature set strategy through a reinforcement learning module to obtain an optimal strategy;

[0030] The trading strategy generation module is used to feed back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a quantitative trading strategy generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the quantitative trading strategy generation method described above.

[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the quantitative trading strategy generation method described above are implemented.

[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the quantitative trading strategy generation method as described above.

[0034] The present application provides a method for generating a quantitative trading strategy, by constraining genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammars corresponding to preset investment concepts; generating feature set strategies through constrained genetic programming; optimizing feature set strategies through reinforcement learning modules to obtain the best strategies; feeding back the best strategies to constrained genetic programming for screening to obtain quantitative trading strategies. The present application constrains genetic programming according to grammar rules corresponding to investment concepts, effectively trims the search space of genetic programming through grammar, ensures the rationality of the combination, and reduces computing power consumption; then uses reinforcement learning to further eliminate the omissions of rule strategies in its search space, optimizes the effective feature set, and greatly reduces computing power consumption. Combining genetic programming based on grammar constraints with reinforcement learning, a balance between rule strategies and reinforcement learning strategies is achieved, and partial interpretability is increased, thereby enabling the generation of better trading strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

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

[0037] Figure 1 A flowchart of the first embodiment of the quantitative trading strategy generation method of the present application is provided;

[0038] Figure 2 A flowchart of the second embodiment of the quantitative trading strategy generation method of the present application is provided;

[0039] Figure 3 A flowchart of the third embodiment of the quantitative trading strategy generation method of the present application is provided;

[0040] Figure 4 This is a schematic diagram of the overall process of the quantitative trading strategy generation method for this application;

[0041] Figure 5 This is a schematic diagram of the module structure of the quantitative trading strategy generation device according to an embodiment of the present application;

[0042] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the quantitative trading strategy generation method in the embodiment of the present application.

[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The main solution of the embodiment of the present application is: constraining genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to preset investment concepts; generating a feature set strategy through the constrained genetic programming; optimizing the feature set strategy through a reinforcement learning module to obtain an optimal strategy; and feeding back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0047] Due to the existing technology in financial investment, quantitative strategy analysts often adhere to certain investment concepts (for example, a certain type of technical analysis, or fundamental analysis, macro analysis, or a combination of investment methodologies) to develop quantitative trading strategies. Reinforcement learning in machine learning is widely used in the construction of quantitative trading strategies. However, feature engineering is not closely related to model and strategy generation. It is often necessary to first construct a feature set based on experience, then train the model to evaluate the results, and finally try to improve the construction of the feature set based on the results. This process is a manual process that relies on the personal experience of strategy developers and is prone to omissions in incomplete thinking. The use of genetic programming alone converges slowly in target optimization and consumes a lot of computing power. The training time is difficult to estimate. The use of reinforcement learning alone requires high computing power and slow convergence when the feature set is large, and cannot effectively solve the balance between rule strategy and reinforcement learning strategy.

[0048] The present application provides a solution, by constraining genetic programming according to preset grammar rules, obtaining constrained genetic programming, the preset grammar rules are the grammar corresponding to the preset investment concept; generating feature set strategies through constrained genetic programming; optimizing the feature set strategies through the reinforcement learning module to obtain the best strategy; feeding back the best strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy. The present application constrains genetic programming according to the grammar rules corresponding to the investment concept, effectively trims the search space of genetic programming through grammar, ensures the rationality of the combination, and reduces computing power consumption; then uses reinforcement learning to further eliminate the omissions of rule strategies in its search space, optimizes the effective feature set, and greatly reduces computing power consumption. Combining genetic programming based on grammar constraints with reinforcement learning, a balance between rule strategies and reinforcement learning strategies is achieved, and partial interpretability is increased, so that better trading strategies can be generated.

[0049] It should be noted that the execution subject of the method of this embodiment can be a computing service device with quantitative trading strategy generation, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc.; it can also be a quantitative trading strategy generation device with the same or similar functions. This embodiment and the following embodiments will be described by taking the quantitative trading strategy generation device as an example.

[0050] Based on this, the embodiment of the present application provides a quantitative trading strategy generation method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the quantitative trading strategy generation method of the present application.

[0051] In this embodiment, the quantitative trading strategy generation method includes steps S10 to S40:

[0052] Step S10, constraining the genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to the preset investment philosophy.

[0053] It is understandable that considering that traditional genetic programming will perform completely random combinations of elements, a large number of meaningless or self-contradictory combinations will be generated, and fitness evaluation of these combinations will waste a lot of computing resources. Therefore, in this application, grammar rules are used to tailor the combination space according to business needs, which largely ensures the rationality of the combination.

[0054] Specifically, genetic programming is combined with grammar constraints to generate structured programs or expressions. The main advantage of this method is that the search space of genetic programming is constrained by grammar rules, thereby avoiding the generation of individuals that are illegal or do not meet specific grammatical requirements. Incorporating prior experience of investment into the search of features and strategies makes it possible to fully explore investment strategies under a specific investment concept.

[0055] It is understandable that quantitative strategy analysts often carry out strategy development based on certain investment concepts (such as a certain type of technical analysis, fundamental analysis, macro analysis, or a combination of investment methodologies). Here, grammar rules are used to express investment concepts. Grammar constraints ensure that genetic programming only generates legal program structures through a set of predefined rules. Grammar rules limit the structure of the program and the use of operators to avoid non-grammatical expressions or programs.

[0056] Step S20, generating a feature set strategy through the constrained genetic programming.

[0057] It is understandable that constrained genetic programming can generate feature set strategies through feature combination optimization. The generated feature set strategy can be directly applied to investment, or it can be input into the reinforcement learning module for further optimization. Under limited computing resources, constrained genetic programming is more likely to discover effective trading strategies. At the same time, grammar constraints also make the state space construction of reinforcement learning more reasonable, effectively reducing the number of attempts of reinforcement learning.

[0058] Step S30, optimizing the feature set strategy through a reinforcement learning module to obtain an optimal strategy.

[0059] It should be understood that, considering the use of reinforcement learning alone, the computing power requirements are high and the convergence is slow when the feature set is large. If reinforcement learning is used to find the optimal strategy on a meaningless feature set, it is a completely unexplainable black box to rely entirely on the autonomous mining of reinforcement learning with simpler feature inputs. It will be a huge waste of computing power. Under business needs, trying effective feature sets will greatly reduce computing power consumption. Therefore, in this embodiment, a feature set strategy is first generated by constrained genetic programming to obtain an effective feature set, and then the feature set strategy is input into the reinforcement learning module for optimization, thereby reducing computing power consumption and improving the accuracy of the strategy.

[0060] Step S40, feeding back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0061] It should be understood that the reinforcement learning module optimizes the feature set strategy generated by grammar-constrained genetic programming to obtain the best strategy, and feeds the best strategy back to the constrained genetic programming for screening, thereby screening out a better feature set and obtaining a quantitative trading strategy. This automated process from features to strategies is superior to the manual process based on personal experience.

[0062] It should be noted that in this embodiment, feature engineering will be automatically implemented by genetic programming, and the feature set will be mapped to the state space of reinforcement learning. The optimal strategy will be optimized by reinforcement learning, and its execution results will be fed back to genetic programming as the fitness of the individual, affecting its selection, crossover, and mutation processes. This process realizes machine automation. The strategy developer only needs to define the research and development direction of the strategy to obtain whether there is a feasible strategy in this strategy direction, thereby confirming the feasibility of the research and development direction.

[0063] This embodiment provides a method for generating a quantitative trading strategy, constraining genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammars corresponding to preset investment concepts; generating feature set strategies through constrained genetic programming; optimizing feature set strategies through reinforcement learning modules to obtain the best strategies; feeding the best strategies back to constrained genetic programming for screening to obtain quantitative trading strategies. This application constrains genetic programming according to grammar rules corresponding to investment concepts, effectively trims the search space of genetic programming through grammar, ensures the rationality of the combination, and reduces computing power consumption; then uses reinforcement learning to further eliminate the omissions of rule strategies in its search space, optimizes the effective feature set, and greatly reduces computing power consumption. Combining genetic programming based on grammar constraints with reinforcement learning, a balance between rule strategies and reinforcement learning strategies is achieved, and partial interpretability is increased, thereby enabling the generation of better trading strategies.

[0064] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 The preset grammar rules include population generation grammar rules, population intersection grammar rules and population variation grammar rules, and the population generation grammar rules, the population intersection grammar rules and the population variation grammar rules all include terminal symbols and non-terminal symbols; before step S10, the quantitative trading strategy generation method also includes step S01:

[0065] Step S01: Generate population generation grammar rules, population intersection grammar rules and population variation grammar rules according to the investor's preset investment philosophy through the Backsnauer-Naur form.

[0066] It is understandable that in this embodiment, population generation grammar rules, population intersection grammar rules and population variation grammar rules are generated in advance according to the investment philosophy of strategy developers. The grammar rules define a set of generation rules for describing the form of legal structures. It is usually represented by Backus-Naur Form (BNF), including terminals and non-terminals. The terminal symbol (Terminal) represents the final generated language symbol and cannot be replaced. The non-terminal symbol (Non-Terminal) can be replaced by other non-terminals or terminals through grammar rules.

[0067] In this embodiment, the population generation grammar rules, population intersection grammar rules and population variation grammar rules are defined by Backus-Naur Form, which not only helps developers to clearly define and understand complex grammatical structures, but also promotes the standardization and interoperability of programming languages.

[0068] In a feasible implementation, step S10 may include step S101:

[0069] Step S101, constraining the population generation phase, population crossover phase and population mutation phase of genetic programming according to preset grammar rules to obtain constrained genetic programming.

[0070] It is understandable that, considering that genetic programming includes several important stages: population generation, population crossover and population mutation, in order to ensure the effective expression of the individual structure of the population, the population generation stage, population crossover stage and population mutation stage of genetic programming are constrained according to the preset grammar rules defined above to obtain constrained genetic programming.

[0071] In a feasible implementation, step S101 may include steps A10 to A30:

[0072] Step A10, constraining the structure of individuals in the population generation stage of genetic programming according to the population generation grammar rules, wherein the population generation grammar rules are context-free grammar rules.

[0073] It should be understood that in the initial stage of genetic programming, an initial population consisting of multiple individuals needs to be generated. These individuals are usually randomly generated, but can also be a specific structure designed in advance. In order to ensure diversity, different strategies can be used to generate the initial population, such as random generation, template-based generation, or the use of heuristic methods. When generating the initial population, grammar constraints can be used to ensure that the generated individuals conform to specific grammatical rules. For example, a context-free grammar can be defined to restrict the structure of individuals and ensure that each individual is a valid program or expression.

[0074] Step A20: constraining the intersection points in the population crossover phase of genetic programming according to the population crossover grammar rules.

[0075] It is understood that crossover is an important operation in genetic programming, which generates new offspring individuals by combining the genes of two parent individuals. The crossover operation can be a single-point crossover, a multi-point crossover, or a uniform crossover, etc. When performing a crossover operation, it is necessary to ensure that the generated offspring individuals still conform to the grammar constraints. This can be achieved by applying grammar rules at the crossover point to ensure that the exchanged gene fragments do not lead to illegal individual structures.

[0076] Step A30, constraining the mutation points in the population mutation phase of genetic programming according to the population mutation grammar rules to obtain constrained genetic programming.

[0077] It is understandable that mutation is another important operation in genetic programming, which introduces new genetic diversity by randomly changing the genes of individuals. Mutation operations can be point mutations, insertion mutations, or deletion mutations. When performing mutation operations, it is also necessary to ensure that the new individuals generated meet the grammatical constraints. This can be achieved by applying grammar rules at the mutation points to ensure that the individual structure after mutation is still valid.

[0078] In this embodiment, the search space of genetic programming is effectively cut through grammar rules, and its combination mode is more reasonable, making the search process controllable, and it is easier to find effective trading strategies under limited computing resources. At the same time, grammar constraints also make the state space construction of reinforcement learning more reasonable, effectively reducing the number of attempts of reinforcement learning.

[0079] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 3 , step S30, the quantitative trading strategy generation method further includes steps S301 to S303:

[0080] Step S301: Generate trading actions according to the environment state through the reinforcement learning module, and the trading actions include opening a long position, closing a long position, opening a short position, closing a short position and no operation.

[0081] It is understandable that in the field of financial investment, the market environment refers to the entire gold futures trading market and the entire economic and financial environment associated with it, and the environmental state refers to the environmental state observed based on the market environment. The reinforcement learning module can generate trading actions based on the observed environmental state, including five actions: opening long, closing long, opening short, closing short, and no operation.

[0082] Step S302: receiving feedback information from the market environment regarding the transaction action, wherein the feedback information includes rewards or penalties.

[0083] It is understandable that after selecting a trading action, the information received from the market environment may be reward or penalty information. Among them, the reward reflects the desired goal, which can be maximizing total returns, minimizing maximum drawdown (it can also increase the stability of the capital curve, etc.).

[0084] Step S303: Optimize the feature set strategy according to the feedback information to obtain the best strategy.

[0085] It should be understood that the feature set strategy can be optimized according to the feedback information to obtain the best strategy.

[0086] In a feasible implementation, step S40 may include steps S401 to S403:

[0087] Step S401, feeding back the investment result corresponding to the optimal strategy as the individual fitness of the constrained genetic programming.

[0088] Step S402, performing population crossover and population mutation operations according to the individual fitness through the constrained genetic programming.

[0089] Step S403, selecting a better feature set from the optimal strategy to obtain a quantitative trading strategy.

[0090] It should be understood that after the reinforcement learning module generates the optimized best strategy, the investment result corresponding to the best strategy can be fed back as the individual fitness of the constrained genetic programming. The constrained genetic programming performs population crossover and population mutation operations based on the individual fitness, thereby screening out a better feature set, and using reinforcement learning to further eliminate the omissions of the rule strategy in its search space. The combination of the two will produce a partially explainable reinforcement learning strategy and a better trading strategy.

[0091] In this embodiment, the investment result feedback corresponding to the best strategy is used as the individual fitness of the constrained genetic programming. The constrained genetic programming performs population crossover and population mutation operations according to the individual fitness, and selects a better feature set from the best strategy to obtain a quantitative trading strategy. The optimal strategy is optimized by reinforcement learning, and its execution result is fed back to the genetic programming as the individual fitness, which affects its selection, crossover, and mutation process. This process realizes machine automation. The strategy developer only needs to define the research and development direction of the strategy to obtain whether there is a feasible strategy in this strategy direction, thereby confirming the feasibility of the research and development direction.

[0092] For example, in order to help understand the implementation process of the quantitative trading strategy generation method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A schematic diagram of the overall process of a quantitative trading strategy generation method is provided, specifically:

[0093] The quantitative trading strategy generation method includes two functional modules: a genetic programming module based on grammar constraints and a reinforcement learning module. In the genetic programming module based on grammar constraints, grammar constraints are applied in the stages of population generation, population crossover and population mutation. The genetic programming module based on grammar constraints can generate rule trading strategies through feature combination optimization and directly apply them to investment, or map the features to the state space of reinforcement learning after feature combination, optimize the optimal strategy by reinforcement learning, and use the feature combination strategy and reinforcement learning strategy to form a trading strategy for investment.

[0094] This application provides a new method for developing quantitative trading strategies based on grammar-constrained genetic programming and reinforcement learning. This method combines the advantages of innovative genetic programming and reinforcement learning, realizes the automation of quantitative trading strategy development for a specified business direction, and improves the effectiveness of developing quantitative trading strategies. The innovation of this application is:

[0095] (1) Using grammar to constrain traditional genetic programming: This constraint exists in the three links of genetic programming: the constraint when the population is generated, the constraint when the population crosses, and the constraint when the population mutates. Its role is to: 1) cut out unreasonable combinations and save computing resources; 2) integrate prior investment experience into the search of features and strategies, making it possible to fully explore the investment strategy under a specific investment concept.

[0096] (2) Research method of quantitative trading strategy combining grammar-constrained genetic programming and reinforcement learning: Reinforcement learning optimizes the feature set generated by grammar-constrained genetic programming to obtain the best strategy. The investment results generated by the best strategy are fed back as the fitness of grammar-constrained genetic programming, thereby screening out a better feature set. This automated process from features to strategies is superior to the manual process based on personal experience.

[0097] It can be understood that the present application has the following beneficial effects:

[0098] 1) Close collaboration between feature engineering and model and strategy generation:

[0099] The feature set generation process is implemented by genetic programming under grammar constraints, and its combination results are mapped to the state space of reinforcement learning. Reinforcement learning optimizes the best trading strategy in this state space. The results of the execution of this strategy are automatically returned to genetic programming by analyzing its performance indicators (yield, maximum drawdown rate, Sharpe ratio, etc.) to form the fitness index of this feature combination, providing a basis for its crossover and mutation to produce better offspring.

[0100] 2) Grammar-constrained genetic programming:

[0101] Strategy developers adhere to a certain type of investment philosophy and effectively cut the search space of genetic programming through grammar, while making its combination more reasonable, making the search process controllable, and making it easier to find effective trading strategies under limited computing resources. At the same time, grammar constraints also make the state space structure of reinforcement learning more reasonable, effectively reducing the number of attempts of reinforcement learning.

[0102] 3) Balance between rule strategy and reinforcement learning strategy:

[0103] Rule strategies are highly interpretable and are favored by strategy developers, but they are often highly subjective and have omissions. This method first uses grammar-constrained genetic programming to perform constrained search for rule strategies, expands and optimizes artificial subjective trading strategies, and after exploring possible dominant strategies, constructs a set of dominant features on this basis, and uses reinforcement learning to further eliminate omissions in the rule strategy in its search space. The combination of the two will produce partially interpretable reinforcement learning strategies and better trading strategies.

[0104] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the quantitative trading strategy generation method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0105] This application also provides a quantitative trading strategy generation device, please refer to Figure 5 , the quantitative trading strategy generating device comprises:

[0106] A genetic programming constraint module 10, used to constrain genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to preset investment concepts;

[0107] A feature set generation module 20, used to generate a feature set strategy through genetic programming after the constraints;

[0108] A reinforcement learning optimization module 30, used to optimize the feature set strategy through a reinforcement learning module to obtain an optimal strategy;

[0109] The trading strategy generation module 40 is used to feed back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0110] The quantitative trading strategy generation device provided by the present application adopts the quantitative trading strategy generation method in the above embodiment to solve the technical problem. Compared with the prior art, the beneficial effects of the quantitative trading strategy generation device provided by the present application are the same as the beneficial effects of the quantitative trading strategy generation method provided by the above embodiment, and the other technical features in the quantitative trading strategy generation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0111] The present application provides a quantitative trading strategy generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the quantitative trading strategy generation method in the above-mentioned embodiment 1.

[0112] Reference below Figure 6 , which shows a schematic diagram of the structure of a quantitative trading strategy generation device suitable for implementing the embodiment of the present application. The quantitative trading strategy generation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The quantitative trading strategy generation device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0113] like Figure 6As shown, the quantitative trading strategy generation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the quantitative trading strategy generation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the quantitative trading strategy generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a quantitative trading strategy generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0115] The quantitative trading strategy generation device provided by the present application adopts the quantitative trading strategy generation method in the above embodiment, which can solve the technical problems of quantitative trading strategy generation. Compared with the prior art, the beneficial effects of the quantitative trading strategy generation device provided by the present application are the same as the beneficial effects of the quantitative trading strategy generation method provided by the above embodiment, and the other technical features in the quantitative trading strategy generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0116] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0117] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0118] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the quantitative trading strategy generation method in the above-mentioned embodiment.

[0119] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0120] The above-mentioned computer-readable storage medium may be included in the quantitative trading strategy generation device; or it may exist independently without being assembled into the quantitative trading strategy generation device.

[0121] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the quantitative trading strategy generation device, the quantitative trading strategy generation device: constrains the genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to preset investment concepts; generates a feature set strategy through the constrained genetic programming; optimizes the feature set strategy through a reinforcement learning module to obtain an optimal strategy; and feeds back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

[0122] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0125] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned quantitative trading strategy generation method, and can solve technical problems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the quantitative trading strategy generation method provided in the above-mentioned embodiment, and will not be repeated here.

[0126] The present application also provides a computer program product, including a computer program, which implements the steps of the quantitative trading strategy generation method as described above when executed by a processor.

[0127] The computer program product provided by this application can solve the technical problem. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the quantitative trading strategy generation method provided by the above embodiment, which will not be repeated here.

[0128] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A quantitative trading strategy generation method, characterized in that: The method includes: Constraining the genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to the preset investment philosophy; Generate a feature set strategy through genetic programming after the constraints; Optimizing the feature set strategy through a reinforcement learning module to obtain an optimal strategy; The optimal strategy is fed back to the constrained genetic programming for screening to obtain a quantitative trading strategy.

2. The method according to claim 1, characterized in that The preset grammar rules include population generation grammar rules, population intersection grammar rules and population variation grammar rules, wherein the population generation grammar rules, the population intersection grammar rules and the population variation grammar rules all include terminal symbols and non-terminal symbols; Before the step of constraining the genetic programming according to the preset grammar rules to obtain the constrained genetic programming, the method further includes: The population generation grammar rules, population intersection grammar rules and population variation grammar rules are generated according to the investors' preset investment philosophy through the Backsnauer paradigm.

3. The method according to claim 2, characterized in that The step of constraining the genetic programming according to the preset grammar rules to obtain the constrained genetic programming includes: According to preset grammar rules, the population generation stage, population crossover stage and population mutation stage of genetic programming are constrained to obtain constrained genetic programming.

4. The method according to claim 3, characterized in that The steps of constraining the population generation phase, population crossover phase and population mutation phase of genetic programming according to preset grammar rules to obtain constrained genetic programming include: Constraining the structure of individuals in the population generation stage of genetic programming according to the population generation grammar rule, wherein the population generation grammar rule is a context-free grammar rule; Constraining the intersection points in the population crossover phase of genetic programming according to the population crossover grammar rule; Constraints are imposed on mutation points in the population mutation phase of genetic programming according to the population mutation grammar rules to obtain constrained genetic programming.

5. The method according to claim 1, characterized in that The step of optimizing the feature set strategy through the reinforcement learning module to obtain the best strategy includes: Generate trading actions according to the environment state through the reinforcement learning module, and the trading actions include opening long, closing long, opening short, closing short and no operation; receiving feedback information from the market environment regarding the transaction action, wherein the feedback information includes rewards or penalties; The feature set strategy is optimized according to the feedback information to obtain the best strategy.

6. The method according to claim 1, characterized in that The step of feeding back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy comprises: Feedback the investment result corresponding to the optimal strategy as the individual fitness of the constrained genetic programming; Performing population crossover and population mutation operations according to the individual fitness through the constrained genetic programming; A better feature set is selected from the optimal strategy to obtain a quantitative trading strategy.

7. A quantitative trading strategy generation device, characterized in that: The quantitative trading strategy generating device comprises: A genetic programming constraint module, used to constrain genetic programming according to preset grammar rules to obtain constrained genetic programming, wherein the preset grammar rules are grammar rules corresponding to preset investment concepts; A feature set generation module, used for generating a feature set strategy through genetic programming after the constraints; A reinforcement learning optimization module, used to optimize the feature set strategy through a reinforcement learning module to obtain an optimal strategy; The trading strategy generation module is used to feed back the optimal strategy to the constrained genetic programming for screening to obtain a quantitative trading strategy.

8. A quantitative trading strategy generation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the quantitative trading strategy generation method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the quantitative trading strategy generation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the quantitative trading strategy generation method according to any one of claims 1 to 6 are implemented.