Security industry large model factor mining and back testing method based on xinyuan executable environment
By automatically identifying and evaluating trading factors through large language models and code generation technology, this technology solves the problem of inefficient trading factor mining in existing technologies, and achieves efficient and accurate factor positioning and backtesting, which is suitable for automated analysis in the securities and futures fields.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SINOLINK SECURITIES CO LTD
- Filing Date
- 2025-05-30
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies rely on manual analysis for the discovery of trading factors, which is inefficient, costly, and has limited accuracy. They also struggle to handle complex nonlinear relationships and cannot meet the needs of massive data analysis and real-time decision-making in the securities and futures industries.
By using a large language model to identify trading factors from financial research reports, generating factor calculation codes, and backtesting through a historical market database, the effectiveness of the factors is evaluated by combining preset strategy testing methods, and the results are displayed to achieve automated trading factor mining and backtesting.
It enables automatic mining and backtesting of trading factors, improving the efficiency and accuracy of factor positioning. It automatically generates code, automates the backtesting process, adapts to market changes, and reduces labor costs.
Smart Images

Figure CN120705192B_ABST
Abstract
Description
A Method for Factor Mining and Backtesting of Large-Scale Securities Industry Models Based on Domestic Information Technology Innovation (CIITC) Execution Environment Technical Field
[0001] This invention relates to the field of big data technology, and in particular to a method for factor mining and backtesting of large-scale models in the securities industry based on a domestically developed executable environment. Background Technology
[0002] In the securities and futures industry, trading factors are a class of indicators or characteristics used for quantitative analysis and prediction of market trends, evaluation of investment strategy effectiveness, and optimization of trading decisions, playing a crucial role. Currently, the discovery of trading factors mainly relies on professional researchers reading and analyzing large amounts of financial research reports and data, extracting trading factors based on their personal experience. This approach suffers from limitations such as low efficiency, high labor costs, accuracy restricted by personal experience, and difficulty in handling complex nonlinear relationships, making it difficult to meet the current demands of the securities and futures industry for massive data analysis and real-time decision-making. Summary of the Invention
[0003] The purpose of this invention is to provide a method for factor mining and backtesting of large-scale models in the securities industry based on an information technology-based executable environment. This method can automatically mine and backtest trading factors in research reports, improve the efficiency and accuracy of factor positioning, and automatically generate factor calculation code to automate the backtesting process.
[0004] To address the aforementioned technical problems, this invention provides a method for factor mining and backtesting of large-scale models in the securities industry based on an information technology-enabled executable environment, comprising:
[0005] After preprocessing the obtained financial research report, it is input into a large language model. The large language model is then used to identify trading factors from the financial research report and extract the descriptive information of the trading factors.
[0006] The description information of the trading factor is input into the code generation model, and the code generation model is used to generate factor calculation code for the trading factor based on the description information.
[0007] Based on the description information of the trading factor, historical data required for backtesting the trading factor is extracted from the historical market database. The factor calculation code is called to traverse the historical data to obtain the factor value of the trading factor under the historical data. The trading factor is evaluated based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the trading factor.
[0008] The trading factors and their evaluation metrics are displayed on the client through a visual interface.
[0009] Optionally, the step of using the large language model to identify trading factors from the financial research report and extracting descriptive information of the trading factors includes:
[0010] By using pre-set prompts to engage in multiple rounds of dialogue with the large language model, the large language model is guided to perform semantic analysis and understanding of the entire content of the financial research report. The research report content summary, chapter structure, and incremental information are extracted from the financial research report. The trading factors in the incremental information are identified, and the descriptive information of the trading factors is extracted from the financial research report.
[0011] Optionally, the description information of the trading factor includes the name of the trading factor, its financial meaning, calculation method, the data indicators involved in calculating the trading factor and the parameter description of each data indicator, and the mathematical expression or pseudocode of the trading factor.
[0012] Optionally, after generating factor calculation code for the trading factor based on the description information using the code to generate a large model, the method further includes:
[0013] The factor calculation code is subjected to syntax checks and unit tests, and the factor calculation code is adjusted based on the results of the syntax checks and unit tests until the results of the syntax checks and unit tests of the factor calculation code meet the preset code qualification requirements. Then, the step of extracting the historical data required for backtesting the trading factor from the historical market database based on the description information of the trading factor is taken.
[0014] Optionally, the evaluation index for assessing the effectiveness of the trading factor by using a preset strategy testing method based on the factor value includes:
[0015] The stocks in the stock pool are sorted according to the factor values corresponding to each stock in the target order. A long-short portfolio is constructed based on the sorting results. The long-short portfolio is backtested historically, and the cumulative return, annualized return, volatility, maximum drawdown and win rate of the long-short portfolio are calculated. The cumulative return is compared with the benchmark return to obtain the excess return, relative win rate and excess maximum drawdown.
[0016] Calculate the information coefficient and average information coefficient of the trading factor, so as to assess the correlation between the trading factor and future returns through the information coefficient of the trading factor, and assess the stability of the information coefficient through the average information coefficient;
[0017] The cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient of the long-short portfolio are used as the evaluation indicators.
[0018] To address the aforementioned technical problems, this invention also provides a securities industry large-scale model factor mining and backtesting system based on an information technology-enabled executable environment, comprising:
[0019] The factor mining module is used to preprocess the obtained financial research report and input it into the large language model, and use the large language model to identify trading factors from the financial research report and extract the descriptive information of the trading factors.
[0020] The factor code generation module is used to input the description information of the trading factor into the code generation model, and use the code generation model to generate factor calculation code for the trading factor based on the description information;
[0021] The backtesting and evaluation module is used to extract historical data required for backtesting the trading factor from the historical market database based on the description information of the trading factor, call the factor calculation code to traverse the historical data to obtain the factor value of the trading factor under the historical data, and use a preset strategy verification method to evaluate the trading factor based on the factor value to obtain an evaluation index for evaluating the effectiveness of the trading factor.
[0022] The results interaction module is used to display the trading factors and their evaluation indicators on the client through a visual interface.
[0023] Optionally, the factor mining module is specifically used for:
[0024] After preprocessing the obtained financial research report, it is input into a large language model. Using pre-set prompts, the large language model engages in multiple rounds of dialogue to guide it in semantic analysis and understanding of the entire content of the financial research report. The model extracts the research report summary, chapter structure, and incremental information from the report, identifies trading factors in the incremental information, and extracts descriptive information of these trading factors from the report.
[0025] Optional backtesting and evaluation modules include:
[0026] The historical data extraction module is used to extract historical data required for backtesting the trading factors from the historical market database based on the description information of the trading factors.
[0027] The factor value calculation module is used to call the factor calculation code to traverse the historical data to obtain the factor value of the trading factor under the historical data.
[0028] The evaluation module is used to sort stocks in the stock pool according to the target order based on the factor values corresponding to each stock, construct a long-short portfolio based on the sorting results, perform historical backtesting on the long-short portfolio, and calculate the cumulative return, annualized return, volatility, maximum drawdown, and win rate of the long-short portfolio. It then compares the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown. The module also calculates the information coefficient and average information coefficient of the trading factors to assess the correlation between the trading factors and future returns, and the average information coefficient to assess the stability of the information coefficient. The cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient of the long-short portfolio are used as the evaluation indicators.
[0029] To address the aforementioned technical problems, this invention also provides a large-scale model factor mining and backtesting device for the securities industry based on an information technology-enabled executable environment, comprising:
[0030] Memory, used to store computer programs;
[0031] A processor is used to implement any of the steps of the above-mentioned securities industry large model factor mining and backtesting method based on the information technology innovation executable environment when executing the computer program.
[0032] To solve the above-mentioned technical problems, the present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for factor mining and backtesting of a large-scale securities industry model based on an information technology innovation executable environment.
[0033] The beneficial effects of this invention lie in providing a method for factor mining and backtesting in the securities industry based on a domestically developed executable environment. This method includes: identifying trading factors from financial research reports and extracting their descriptive information using a large language model; generating factor calculation codes for the identified trading factors using a code generation model; backtesting the trading factors using the factor calculation codes and historical data from a historical market database to obtain factor values; evaluating the trading factors based on their factor values using a preset strategy verification method to obtain evaluation indicators for assessing the effectiveness of the trading factors; and displaying the trading factors and their evaluation indicators on a client-side interface. By leveraging the powerful natural language understanding and code generation capabilities of the large model, the method achieves automatic mining and backtesting of trading factors in research reports, improving the efficiency and accuracy of factor positioning, and automatically generating factor calculation codes to automate the backtesting process. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 is the first flowchart of the securities industry large model factor mining and backtesting method based on the information technology innovation executable environment provided by the present invention;
[0036] Figure 2 is the second flowchart of the securities industry large model factor mining and backtesting method based on the information technology innovation executable environment provided by the present invention;
[0037] Figure 3 is a schematic diagram of the first structure of the securities industry large model factor mining and backtesting system based on the information technology innovation executable environment provided by the present invention;
[0038] Figure 4 is a schematic diagram of the second structure of the securities industry large model factor mining and backtesting system based on the information technology innovation executable environment provided by the present invention;
[0039] Figure 5 is a schematic diagram of the structure of the securities industry large model factor mining and backtesting device based on the information technology innovation executable environment provided by the present invention. Detailed Implementation
[0040] The core of this invention is to provide a method for factor mining and backtesting of large-scale models in the securities industry based on an information technology-enabled executable environment. This method can automatically mine and backtest trading factors in research reports, improve the efficiency and accuracy of factor positioning, and automatically generate factor calculation code to automate the backtesting process.
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Please refer to Figure 1, which is the first flowchart of the securities industry large-scale model factor mining and backtesting method based on the information technology innovation executable environment provided by the present invention. The method includes:
[0043] S101. After preprocessing the obtained financial research report, input it into the large language model and use the large language model to identify trading factors from the financial research report and extract the descriptive information of the trading factors.
[0044] Financial research reports in the securities and futures industry analyze specific securities or futures markets, products, or industries. These reports typically include market overviews, technical analysis, risk assessments, and investment recommendations. Trading factors refer to various indicators or characteristics used in futures or stock derivatives trading to quantitatively analyze market trends, price fluctuations, risk control, and investment decisions. Identifying explicit or implicit trading factors in financial research reports is crucial for helping investors identify potential trading opportunities, optimize portfolios, and improve profitability.
[0045] This invention provides a financial research report as input to a large language model (e.g., a financial research report uploaded as a PDF or text file via a graphical user interface). The large language model reads the financial research report and performs preprocessing (including format parsing, segmentation, and key information extraction) to prepare for subsequent analysis. Then, the large language model identifies trading factors from the preprocessed financial research report and extracts descriptive information about these factors (e.g., the calculation method or construction process of the trading factors, mathematical expressions, or pseudocode, facilitating the generation of factor backtesting code based on the descriptive information). Preferably, a multi-turn dialogue strategy using prompts can be used to gradually guide the large language model to complete the task of mining trading factors. Subsequent embodiments will describe the process of the large language model mining trading factors in detail, which will not be elaborated here.
[0046] This invention fully leverages the powerful semantic understanding, contextual learning, and rapid extraction of key information from massive amounts of text by large language models, enabling rapid processing of vast amounts of financial research reports and providing strong support for discovering new trading factors (such as the alpha factor in securities investment strategies). Furthermore, the large language model in this invention possesses self-learning and continuous optimization capabilities, adapting to constantly changing market environments, enhancing the ability to discover trading factors, while reducing reliance on dedicated hardware facilities and lowering deployment and development costs.
[0047] S102. Input the description information of the trading factors into the code generation model, and use the code generation model to generate factor calculation code for the trading factors based on the description information.
[0048] After identifying trading factors in financial research reports, the effectiveness of the extracted trading factors is evaluated by backtesting their performance in historical data.
[0049] First, a pre-trained code generation model is used to convert the descriptive information of trading factors (such as the calculation method or construction process of trading factors, mathematical expressions or pseudocode, etc.) into code implementations (e.g., factor calculation functions written in Python to facilitate operation in domestic environments and integration with existing commercial analysis libraries). Compared to manually writing code, this invention can significantly improve code generation speed and shorten the investment strategy verification cycle.
[0050] Furthermore, the correctness of the code can be further verified through syntax checking and unit testing. As an optional embodiment, after generating factor calculation code for trading factors based on descriptive information using a large code generation model, the factor calculation code is subjected to syntax checking and unit testing. The factor calculation code is then adjusted based on the results of the syntax checking and unit testing until the results of the syntax checking and unit testing of the factor calculation code meet the preset code qualification requirements.
[0051] The factor calculation code can be represented by the following formula:
[0052] C_gen = M_code(F_def, C_template, T_syntax, U_test), where C_gen represents the factor calculation code, M_code represents the large-scale code generation model, F_def represents the calculation steps in the description information of the trading factor, C_template represents a predefined code template library (covering commonly used financial calculation patterns), T_syntax represents syntax checking, and U_test represents unit testing. This means that the predefined code template library, basic syntax checking, and unit testing are applied during the factor calculation code generation process to generate the factor calculation code.
[0053] S103. Based on the description information of the trading factor, extract the historical data required for backtesting the trading factor from the historical market database, call the factor calculation code to traverse the historical data to obtain the factor value of the trading factor under the historical data, and use the preset strategy to evaluate the trading factor based on the factor value to obtain the evaluation index used to evaluate the effectiveness of the trading factor.
[0054] After the factor calculation code is generated, the performance of the trading factor is evaluated. First, the historical market data database is automatically accessed, and the data required for backtesting the trading factor (such as stock prices, financial indicators, and trading volume) is extracted from the historical market data based on the description information. Then, the factor calculation code is executed to traverse the historical data to calculate the factor value, and the effectiveness of the trading factor is evaluated according to the preset strategy testing method.
[0055] The specific backtesting process may include: sorting factor values to select stocks and constructing a long-short portfolio, calculating the portfolio return during each backtesting period, and comparing it with the benchmark return; or calculating statistical indicators such as the correlation between factors and subsequent returns and the information coefficient (IC value). The pre-defined strategy testing methods and evaluation indicators will be described in detail in subsequent embodiments and will not be elaborated here.
[0056] As can be seen, this invention seamlessly integrates the mining and backtesting of trading factors, improving backtesting efficiency and accuracy, and providing more reliable data support for investment decisions.
[0057] S104. Display trading factors and their evaluation indicators on the client through a visual interface.
[0058] After the backtesting of the trading factors is completed, the performance of the trading factors is summarized, and key evaluation indicators are displayed on the client through a visualization interface. For example, this includes generating a return curve chart of the factor long-short portfolio, a backtesting performance table, and a list of evaluation indicators.
[0059] Furthermore, because this invention incorporates intelligent analysis methods, it can utilize a large model to describe and interpret backtesting results in natural language. The large model provides analysis, interpretation, and optimization suggestions based on the backtesting results, indicating the effectiveness of trading factors and potential areas for improvement, and providing feedback to the user through a visual interface. For example, if a trading factor fails during a specific period, the large model can suggest possible reasons (such as changes in the market environment) and recommend adjusting parameters or introducing new trading factors. Simultaneously, it supports natural language interaction between the user and the large model to adjust parameters involved in factor mining and backtesting. For instance, on the visual interface, users can interact with the system, such as asking "How did this trading factor perform during a bear market?" The system will provide corresponding analysis and answers based on the backtesting results.
[0060] Furthermore, for data security and compliance reasons, the securities and futures industry is increasingly emphasizing the deployment of AI (Artificial Intelligence) systems on domestically developed software and hardware platforms (i.e., the information technology innovation environment) to ensure technological autonomy and controllability. By deploying the method provided in this invention on a domestically developed operating system and independently developed hardware architecture, and fully adapting to the information technology innovation executable environment, data security and system autonomy and controllability are ensured. This ensures that the solution provided in this invention can be confidently applied in industries with extremely high security requirements, such as securities and futures.
[0061] In summary, please refer to Figure 2, which is the second flowchart of the securities industry large-scale model factor mining and backtesting method based on the information technology innovation executable environment provided by this invention. This invention provides a securities industry large-scale model factor mining and backtesting method based on the information technology innovation executable environment, including preprocessing the acquired financial research reports; using a large language model to mine trading factors and extract their calculation logic and other descriptive information from the processed financial research reports; using a code generation large model to generate factor calculation code for the identified trading factors; using the factor calculation code and historical data in the historical market database to backtest the trading factors to obtain factor values; using a preset strategy testing method to evaluate the trading factors based on the factor values to obtain evaluation indicators for evaluating the effectiveness of the trading factors; and displaying the trading factors and their evaluation indicators on the client through a visual interface to complete the result analysis and feedback.
[0062] This technology effectively addresses the shortcomings of existing factor mining technologies, such as reliance on manual labor, low efficiency, and difficulty in integration within a domestic environment. It leverages the powerful natural language understanding and code generation capabilities of large-scale models to automatically mine potential trading factors from unstructured text materials such as financial research reports in the securities and futures industry, and automatically converts the extracted trading factors into executable factor calculation code. Throughout the factor mining and backtesting process, users only need to provide the financial research report to automatically obtain trading factors, descriptive information, and backtesting results, significantly improving the accuracy of factor localization and code generation speed, achieving a high degree of automation in the factor mining and backtesting process.
[0063] Based on the above embodiments:
[0064] As an optional implementation, a large language model is used to identify trading factors from financial research reports and extract descriptive information about these factors, including:
[0065] By using pre-set prompts to engage in multi-turn dialogues with the large language model, the model is guided to perform semantic analysis and understanding of the entire content of the financial research report. The report extracts a summary of the research report content, chapter structure, and incremental information, identifies trading factors in the incremental information, and extracts descriptive information of the trading factors from the financial research report.
[0066] In this embodiment, a multi-stage, progressively deeper approach is used to identify trading factors from financial research reports, making the decision-making process of the large language model transparent and interpretable, and ensuring the reliability and accuracy of the extracted trading factors.
[0067] Specifically, different pre-set prompts are used to engage in multiple rounds of dialogue with the large language model, allowing it to gradually extract trading factors from financial research reports. For example, the large language model is first assigned the role of a financial engineer, and prompts guide it to read through a financial research report, performing preliminary semantic analysis and understanding of its entire content. Then, prompts guide the model to extract summaries, chapter structures, and incremental information (new discoveries or key conclusions compared to existing knowledge) from the report. Subsequently, prompts guide the model to focus on analyzing the incremental information, identifying explicitly stated or implicit trading factors within the report. Finally, noteworthy factor clues are located within the report, and descriptive information related to these trading factors is extracted.
[0068] For each identified trading factor, the descriptive information includes its name, financial meaning, calculation method or indicator construction process, data indicators involved in calculating the factor and parameter descriptions for each indicator, and its mathematical expression or pseudocode. Through this process, the system obtains a comprehensive description of the trading factor, from its concept to its quantitative formula. For example, a trading factor identified from a financial research report might be the expected inertia factor, defined as a factor used to measure the sustained impact of analyst expectations on profit forecast revisions. Its calculation method involves assigning a factor value based on the analyst's expected direction and magnitude of change, and the data indicators involved include the length of the time window.
[0069] The process of discovering trading factors can be represented by the following formula:
[0070] F_candidates = FactorMining(R_raw, M, {P_1, P_2, ..., P_n}), where F_candidates is the set of output trading factors (such as expected inertia factors and momentum factors), P_i represents the prompt words in the i-th round (such as "identify incremental information", "extract factor names", etc.), M represents the large language model, and R_raw represents the preprocessed financial research report (such as segmented, key information extracted structured data).
[0071] As an optional embodiment, a preset strategy testing method is used to evaluate trading factors based on factor values to obtain evaluation indicators for assessing the effectiveness of trading factors, including:
[0072] The stocks in the stock pool are sorted according to the factor values corresponding to each stock in the target order. A long-short portfolio is constructed based on the sorting results. The long-short portfolio is backtested historically, and the cumulative return, annualized return, volatility, maximum drawdown and win rate of the long-short portfolio are calculated. The cumulative return is compared with the benchmark return to obtain the excess return, relative win rate and excess maximum drawdown.
[0073] Calculate the information coefficient and average information coefficient of the trading factor to assess the correlation between the trading factor and future returns through the information coefficient, and to assess the stability of the information coefficient through the average information coefficient.
[0074] The cumulative return and cumulative return curve of the long-short portfolio, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient are used as evaluation indicators.
[0075] In this embodiment, the specific backtesting process includes first determining a stock pool as the stock selection range, and then calculating the factor value of each stock in the pool based on the trading factor. The sorting direction (i.e., the target order mentioned above) is determined according to the nature of the trading factor (positive or negative), and the stocks are sorted according to this sorting direction and the corresponding factor values. After sorting, the stocks are divided into several groups, and stocks in the high-ranking group are selected for long positions, while those in the low-ranking group are shorted, constructing the aforementioned long-short portfolio. Constructing the long-short portfolio facilitates subsequent testing of the effectiveness of the trading factor, calculating the correlation between the factor and future returns, thereby evaluating the stock selection ability and stability of the trading factor.
[0076] Subsequently, this invention backtested the long-short portfolio and determined the corresponding cumulative return, annualized return, volatility, maximum drawdown, and win rate. It further compared the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown. The information coefficient (IC value) and average information coefficient of the trading factor were calculated to assess the correlation between the trading factor and future returns, and the stability of the information coefficient was assessed by using the average information coefficient. Finally, these parameters were used as evaluation indicators to assess the effectiveness of the trading factor. This invention does not specifically limit the calculation method of these parameters.
[0077] It should also be noted that the implementation of this invention is not limited to the fixed order of the above-described processes. For example, for some application scenarios without financial research report text input, other forms of factor source data (such as real-time news, announcements, etc.) can also be accepted for factor mining. Similarly, the selection of the large model can be adjusted according to the resource availability of the information technology innovation environment, for example, using domestically pre-trained models of different sizes or architectures. In the backtesting stage, in addition to the classic long-short combination test, the system can also perform more complex simulation methods (such as robustness analysis based on Monte Carlo simulation) to evaluate the effectiveness of the factors. These variations and improvements all fall within the protection scope of this invention.
[0078] In summary, by integrating large-scale model text analysis, automatic code generation, and quantitative backtesting in a domestically developed information technology environment, this invention realizes an efficient and intelligent method for factor mining and backtesting of large-scale models in the securities industry based on an information technology-based executable environment. This method has significant practical value for improving the efficiency and quality of quantitative investment research.
[0079] Please refer to Figure 3, which is a schematic diagram of the first structure of the securities industry large-scale model factor mining and backtesting system based on the domestically developed executable environment provided by the present invention. The securities industry large-scale model factor mining and backtesting system based on the domestically developed executable environment includes:
[0080] The factor mining module 301 is used to preprocess the obtained financial research report and input it into the large language model. The large language model is used to identify trading factors from the financial research report and extract the descriptive information of the trading factors.
[0081] The factor code generation module 302 is used to input the description information of the trading factors into the code generation model, and use the code generation model to generate factor calculation codes for the trading factors based on the description information.
[0082] The backtesting and evaluation module 303 is used to extract the historical data required for backtesting the trading factors from the historical market database based on the description information of the trading factors, call the factor calculation code to traverse the historical data to obtain the factor value of the trading factors under the historical data, and use the preset strategy to evaluate the trading factors based on the factor value to obtain the evaluation index used to evaluate the effectiveness of the trading factors.
[0083] The results interaction module 304 is used to display trading factors and their evaluation indicators on the client through a visual interface.
[0084] Please refer to Figure 4, which is a schematic diagram of the second structure of the securities industry large-scale model factor mining and backtesting system based on the domestically developed executable environment provided by this invention. The factor mining module 301 obtains financial research reports from the research report database through a data input interface and interacts with the deployed large language model to complete the identification of trading factors and the extraction of relevant descriptive information. The factor code generation module 302 collaborates with the large language model to convert the calculation logic of the extracted trading factors into executable factor calculation code and verifies the correctness of the factor calculation code through an algorithm library. The backtesting and evaluation module 303 connects to the historical market database, executes the factor calculation code to complete the backtesting, and uses a preset strategy to evaluate the trading factors based on factor values to obtain evaluation indicators for assessing the effectiveness of the trading factors. Finally, the result interaction module 304 displays the representation of the trading factors, i.e., the evaluation indicators, to the user through a visual interface and supports user interaction and model optimization. The entire system is deployed on a domestically developed operating system and hardware environment, and the modules communicate via internal network cables to ensure high-speed, secure, and controllable data processing.
[0085] For a detailed description of the securities industry large-scale model factor mining and backtesting system based on the domestically developed executable environment provided by this invention, please refer to the above-described embodiments of the securities industry large-scale model factor mining and backtesting method based on the domestically developed executable environment. This invention will not be elaborated upon here.
[0086] Based on the above embodiments:
[0087] As an optional embodiment, the factor mining module 301 is specifically used for:
[0088] After preprocessing the obtained financial research reports, they are input into a large language model. The model engages in multiple rounds of dialogue using pre-set prompts to guide it in semantic analysis and understanding of the entire content of the financial research reports. The model extracts the report's content summary, chapter structure, and incremental information, identifies trading factors within the incremental information, and extracts descriptive information about these trading factors from the financial research reports.
[0089] As an optional embodiment, the backtesting and evaluation module 303 includes:
[0090] The historical data extraction module is used to extract the historical data required for backtesting trading factors from the historical market database based on the description information of the trading factors.
[0091] The factor value calculation module is used to call the factor calculation code to traverse historical data to obtain the factor value of the trading factor under the historical data.
[0092] The evaluation module sorts stocks in the stock pool according to their corresponding factor values in the target order, constructs a long-short portfolio based on the sorting results, performs historical backtesting on the long-short portfolio, and calculates the cumulative return, annualized return, volatility, maximum drawdown, and win rate of the long-short portfolio. It also compares the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown. The module calculates the information coefficient and average information coefficient of the trading factors to assess the correlation between the trading factors and future returns, and the average information coefficient to assess the stability of the information coefficient. The cumulative return and cumulative return curve of the long-short portfolio, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient are used as evaluation indicators.
[0093] Please refer to Figure 5, which is a schematic diagram of the structure of the securities industry large-scale model factor mining and backtesting device based on the information technology innovation executable environment provided by the present invention. The securities industry large-scale model factor mining and backtesting device based on the information technology innovation executable environment includes:
[0094] Memory 501 is used to store computer programs;
[0095] Processor 502 is used to implement any of the steps of the above-mentioned securities industry large model factor mining and backtesting method based on the information technology innovation executable environment when executing computer programs.
[0096] For a detailed description of the securities industry large model factor mining and backtesting device based on the domestically developed executable environment provided by this invention, please refer to the above-described embodiments of the securities industry large model factor mining and backtesting method based on the domestically developed executable environment. This invention will not be elaborated upon here.
[0097] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for factor mining and backtesting of a large-scale securities industry model based on an information technology innovation executable environment.
[0098] For a detailed description of the storage medium provided by this invention, please refer to the above-described embodiment of the securities industry large model factor mining and backtesting method based on the domestically developed executable environment. This invention will not be elaborated upon here.
[0099] The various embodiments described in this specification are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments. It should also be noted that, in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, article, or apparatus that includes said element.
[0100] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for factor mining and backtesting of a large-scale securities industry model based on an information technology-enabled executable environment, characterized in that, include: The obtained financial research report is preprocessed and then input into a large language model. The large language model is used to identify trading factors from the financial research report and extract their descriptive information. This descriptive information is then input into a code generation model, which generates factor calculation code for the trading factors based on the descriptive information. Historical data required for backtesting the trading factors is extracted from a historical market database based on the descriptive information. The factor calculation code is then invoked to traverse the historical data to obtain the factor values of the trading factors under the historical data. A preset strategy is then used to test the trading factors based on these factor values. The evaluation process involves assessing the effectiveness of the trading factors to obtain evaluation metrics; displaying the trading factors and their evaluation metrics on the client through a visual interface; and identifying and extracting descriptive information of the trading factors from the financial research report using the large language model, which includes: engaging in multiple rounds of dialogue with the large language model using pre-set prompts to guide the large language model to perform semantic analysis and understanding of the entire content of the financial research report, extracting research report content summaries, chapter structures, and incremental information from the financial research report, identifying trading factors in the incremental information, and extracting descriptive information of the trading factors from the financial research report.
2. The method for factor mining and backtesting of a large-scale securities industry model based on an information technology innovation executable environment as described in claim 1, characterized in that, The descriptive information of the trading factor includes the name of the trading factor, its financial meaning, its calculation method, the data indicators involved in calculating the trading factor and the parameter description of each data indicator, and the mathematical expression or pseudocode of the trading factor.
3. The method for factor mining and backtesting of a large-scale securities industry model based on an information technology innovation executable environment as described in claim 1, characterized in that, After generating factor calculation code for the trading factor based on the description information using the code-generating large model, the method further includes: performing syntax checks and unit tests on the factor calculation code, and adjusting the factor calculation code based on the results of the syntax checks and unit tests, until the results of the syntax checks and unit tests of the factor calculation code meet the preset code qualification requirements, and then proceeding to the step of extracting the historical data required for backtesting the trading factor from the historical market database based on the description information of the trading factor.
4. The method for factor mining and backtesting of a large-scale securities industry model based on an information technology innovation executable environment as described in any one of claims 1 to 3, characterized in that, The method of evaluating the trading factors based on the factor values using a preset strategy includes obtaining evaluation indicators for assessing the effectiveness of the trading factors. This includes: sorting stocks in the stock pool according to the target order based on the factor values corresponding to each stock; constructing a long-short portfolio based on the sorting results; performing historical backtesting on the long-short portfolio and calculating the cumulative return, annualized return, volatility, maximum drawdown, and win rate corresponding to the long-short portfolio; comparing the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown; calculating the information coefficient and average information coefficient of the trading factors to assess the correlation between the trading factors and future returns through the information coefficient and to assess the stability of the information coefficient through the average information coefficient; and using the cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient of the long-short portfolio as the evaluation indicators.
5. A securities industry large-scale model factor mining and backtesting system based on an information technology-enabled executable environment, characterized in that, include: The factor mining module is used to preprocess the obtained financial research report and input it into the large language model, and use the large language model to identify trading factors from the financial research report and extract the descriptive information of the trading factors. The factor code generation module is used to input the description information of the trading factor into the code generation model, and use the code generation model to generate factor calculation code for the trading factor based on the description information. The backtesting and evaluation module is used to extract the historical data required for backtesting the trading factor from the historical market database according to the description information of the trading factor, call the factor calculation code to traverse the historical data to obtain the factor value of the trading factor under the historical data, and use a preset strategy testing method to evaluate the trading factor based on the factor value to obtain an evaluation index for evaluating the effectiveness of the trading factor. The results interaction module is used to display the trading factors and their evaluation indicators on the client through a visual interface; the factor mining module is specifically used to: preprocess the obtained financial research report and input it into the large language model, use pre-set prompts to conduct multiple rounds of dialogue with the large language model, guide the large language model to perform semantic analysis and understanding of the entire content of the financial research report, extract the research report content summary, chapter structure and incremental information from the financial research report, identify the trading factors in the incremental information, and extract the descriptive information of the trading factors from the financial research report.
6. The securities industry large-scale model factor mining and backtesting system based on the domestically developed executable environment as described in claim 5, characterized in that, The backtesting and evaluation module includes: a historical data extraction module, used to extract historical data required for backtesting the trading factor from a historical market database based on the description information of the trading factor; a factor value calculation module, used to call the factor calculation code to traverse the historical data to obtain the factor value of the trading factor under the historical data; and an evaluation module, used to sort the stocks in the stock pool according to the factor value corresponding to each stock in the target order, construct a long-short portfolio based on the sorting result, perform historical backtesting on the long-short portfolio, and calculate the cumulative return, annualized return, volatility, maximum drawdown, and win rate of the long-short portfolio, and compare the cumulative return with the benchmark return to obtain the excess return, relative win rate, and excess maximum drawdown; calculate the information coefficient and average information coefficient of the trading factor, so as to evaluate the correlation between the trading factor and future returns through the information coefficient of the trading factor, and evaluate the stability of the information coefficient through the average information coefficient; and use the cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient, and average information coefficient of the long-short portfolio as the evaluation indicators.
7. A device for factor mining and backtesting of a large-scale securities industry model based on an information technology-enabled executable environment, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the securities industry large-scale model factor mining and backtesting method based on the domestically developed executable environment as described in any one of claims 1 to 4.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the securities industry large model factor mining and backtesting method based on the information technology innovation executable environment as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Interactive quantitative investment factor analysis method and system
CN115482100A
Intelligent multi-factor investment and research method based on large model
CN118674549A