Intelligent multi-factor investment and research method based on large model

Through automated factor mining and optimization of large language models and genetic algorithms, combined with machine learning and deep learning, the complexity and low efficiency of the factor selection and combination process of traditional multi-factor models are solved, and more efficient and scientific investment decisions and strategies are achieved. Build.

CN118674549APending Publication Date: 2024-09-20上海恺域信息科技有限公司
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410721913.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Traditional multi-factor models rely on experience and subjective judgment in the factor selection and combination process, and the optimization process is complex and inefficient, making it difficult to respond in real time in a rapidly changing market environment.

Method used

It uses large language models and genetic algorithms to automate factor mining, screening and combination, dynamically optimize factor weights based on real-time data, and combine machine learning and deep learning algorithms to build adaptive investment strategies.

Benefits of technology

It improves the efficiency of factor research and investment decision-making, reduces the complexity of manual operations, enhances the scientificity and transparency of factor selection and optimization, and improves the execution efficiency and quality of investment strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674549A
    Figure CN118674549A
Patent Text Reader

Abstract

The invention relates to the related field of financial technology, in particular to an intelligent multi-factor investment and research method based on a large model, and the intelligent multi-factor investment and research platform based on the large model can intelligently generate factors according to the investment concept of a user, carry out factor combination, and then generate an investment combination. In a factor generation stage, an AI full-automatic factor mining process is adopted, the advantages of a large language model (LLM) and a leading edge large model framework LangChain are brought into full play, factors can be automatically mined according to the thought of a researcher, automation of the whole process of factor generation, factor optimization, factor back test and evaluation and the like is achieved, and therefore powerful enabling is provided for quantitative investment. And after the factors are intelligently generated, factor information is applied in a mode of generating a factor combination, and the factor information is used in actual stock selection investment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to fields related to financial technology, and specifically to an intelligent multi-factor investment research method based on a large model. Background Art

[0002] In the traditional practice of securities investment analysis, multi-factor models have become a core quantitative tool that guides investment decisions by integrating different investment factors to score and rank securities. These factors usually include but are not limited to indicators of multiple dimensions such as value, momentum, scale, profitability, etc. The weight of each factor in the model reflects the degree of their influence on the security score. In this way, the multi-factor model aims to capture the complexity and regularity of the securities market and provide investors with a relatively scientific investment decision-making tool.

[0003] However, there are many challenges in the traditional multi-factor model construction and optimization process. First, the selection and combination of factors often need to be based on the experience and market insights of investment managers, which not only relies on personal subjective judgment, but is also very complicated and cumbersome in operation. In addition, once the factors are selected, a large amount of data processing and statistical analysis is required to optimize the weight distribution of these factors. This process is usually time-consuming and inefficient, and it is difficult to respond in real time in a rapidly changing market environment.

[0004] With the rapid development of artificial intelligence technology, especially large language models (LLMs), the ability of artificial intelligence technology in understanding natural language and processing big data has been significantly improved, bringing new opportunities for financial investment analysis. These advanced AI models can automatically extract information from a large amount of financial literature, news reports and data records, and generate investment-related insights and recommendations based on this information, thereby realizing automated investment research and analysis to a certain extent.

[0005] In particular, in the process of building and optimizing multi-factor models, the semantic understanding and data processing capabilities of large language models are expected to automatically complete the mining, screening and combination of factors, while dynamically optimizing factor weights based on real-time data, greatly improving the construction efficiency and response speed of multi-factor investment strategies. This not only reduces the complexity of manual operations, but also makes the selection and optimization process of factors more scientific, reasonable and transparent, improves the quality of investment decisions and the execution efficiency of investment strategies, and opens up new paths for quantitative investment and strategy research.

[0006] In addition, by utilizing the intelligent features of big model technology, the application of multi-factor models in securities investment analysis can be further expanded, such as introducing more diverse and cutting-edge factors, such as sentiment factors based on text analysis, association factors based on network analysis, etc. These are new areas that are difficult to involve or handle with traditional methods. Therefore, big model technology not only solves the practical challenges in the multi-factor investment research process, but also brings innovative perspectives and methods to the field of securities investment analysis. Summary of the invention

[0007] The purpose of the present invention is to provide an intelligent multi-factor investment research method based on a large model to solve the problems raised in the above background technology.

[0008] To achieve the above object, the present invention provides the following technical solution: an intelligent multi-factor investment research method based on a large model, comprising the following steps:

[0009] Step S1, input ideas: Researchers input factor generation ideas into the idea input box of the system according to their own research ideas;

[0010] Step S2, Generate Seed: Call the OpenAI Large Language Model LLM interface to parse the input idea, collect investment field content based on the training knowledge base, and return a set of seed alpha expressions and corresponding Python codes;

[0011] Step S3, generating a symbol library: using LLM to randomly generate a set of symbol libraries each time, which will be used as a fund in the subsequent genetic algorithm;

[0012] Step S4, optimization training: adopt genetic algorithm, take the symbol in step S3 and the alpha seed expression in step S2 as genes, use factor IC value as evaluation function, perform iterative optimization, automatically generate Python calculation code according to the individual expression generated each time, and automatically connect to the database to extract corresponding data based on LangChain framework, automatically execute factor calculation code, and provide feedback for the code blocks that cannot be executed until they can be run. After the training is completed, output the factor expression sorted by factor IC value;

[0013] Step S5, factor backtesting: According to the factor expressions sorted by IC values ​​in step S4, the top three factors with IC values ​​are selected as output, and the factor backtesting yield, factor annualized yield, and Sharpe ratio are calculated simultaneously to evaluate the factor performance;

[0014] Step S6: Factor combination strategy construction: The factors generated in step S5 are applied to AI factor synthesis. The AI ​​factors are optimized together with other non-AI generated factors using machine learning and deep learning algorithms to construct an adaptive investment strategy.

[0015] Step S7: According to the investment strategy in step S6, select the model with better performance to build an investment portfolio. At the same time, the system supports deep learning algorithm simulation portfolio backtesting to support investment decisions.

[0016] Preferably, in step S1, the researcher inputs his own idea statement, and the statement will be restricted and supplemented in the algorithm to ensure that the idea is in the field of financial investment rather than other fields. Specifically, "You are a quantitative investment assistant in the financial field, helping researchers test investment ideas" is added before the input statement, and the statement is restricted and supplemented to make the LLM output more accurate.

[0017] Preferably, the symbol library in step S3 includes commonly used time series processing functions and mathematical symbols.

[0018] Preferably, the machine learning and deep learning algorithms in step S6 specifically include the following: the machine learning algorithm selects the XGboost algorithm, and the deep learning algorithm selects the BP fully connected neural network. Specifically, the factors are first subjected to feature engineering processing, and then the factors are placed in the corresponding learning model framework and repeatedly trained according to a set optimal standard. The training target is the stock return rate in the next cycle. After repeated adjustment of hyperparameters and activation functions and optimization of the network structure, the optimal structure that can fit the return within the sample and the corresponding factor weight combination are finally found to perform return prediction.

[0019] Compared with the prior art, the present invention has the following beneficial effects: the present invention can generate factors in batches, and the factor mining efficiency is high; the factor effectiveness is strong, and the factors output each time are optimized by the machine learning algorithm; the factor diversity is strong, even if the same idea is input, the factors output each time are different, and the diversity of factors is guaranteed based on the powerful knowledge base of the large model; the system integrates a rich deep learning algorithm for users to freely choose and compare; it is simple to use and has a user-friendly interface. Factors can be generated by simply describing the idea, and the factor combination page only needs to enter the prediction target and select the deep learning algorithm to achieve it. It can also be easily used by researchers without a quantitative background. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] See also Figure 1 The present invention provides a technical solution: an intelligent multi-factor investment research method based on a large model, comprising the following steps:

[0023] Step S1, input ideas: Researchers input factor generation ideas into the idea input box of the system according to their own research ideas;

[0024] Step S2, Generate Seed: Call the OpenAI Large Language Model LLM interface to parse the input idea, collect investment field content based on the training knowledge base, and return a set of seed alpha expressions and corresponding Python codes;

[0025] Step S3, generating a symbol library: using LLM to randomly generate a set of symbol libraries each time, which will be used as a fund in the subsequent genetic algorithm;

[0026] Step S4, optimization training: adopt genetic algorithm, take the symbol in step S3 and the alpha seed expression in step S2 as genes, use factor IC value as evaluation function, perform iterative optimization, automatically generate Python calculation code according to the individual expression generated each time, and automatically connect to the database to extract corresponding data based on LangChain framework, automatically execute factor calculation code, and provide feedback for the code blocks that cannot be executed until they can be run. After the training is completed, output the factor expression sorted by factor IC value;

[0027] Step S5, factor backtesting: According to the factor expressions sorted by IC values ​​in step S4, the top three factors with IC values ​​are selected as output, and the factor backtesting rate of return, factor annualized rate of return, and Sharpe ratio are calculated simultaneously to evaluate the factor performance;

[0028] Step S6: Factor combination strategy construction: The factors generated in step S5 are applied to AI factor synthesis. The AI ​​factors are optimized together with other non-AI generated factors using machine learning and deep learning algorithms to construct an adaptive investment strategy.

[0029] Step S7: According to the investment strategy in step S6, select the model with better performance to build an investment portfolio. At the same time, the system supports deep learning algorithm simulation portfolio backtesting to support investment decisions.

[0030] Furthermore, in step S1, the researcher inputs his or her own idea statement, which will be restricted and supplemented in the algorithm to ensure that the idea is in the field of financial investment rather than other fields. Specifically, "You are a quantitative investment assistant in the financial field, helping researchers test investment ideas" is added before the input statement. Restrictions and supplements are made in the statement to make the LLM output more accurate.

[0031] Furthermore, the symbol library in step S3 includes commonly used time series processing functions and mathematical symbols.

[0032] Furthermore, the machine learning and deep learning algorithms in step S6 specifically include the following: the machine learning algorithm selects the XGboost algorithm, and the deep learning algorithm selects the BP fully connected neural network. Specifically, the factors are first subjected to feature engineering, and then the factors are placed in the corresponding learning model framework and repeatedly trained according to a set optimal standard. The training target is the stock return rate in the next cycle. After repeated adjustment of hyperparameters and activation functions and optimization of the network structure, the optimal structure that can fit the return within the sample and the corresponding factor weight combination are finally found to perform return prediction.

[0033] The present invention uses a large language model and cutting-edge technology LangChain to automatically generate and optimize investment factors, and the system significantly improves the efficiency of factor research and investment decision-making. The automated process reduces manual intervention, making the process of factor generation, optimization and backtesting faster and more efficient; the automated factor generation and optimization process reduces the errors caused by human selection and bias in traditional methods, and improves the objectivity and scientificity of investment strategies; the system can handle a large number of complex data sets, and use the powerful computing power of large models for in-depth analysis, so as to discover imperceptible market trends and investment opportunities; the system supports multiple model types, such as BP neural network and Xgboost, to provide users with a variety of investment model options and enhance the adaptability and flexibility of strategies; through continuous training and optimization of factors, as well as real-time prediction and backtesting, the system can effectively improve the performance of the investment portfolio, including improving key investment indicators such as annualized rate of return and Sharpe ratio.

[0034] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An intelligent multi-factor investment research method based on a large model, characterized in that: The following steps are involved: Step S1, input ideas: Researchers input factor generation ideas into the idea input box of the system according to their own research ideas; Step S2, Generate Seed: Call the OpenAI Large Language Model LLM interface to parse the input idea, collect investment field content based on the training knowledge base, and return a set of seed alpha expressions and corresponding Python codes; Step S3, generating a symbol library: using LLM to randomly generate a set of symbol libraries each time, which will be used as a fund in the subsequent genetic algorithm; Step S4, optimization training: adopt genetic algorithm, take the symbol in step S3 and the alpha seed expression in step S2 as genes, use factor IC value as evaluation function, perform iterative optimization, automatically generate Python calculation code according to the individual expression generated each time, and automatically connect to the database to extract corresponding data based on LangChain framework, automatically execute factor calculation code, and provide feedback for the code blocks that cannot be executed until they can be run. After the training is completed, output the factor expression sorted by factor IC value; Step S5, factor backtesting: According to the factor expressions sorted by IC values ​​in step S4, the top three factors with IC values ​​are selected as output, and the factor backtesting rate of return, factor annualized rate of return, and Sharpe ratio are calculated simultaneously to evaluate the factor performance; Step S6: Factor combination strategy construction: The factors generated in step S5 are applied to AI factor synthesis. The AI ​​factors are optimized together with other non-AI generated factors using machine learning and deep learning algorithms to construct an adaptive investment strategy. Step S7: According to the investment strategy in step S6, select the model with better performance to build an investment portfolio. At the same time, the system supports deep learning algorithm simulation portfolio backtesting to support investment decisions.

2. The intelligent multi-factor investment research method based on a large model according to claim 1, characterized in that: In step S1, the researcher inputs his own idea statement, and the algorithm will restrict and supplement the statement to ensure that the idea is in the field of financial investment rather than other fields. Specifically, add "You are a quantitative investment assistant in the financial field, helping researchers test investment ideas" before the input statement, and restrict and supplement the statement to make the LLM output more accurate.

3. The intelligent multi-factor investment research method based on a large model according to claim 1, characterized in that: The symbol library in step S3 includes commonly used time series processing functions and mathematical symbols.

4. The intelligent multi-factor investment research method based on a large model according to claim 1, characterized in that: The machine learning and deep learning algorithms in step S6 specifically include the following: the machine learning algorithm uses the XGboost algorithm, and the deep learning algorithm uses the BP fully connected neural network. Specifically, the factors are first subjected to feature engineering, and then the factors are placed in the corresponding learning model framework and repeatedly trained according to a set optimal standard. The training target is the stock return rate in the next cycle. After repeated adjustments of hyperparameters and activation functions and optimization of the network structure, the optimal structure that can fit the returns within the sample and the corresponding factor weight combination are finally found to perform return prediction.

Citation Information

Cited By

  • Intelligent financial engineering quantitative research and reproduction method and related assembly

    CN120258995A

  • Security industry large-scale model factor mining and back-testing method based on credential executable environment

    CN120705192A

  • Security industry large model factor mining and back testing method based on xinyuan executable environment

    CN120705192B