Evolutionary framework construction method for big language model enhancement of formula Alpha factor mining
By introducing the evolutionary framework of large -language model enhancement in the process of automation mining formulating the Alpha factor, the problem of low search efficiency in the existing technology and generating an invalid Alpha in existing technologies have achieved higher -quality and explained formula -based Alpha factor generation.
Patent Information
- Application Number
- CN202411398006.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art faces the problems of inefficient search efficiency, ineffective and redundant Alpha generation, and inflexible construction of complex Alphas when automating the mining of formulaic Alpha factors.
The evolutionary framework enhanced by a large language model is used to guide the evolutionary process by introducing the evolutionary thinking chain, code assessor, and diversity checkup to reduce search space and generate reasonable formulas of Alpha factor.
Effectively improves the quality and explanatory formatomy of the formulating Alpha Factor, stronger applicability, and improves user experience and commercial development value.
Smart Images

Figure CN119379434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of formulaic Alpha factor mining, and in particular to a large language model enhanced evolutionary framework construction method for formulaic Alpha factor mining. Background Art
[0002] Alpha factors are designed to model market data, such as opening and closing prices, to predict returns and inform trading decisions in quantitative trading. They are generally divided into black-box Alpha and formula Alpha. Black-box Alpha uses machine learning models to discover underlying data patterns and is good at modeling complex relationships between multiple variables. However, they are uninterpretable and prone to overfitting. In contrast, formulated Alpha is represented by simple mathematical expressions, making it easy to interpret and analyze. Nevertheless, their development relies heavily on expert research, which is time-consuming and laborious. Therefore, it is a challenge to automatically mine formulaic Alpha that expresses complex relationships.
[0003] The existing state-of-the-art automated formula Alpha mining methods mainly focus on evolutionary algorithms to generate Alpha based on expression trees. These methods adopt evolutionary operators to iteratively optimize the factor population and improve it in successive generations. In order to balance the search space and the quality of the generated Alpha, reinforcement learning is introduced, which models factor mining as a Markov decision process, according to the policy gradient algorithm. However, they still face the problems of inefficient search, generation of invalid and redundant Alpha, and inflexible construction of complex Alpha. First, the construction of formula Alpha involves a large number of operators and operands, resulting in a wide search space, making the process time-consuming and inefficient. Second, the existing technologies do not fully incorporate specific semantic and financial expertise, which often leads to redundant and meaningless Alpha. Finally, they mainly rely on expression trees for compilation and evaluation, which limits their logical expression and makes their expansion challenging. Summary of the invention
[0004] The purpose of the present invention is to provide a method for constructing an evolutionary framework enhanced by a large language model for formula Alpha factor mining in view of the deficiencies of the prior art. The evolutionary framework enhanced by a large language model (LLMs) for formula Alpha factor mining is used to guide the evolutionary process, reduce the search space and generate reasonable formula Alpha factors. The Alpha factors are modeled by characteristic data of the stock market (such as opening price, closing price and other features) to predict returns and provide information for trading decisions in quantitative trading. This method mines robust formulas that are strongly correlated with stock returns to assist investors in investment decisions and bring returns. The method introduces an evolutionary thinking chain enhanced by a large language model, promotes processes including analysis, crossover and mutation, generates reasonable new Alpha factors from the selected parent Alpha, and then the code evaluator converts these newly generated Alpha factors into executable code with the help of a large language model to improve the evaluation efficiency. Finally, a diversity checker is used to filter out Alphas with too high similarity to ensure that the population is effectively updated. The method is simple and effectively improves the quality of the generated formula Alpha factors, has good interpretability, is more applicable, and has good application prospects and commercial development value.
[0005] The specific technical solution to achieve the purpose of the present invention is: a method for constructing an evolutionary framework enhanced by a large language model for formula Alpha factor mining, which is characterized by adopting an evolutionary framework of a large language model enhanced architecture for formula Alpha factor mining, and using the background knowledge and reasoning ability of the large language model to guide the evolutionary process, reduce the search space and generate reasonable formulaic Alpha factors. The method first introduces an evolutionary thinking chain enhanced by a large language model, which promotes processes including analysis, crossover and mutation to generate reasonable new Alpha factors from the selected parent Alpha. The code evaluator converts these newly generated Alpha factors into executable code with the help of a large language model to improve the evaluation efficiency. A diversity checker is used to filter out Alphas with too high similarity to ensure that the population is effectively updated. The method specifically includes the following steps:
[0006] 1) Initialize the Alpha factor population module, which evaluates and calculates the fitness values of 101 commonly used Alpha factors in the industry on the data set, sorts them, selects the Top-N Alpha factors as the initial population, and records them as A0. The algorithm iterates from g = 1 (where g represents the generation) until the predefined number of generations G is reached. The fitness function uses the correlation coefficient IC defined by the following formula (a):
[0007]
[0008] in, represents the stock return vector held for h days at time t, where n represents the number of stocks, Calculate the stock return rate of the i-th stock held for h days at time t for the following formula (b):
[0009]
[0010] Among them, α t =(α t,1 ,α t,2 ,…,α t,n ) represents the stock Alpha value vector at time t, n represents the number of stocks, α t,i =f(X t,i ) represents the Alpha value of the i-th stock at time t, X t,i ∈R m represents the market data of the i-th stock at time t, which consists of m features (such as opening price and closing price); f(·) represents a mathematical formula, that is, the formulaized Alpha, which is responsible for converting the m-dimensional market data into a 1-dimensional Alpha value according to the formula. In addition, this method maintains an Alpha pool P, which records all the descendant Alphas generated by the algorithm process and is initialized to empty.
[0011] 2) Selection module, which is responsible for selecting g-1 Select two Alpha factors α r1 ,αr2 is used as the parent to generate the Alpha factor of the next generation. Using the roulette wheel selection strategy, the probability p of the i-th Alpha factor in the population being selected as the parent i Calculated by the following formula (c):
[0012]
[0013] Among them, s i Represents the fitness value of the i-th Alpha factor. This process embodies the principle of survival of the fittest. Alphas with higher fitness values have a greater probability of being selected for reproduction, thereby increasing the possibility of the next generation of Ag obtaining higher fitness values. In addition, it also allows the selection of alphas with lower fitness values, which helps reduce the risk of premature convergence to the local optimum.
[0014] 3) Evolutionary Thinking Chain Module, which will select the two parent Alpha factors α r1 ,α r2 Fill in the prompt template and guide the large language model to perform the following three steps step by step to generate the descendant Alpha factor α′:
[0015] 3.1: Large language model for parent Alpha factor αr1 ,α r2 Perform analysis and interpretation, including α r1 ,α r2 The structural composition and potential financial significance of the factors can help users understand the current factors more clearly and be used in the subsequent steps to assist the large language model in generating new descendant Alpha factors. analysis It is defined by the following formula (d):
[0016] e analysis =Analysis(α r1 ,α r2 ) (d).
[0017] Among them, α r1 ,α r2 is the selected parent Alpha factor, Analysis(·) is the prompt template for large language model analysis, e analysis Generating analytical explanations for large language models.
[0018] 3.2: Given the parent Alpha factor α r1 ,α r2 And the corresponding analysis explanation, the large language model will select fragments from the parent Alpha component and then recombine them to create the cross-Alpha factor α crossover , and generate the cross interpretation e by the following formula (e) crossover :
[0019] α crossover ,e crossover =Crossover(α r1 ,α r2 ,e analysis ) (e).
[0020] Among them, α r1 ,α r2 is the selected parent Alpha factor, e analysis is the analysis explanation generated in the previous step, Crossover(·) is the prompt template of the cross-parent Alpha factor of the large language model, α crossover The cross-alpha factor generated for the large language model, e crossover Cross-analysis of large language model generation.
[0021] 3.3: Alpha factor α after given crossover crossover , the large language model will mutate its fragments to generate the final offspring Alpha factor α′. This process is generated by the following formula (f) to explain the mutation e mutation :
[0022] α′,emutation =Mutation(α crossover ) (f).
[0023] Among them, α crossover is the newly generated cross-Alpha factor in the previous step, Mutation(·) is the prompt template of the newly generated Alpha factor of the large language model, α′ is the offspring Alpha factor generated by the large language model, e mutation Generative variation analysis for large language models.
[0024] 4) Code evaluator module, which is responsible for converting the generated offspring Alpha factor α′ into executable code and evaluating its fitness value. This module mainly includes the following two steps:
[0025] 4.1: The code generator first fills the descendant Alpha factor α′ into the prompt template to guide the large language model to generate executable code c, which is defined by the following formula (g):
[0026] c=Code_Generator(α′)(g).
[0027] Among them, α′ is the offspring Alpha factor generated by the large language model, Code_Generator(·) is the prompt template for the corresponding code generated by the large language model, and c is the corresponding code of the factor generated by the large language model.
[0028] 4.2: The code executor passes the training set to the code c and executes it. If the code reports an error, the error is recorded and sent back to the code generator for regeneration. The result of executing code c is the Alpha value of the offspring Alphaα′, so its IC with the stock return rate held for 20 days can be calculated as the fitness value s′, which is defined by the following formula (h):
[0029] s′=Code_Executor(α′,c,train set) (h).
[0030] Among them, α′ is the offspring Alpha factor generated by the large language model, c is the code generated corresponding to α′, train set is the training set data, Code_Executor(·) is the executor that executes code c on the training set train set to evaluate the offspring Alpha factor α′, and s′ is the fitness value of the offspring Alpha factor α′.
[0031] 5) Population update module, which is responsible for updating all the generated offspring Alpha and obtaining the next generation population A g , this module mainly includes the following two steps:
[0032] 5.1: The diversity detector checks the generated offspring Alphaα′. Specifically, it calculates the similarity between the currently generated offspring Alphaα′ and the Alpha factor in the Alpha pool P (i.e., the Alpha factor generated in the past), and is calculated by the following formula (i):
[0033]
[0034] Among them, α′ represents the Alpha value of the offspring Alphaα′ at time t, It represents the Alpha value of the i-th Alpha factor in the Alpha pool P at time t. Traverse all Alpha factors in the Alpha pool P, calculate the similarity between them and the currently generated offspring Alphaα′, set a threshold τ, once it exceeds, it is considered that the similarity is too high, and the offspring Alphaα′ is discarded; if the similarity between α′ and all Alpha factors in the Alpha pool P does not exceed the threshold, then the factor is retained and added to the candidate population A′ g and Alpha Pool P.
[0035] 5.2: Truncate and update the population, when the candidate population A′ g When the number of factors in is N, the candidate population A′ g and the current population A g- Merge and sort by fitness value from large to small, and finally keep only the Top-N Alpha factor as the next generation of population A g , the population A g It is defined by the following formula (j):
[0036] A g ←Top-N{A g-1 ,A′ g} (j).
[0037] Among them, A g-1 is the current Alpha factor population, A′ g is the candidate Alpha factor population, Top-N{·} means merging the two populations to retain N Alpha factors with high fitness values, A g The Alpha factor population for the next generation.
[0038] The steps 2) to 5) are iterated. Executing steps 2) to 4) once will generate an Alpha factor. The step 5) first performs a diversity check on the generated Alpha factor, and then checks whether the population update condition is met (i.e., whether N Alpha factors have been generated in this generation). If so, the population is updated and the next generation is started until the number of generations g reaches the pre-defined number of generations G. The iteration is terminated to obtain a large number of Alpha factors.
[0039] Compared with the prior art, the present invention has the following beneficial technical effects and significant technical progress:
[0040] 1) The present invention can generate a construction process and an explanation simultaneously when generating a formulated Alpha factor, which is easier for users to understand and effectively improves the user experience.
[0041] 2) The present invention utilizes the background knowledge and reasoning ability of the large language model to help the evolutionary algorithm reduce the search space, improve the optimization efficiency, and generate a more reasonable formulated Alpha factor.
[0042] 3) The present invention utilizes a large language model to convert the formulated Alpha factor into executable code, which is more convenient in evaluation, has a wider application, and has good application prospects and commercial development value. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further described in detail below in conjunction with specific embodiments and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art and are not particularly limited by the present invention.
[0045] See also Figure 1 , the present invention mainly comprises the following steps:
[0046] Step 1: Initialize the Alpha factor population module. This module evaluates and calculates the fitness values of 101 commonly used Alpha factors in the industry on the data set, sorts them, selects the Top-N Alpha factor as the initial population, and records it as A0. The algorithm iterates from g = 1 (where g represents the generation) until the predefined number of generations G is reached. The fitness function uses the correlation coefficient IC defined by the following formula (a):
[0047]
[0048] in, represents the stock return vector held for h days at time t, where n represents the number of stocks, Calculate the stock return rate of the i-th stock held for h days at time t for the following formula (b):
[0049]
[0050] Among them, α t =(α t,1 ,α t,2 ,…,α t,n ) represents the stock Alpha value vector at time t, where n represents the number of stocks, α t,i =f(X t,i ) represents the Alpha value of the i-th stock at time t, X t,i ∈R m represents the market data of the i-th stock at time t, which consists of m features (such as opening price and closing price); f(·) represents a mathematical formula, that is, the formulaized Alpha, which is responsible for converting the m-dimensional market data into a 1-dimensional Alpha value according to the formula. In addition, this method maintains an Alpha pool P, which records all the descendant Alphas generated by the algorithm process and is initialized to empty.
[0051] Step 2: From population A g-1 Select two Alpha factors α r1 ,α r2 As the parent, it is used to generate the Alpha factor of the next generation. Using the roulette wheel selection strategy, the probability p of the i-th Alpha factor in the population being selected as the parent i Calculated by the following formula (c):
[0052]
[0053] Among them, s i Represents the fitness value of the i-th Alpha factor. This process embodies the principle of survival of the fittest. Alphas with higher fitness values have a greater probability of being selected for reproduction, thereby increasing the possibility of the next generation of Ag obtaining higher fitness values. In addition, it also allows the selection of alphas with lower fitness values, which helps reduce the risk of premature convergence to the local optimum.
[0054] Step 3: The two parent Alpha factors α will be selected r1 ,α r2 The descendant Alpha factor α′ is generated through the evolutionary thinking chain. Specifically, the parent Alpha factor α r1 ,α r2 It will be filled into the prompt template, guiding the large language model to perform the following three steps step by step to generate the descendant Alpha factor α′.
[0055] 1) The large language model first needs to adjust the parent Alpha factor α r1 ,α r2 Perform analysis and interpretation, including α r1 ,α r2 The structural composition and potential financial significance of the factors can help users understand the current factors more clearly and be used in the subsequent steps to assist the large language model in generating new descendant Alpha factors. analysis It is defined by the following formula (d):
[0056] e analysis =Analysis(α r1 ,α r2 ) (d).
[0057] Among them, α r1 ,α r2 is the selected parent Alpha factor, Analysis(·) is the prompt template for large language model analysis, e analysis Generating analytical explanations for large language models.
[0058] 2) Given the parent Alpha factor α r1 ,α r2 And the corresponding analysis explanation, the large language model will select fragments from the parent Alpha component and then recombine them to create the cross-Alpha factor α crossover , and generate the cross interpretation e by the following formula (e) crossover :
[0059] α crossover ,e crossover =Crossover(α r1 ,α r2 ,e analysis ) (e).
[0060] Among them, α r1 ,α r2 is the selected parent Alpha factor, e analysis is the analysis explanation generated in the previous step, Crossover(·) is the prompt template of the cross-parent Alpha factor of the large language model, α crossover The cross-alpha factor generated for the large language model, e crossover Cross-analysis of large language model generation.
[0061] 3) Given the Alpha factor α′ after crossover, the large language model will mutate its fragments to generate the final offspring Alpha factor α′. This process is generated by the following formula (f) to explain the mutation e mutation :
[0062] α′,e mutation =Mutation(α crossover ) (f).
[0063] Among them, α crossover is the newly generated cross-Alpha factor in the previous step, Mutation(·) is the prompt template of the newly generated Alpha factor of the large language model, α′ is the offspring Alpha factor generated by the large language model, e mutation Generative variation analysis for large language models.
[0064] Step 4: The code evaluator module converts the generated offspring Alpha factor α′ into executable code and evaluates its fitness value. This module mainly has the following two steps:
[0065] 1) The code generator first fills the descendant Alpha factor α′ into the prompt template to guide the large language model to generate executable code c, which is defined by the following formula (g):
[0066] c=Code_Generator(α′)(g).
[0067] Among them, α′ is the offspring Alpha factor generated by the large language model, Code_Generator(·) is the prompt template for the corresponding code generated by the large language model, and c is the corresponding code of the factor generated by the large language model.
[0068] 2) The code executor passes the training set to the code c and executes it. If the code reports an error, the error is recorded and sent back to the code generator for regeneration. The result of executing code c is the Alpha value of the offspring Alphaα′, so its IC with the stock return rate held for 20 days can be calculated as the fitness value s′, which is defined by the following formula (h):
[0069] s′=Code_Executor(α′,c,train set) (h).
[0070] Among them, α′ is the offspring Alpha factor generated by the large language model, c is the code generated corresponding to α′, train set is the training set data, Code_Executor(·) is the executor that executes code c on the training set train set to evaluate the offspring Alpha factor α′, and s′ is the fitness value of the offspring Alpha factor α′.
[0071] Step 5: Population update module, which is responsible for updating all the generated offspring Alpha and obtaining the next generation population A gThis module mainly consists of the following two steps:
[0072] 1) The diversity detector checks the generated offspring Alphaα′, specifically, it calculates
[0073] The similarity between the currently generated offspring Alphaα′ and the Alpha factor in the Alpha pool P (i.e., the Alpha factor generated in the past) is calculated by the following formula (i):
[0074]
[0075] Among them, α′ represents the Alpha value of the offspring Alphaα′ at time t, It represents the Alpha value of the i-th Alpha factor in the Alpha pool P at time t. Traverse all Alpha factors in the Alpha pool P, calculate the similarity between them and the currently generated offspring Alphaα′, set a threshold τ, once it exceeds, it is considered that the similarity is too high, and the offspring Alphaα′ is discarded; if the similarity between α′ and all Alpha factors in the Alpha pool P does not exceed the threshold, then the factor is retained and added to the candidate population A′ g and Alpha Pool P.
[0076] 2) Truncate and update the population, when the candidate population A′ g When the number of factors in is N, the candidate population A′ g and the current population A g-1 Merge and sort by fitness value from large to small, and finally keep only the Top-N Alpha factor as the next generation of population A g , the population A g It is defined by the following formula (j):
[0077] A g ←Top-N{A g-1 ,A′ g} (j).
[0078] Among them, A g-1 is the current Alpha factor population, A′ g is the candidate Alpha factor population, Top-N{·} means merging the two populations to retain N Alpha factors with high fitness values, A g The Alpha factor population for the next generation.
[0079] The steps 2 to 5 are iterated. Executing steps 2 to 4 once will generate an Alpha factor. Step 5 first performs a diversity test on the generated Alpha factor, and then checks whether the population update condition is met (i.e., whether N Alpha factors have been generated in this generation). If so, the population is updated and the next generation is started.
[0080] The above is only a further explanation of the present invention and is not intended to limit this patent. Any equivalent implementation of the present invention should be included in the scope of the claims of this patent.
Claims
1. A method for constructing an evolutionary framework for large language model enhancement for formula alpha factor mining, characterized in that: The background knowledge and reasoning ability of the large language model are used to guide the evolution process, generate a formulaic Alpha factor, and provide information for trading decisions in quantitative trading. The method specifically includes the following steps: 1) Initialize the Alpha factor population module The 101 Alpha factors commonly used in the stock industry are evaluated on the data set and their fitness values are calculated. Then they are sorted and the Top-N Alpha factors are selected as the initial population A. The iterative evolution starts from g=1 until a predefined number of generations G is reached, where g represents the generation. The fitness value uses the correlation coefficient IC defined by the following formula (a): in, is the stock return vector held for h days at time t; n is the number of stocks, Calculate the stock return rate of the i-th stock held for h days at time t for the following formula (b): Where α=(α , ,α , ,…,α ,n ) is the stock Alpha value vector at time t; n is the number of stocks; α ,& =f(X ,& ) is the Alpha value of the i-th stock at time t; X ,& ∈R 7 is the market data of the ith stock at time t, which consists of m features; f(·) represents a mathematical formula, i.e., the formulated Alpha, which converts the m-dimensional market data into a 1-dimensional Alpha value according to the formula; 2) Parent selection and probability calculation Use the selection module to select :1 Select two Alpha factors α ; ,α ; As the parent generation, it is used to generate the Alpha factor of the subsequent generation, using the roulette wheel selection strategy. :1 The probability p that the i-th Alpha factor is selected as the parent & Calculated by the following formula (c): Among them, s & Represents the fitness value of the i-th Alpha factor; 3) Descendant Alpha Factor α A Generation The two parent Alpha factors α will be selected using the Evolutionary Thinking Chain module ; ,α ; Fill in the prompt template to guide the large language model to generate the offspring Alpha factor α A , the specific process is as follows: 3.1: Large language model to parent Alpha factor α ; ,α ; The structural composition and potential financial significance of the analysis and interpretation are used to assist the large language model in generating new offspring Alpha factors. e CDCEFGHG It is defined by the following formula (d): e CDCEFGHG =Analysis(a ; ,a ; ) (d); Among them, α ; ,α ; is the selected parent Alpha factor; Analysis(·) is the prompt template for large language model analysis; e CDCEFGHG Analytical explanations generated for large language models; 3.2: According to the parent Alpha factor α ; ,α ; And its corresponding analysis explanation, the large language model selects fragments from the parent Alpha component and recombines them to create the cross-Alpha factor α MNOGGOPQN , and generate cross-interpretation e (;*++*S,; , and is defined by the following formula (e): a MNOGGOPQN ,e (;*++*S,; =Crossover(a ; ,a ; ,e CDCEFGHG ) (e); Among them, α ; ,α ; is the selected parent Alpha factor; e CDCEFGHG The analysis explanation generated for the large language model; Crossover(·) is the prompt template for the crossover parent Alpha factor of the large language model; α MNOGGOPQN Cross-Alpha factor generated for large language models; e MNOGGOPQN Cross-analysis generated for large language models; 3.3: According to the Alpha factor α after crossover MNOGGOPQN , the large language model will select the segment for mutation and generate the offspring Alpha factor α A , and generate the variation explanation e 7V W&*n , and is defined by the following formula (f): a A ,e 7V W &*n =Mutation(a MNOGGOPQN ) (f); Among them, α MNOGGOPQN is the cross-Alpha factor generated by the large language model; Mutation(·) is the prompt template of the newly generated Alpha factor of the large language model mutation; α A The descendant Alpha factor generated for the large language model; e Z[C HOD Generate variation analysis for large language models; 4) Fitness value s A Calculation Use the code evaluator module to generate the offspring Alpha factor α A Converting into executable code and evaluating its fitness value includes the following steps: 4.1: Use the code generator to factor the descendant Alpha A Fill in the prompt template and guide the large language model to generate the code c represented by the following formula (g): c=Code_Generator(a A ) (g); Among them, α A is the descendant Alpha factor generated by the large language model; Code_Generator(·) is the prompt template for generating the corresponding code for the large language model; c is the corresponding code of the factor generated by the large language model; 4.2: The code executor passes the training set to the code c and executes it. If the code reports an error, it records the error and returns it to the code generator for regeneration. The result after executing code c is the offspring Alphaα A The Alpha value is calculated by the following formula (h) and the IC of the stock return rate held for 20 days is used as the fitness value s A : s A =Code_Executor(a A ,c,train set) (h); Among them, α A Alpha factor of the offspring generated by the large language model; c is the corresponding α A Generated code; train set is the training set data; Code_Executor(·) is the code c executed on the training set train set to evaluate the offspring Alpha factor α A Actuator A Alpha factor α A The fitness value of 5) Population A of the next generation : produce Use the population update module to update all descendants Alpha and get the population A of the next generation : The process specifically includes the following steps: 5.1: Use diversity detector to generate offspring Alphaα A Check and calculate the currently generated offspring Alphaα by the following formula (i) A The similarity between mutIC and the Alpha factor in the Alpha pool P is: Among them, α A For the descendant Alphaα A Alpha value at time t; α & is the Alpha value of the i-th Alpha factor in the Alpha pool P at time t; Traverse all the Alpha factors in the Alpha pool P and compare them with the currently generated child Alphaα A Calculate the similarity. If it exceeds the set threshold τ, then the offspring Alphaα is considered A If the similarity is too high, the factor is discarded; if α A If the similarity with all Alpha factors in Alpha pool P does not exceed the set threshold τ, then the factor is retained and added to the candidate population A. A : and Alpha pool P; 5.2 Truncation update population, when candidate population A A : When the number of factors in is N, the candidate population A A : and the current population A :1 Merge and sort according to the fitness value from large to small, and finally keep only the Top-N Alpha factor as the population A of the next generation : , and is expressed by the following formula (j): A : ←Top-N{A :1 ,A A : }(j); Among them, A :1 is the current Alpha factor population; A A : is the candidate Alpha factor population; Top-N{·} means merging two populations and retaining N Alpha factors with high fitness values; A : The Alpha factor population for the next generation; 6) Iteratively generate Alpha factor The above steps 2) to 5) will be iterated. Executing steps 2) to 4) once will generate an Alpha factor. Step 5) performs diversity detection on the generated Alpha factor. If the population update conditions are met, the population is updated and the next generation is started until the number of generations g reaches the pre-defined number of generations G. The iteration is terminated to obtain a large number of Alpha factors.
2. The method for constructing a large language model-enhanced evolutionary framework for formula alpha factor mining according to claim 1, characterized in that: The Alpha pool P records all descendant Alphas generated by the algorithm process and is initialized to be empty.
3. The method for constructing a large language model-enhanced evolutionary framework for formula alpha factor mining according to claim 1, characterized in that: In the parent selection of step 2), Alpha with higher fitness value has a greater probability of being selected for reproduction, thereby increasing the possibility of the next generation Ag obtaining a higher fitness value, and it also allows the selection of Alpha with lower fitness value to reduce the risk of premature convergence to the local optimum.
4. The method for constructing a large language model-enhanced evolutionary framework for formula alpha factor mining according to claim 1, characterized in that: The Alpha factor is modeled by characteristic data of the opening price and closing price of the stock market.
Citation Information
Cited By
Security industry large-scale model factor mining and back-testing method based on credential executable environment
CN120705192A