Security industry large-scale model factor mining and back-testing method based on credential executable environment
By automatically identifying and generating trading factor calculation codes through a large language model and combining it with historical data backtesting, the problem of low efficiency in trading factor mining in existing technologies is solved, the automation of large-model factor mining and backtesting in the securities industry is realized, and the accuracy and efficiency of trading factor positioning are improved.
Patent Information
- Application Number
- CN202510715315.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The mining of trading factors in existing technologies relies on manual analysis, which is inefficient and costly, and has difficulty in handling complex nonlinear relationships, making it difficult to meet the needs of massive data analysis and real-time decision-making in the securities and futures fields.
Use large language models to identify trading factors from financial research reports, generate factor calculation code, and backtest through historical market databases. Combined with preset strategies, the effectiveness of trading factors is evaluated and the results are displayed to achieve automated processes.
It improves the efficiency and accuracy of trading factor positioning, realizes the automation of factor mining and backtesting, reduces labor costs, and improves the real-time and accuracy of data analysis.
Smart Images

Figure CN120705192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a large-model factor mining and backtesting method for the securities industry based on an innovative executable environment. Background Art
[0002] In the securities and futures industry, trading factors, a type of indicator or characteristic used to quantitatively analyze and predict market trends, evaluate the effectiveness of investment strategies, and optimize trading decisions, play an important role. Currently, the discovery of trading factors relies primarily on professional researchers reading and analyzing large amounts of financial research reports and data, extracting them based on their personal experience. This approach suffers from limitations such as low efficiency, high labor costs, accuracy limited by individual experience, and difficulty handling complex nonlinear relationships. This approach fails 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 the present invention is to provide a large-model factor mining and backtesting method for the securities industry based on an innovative executable environment, which can realize automatic mining and backtesting of trading factors in research reports, improve the efficiency and accuracy of factor positioning, and automatically generate factor calculation code to realize the automation of the backtesting process.
[0004] To solve the above technical problems, the present invention provides a method for factor mining and backtesting of large models in the securities industry based on an xinchuang executable environment, comprising:
[0005] pre-processing the obtained financial research reports and inputting them into a large language model, using the large language model to identify transaction factors from the financial research reports and extract descriptive information of the transaction factors;
[0006] Inputting the description information of the transaction factor into a code generation model, and using the code generation model to generate a factor calculation code for the transaction factor based on the description information;
[0007] extracting historical data required for backtesting the trading factor from a historical market database based on the descriptive information of the trading factor, calling the factor calculation code to traverse the historical data to obtain a factor value of the trading factor under the historical data, and evaluating the trading factor 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 indicators are displayed on the client through a visual interface.
[0009] Optionally, the using the large language model to identify transaction factors from the financial research report and extracting description information of the transaction factors includes:
[0010] Multiple rounds of dialogue are conducted with the large language model using pre-set prompt words to 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 transaction factors in the incremental information, and extract the description information of the transaction factors from the financial research report.
[0011] Optionally, 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.
[0012] Optionally, after generating a factor calculation code for the transaction factor based on the description information using the code generation model, the method further includes:
[0013] The factor calculation code is subjected to syntax checking and unit testing, and the factor calculation code is adjusted based on the results of the syntax checking and unit testing. After the results of the syntax checking and unit testing of the factor calculation code meet the preset code qualification requirements, 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 entered.
[0014] Optionally, the evaluating the trading factor based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the trading factor includes:
[0015] Sort each stock in the stock pool according to the target order based on the factor value corresponding to each stock, and 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 corresponding to the long-short portfolio. Compare the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown;
[0016] Calculating the information coefficient and the average value of the 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 to evaluate the stability of the information coefficient through the average value of the information coefficient;
[0017] The cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, winning rate, information coefficient and average information coefficient of the long-short combination are used as the evaluation indicators.
[0018] To solve the above technical problems, the present invention also provides a securities industry large model factor mining and backtesting system based on the Xinchuang executable environment, including:
[0019] A factor mining module is used to pre-process the obtained financial research reports and input them into a large language model, using the large language model to identify transaction factors from the financial research reports and extract descriptive information of the transaction factors;
[0020] a factor code generation module, configured to input the description information of the transaction factor into a code generation model, and generate a factor calculation code for the transaction factor based on the description information using the code generation model;
[0021] a backtesting and evaluation module configured to extract historical data required for backtesting the trading factor from a historical market database based on the descriptive information of the trading factor, invoke the factor calculation code to traverse the historical data to obtain a factor value of the trading factor under the historical data, and evaluate the trading factor based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the trading factor;
[0022] The result interaction module is used to display the transaction factors and their evaluation indicators on the client through a visual interface.
[0023] Optionally, the factor mining module is specifically used to:
[0024] The obtained financial research reports are pre-processed and then input into a large language model. Multiple rounds of dialogues are conducted with the large language model using pre-set prompt words to 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 transaction factors in the incremental information, and extract the descriptive information of the transaction factors from the financial research report.
[0025] Optional backtesting and evaluation modules include:
[0026] A historical data extraction module is 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;
[0027] A factor value calculation module, configured to call the factor calculation code to traverse the historical data to obtain the factor value of the transaction factor under the historical data;
[0028] An evaluation module is used to sort each stock in the stock pool according to the factor value corresponding to each stock in the target order, and construct a long-short combination based on the sorting results, perform historical backtesting on the long-short combination and calculate the cumulative return, annualized return, volatility, maximum drawdown and win rate corresponding to the long-short combination, and compare the cumulative return with the benchmark return to obtain excess return, relative win rate and excess maximum drawdown; calculate the information coefficient of the trading factor and the average value of the information coefficient, 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 value of the information coefficient; and use the cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient and the average value of the information coefficient of the long-short combination as the evaluation indicators.
[0029] To solve the above technical problems, the present invention also provides a large-scale factor mining and backtesting device for the securities industry based on the Xinchuang executable environment, comprising:
[0030] memory for storing 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 Xinchuang executable environment when executing the computer program.
[0032] In order to solve the above technical problems, the present invention also provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned securities industry large-model factor mining and backtesting methods based on the ICT executable environment.
[0033] The beneficial effect of the present invention is to provide a large-model factor mining and backtesting method for the securities industry based on a trusted executable environment, including using a large language model to identify trading factors from financial research reports and extract their descriptive information; using a code-generating large model to generate factor calculation code for the identified trading factors; using the factor calculation code and historical data in a 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. By utilizing the powerful natural language understanding and code generation capabilities of the large model, automatic mining and backtesting of trading factors in research reports can be achieved, the efficiency and accuracy of factor positioning can be improved, and factor calculation code can be automatically generated to automate the backtesting process. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 The first flow chart of the securities industry large model factor mining and backtesting method based on the Xinchuang executable environment provided by the present invention;
[0036] Figure 2 A second flow chart of the method for factor mining and backtesting a large model in the securities industry based on the Xinchuang executable environment provided by the present invention;
[0037] Figure 3 A first structural diagram of the securities industry large-model factor mining and backtesting system based on the Xinchuang executable environment provided by the present invention;
[0038] Figure 4 A second structural diagram of the securities industry large-model factor mining and backtesting system based on the Xinchuang executable environment provided by the present invention;
[0039] Figure 5 This is a structural diagram of the securities industry large-model factor mining and backtesting device based on the trusted executable environment provided by the present invention. DETAILED DESCRIPTION
[0040] The core of this invention is to provide a large-model factor mining and backtesting method for the securities industry based on an innovative executable environment, which can realize automatic mining and backtesting of trading factors in research reports, improve the efficiency and accuracy of factor positioning, and automatically generate factor calculation code to realize the automation of the backtesting process.
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings 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 making creative efforts shall fall within the scope of protection of the present invention.
[0042] Please refer to Figure 1 , Figure 1 The first flow chart of the securities industry large model factor mining and backtesting method based on the Xinchuang executable environment provided by the present invention includes:
[0043] S101. Pre-process the obtained financial research report and input it into the large language model. Use the large language model to identify transaction factors from the financial research report and extract descriptive information of the transaction 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 to quantitatively analyze market trends, price fluctuations, risk control, and investment decisions in financial derivatives trading, such as futures and stocks. Identifying trading factors, whether explicitly stated or implicitly included in financial research reports, is crucial for helping investors identify potential trading opportunities, optimize their portfolios, and increase profitability.
[0045] The present invention provides the financial research report as input to the large language model (for example, uploading the financial research report in the form of a PDF or text file through 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. Afterwards, the large language model identifies the trading factors from the preprocessed financial research report and extracts the descriptive information of the trading factors (such as the calculation method or construction process of the trading factors, mathematical expressions or pseudocodes, etc., to facilitate the subsequent generation of factor backtesting codes based on the descriptive information of the trading factors). Preferably, a strategy of multiple rounds of dialogue with prompt words can be used to gradually guide the large language model to complete the task of mining trading factors. The subsequent embodiments will specifically describe the process of mining transactions by the large language model, which will not be repeated here.
[0046] This invention leverages the large language model's powerful semantic understanding, contextual learning, and ability to rapidly extract key information from massive amounts of text. It can rapidly process vast amounts of financial research reports and provide powerful 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 the ever-changing market environment and enhancing its ability to discover trading factors. It also reduces reliance on specialized hardware, lowering deployment and R&D costs.
[0047] S102: Input the description information of the transaction factor into the code generation model, and use the code generation model to generate factor calculation code for the transaction factor based on the description information.
[0048] After identifying the trading factors in the financial research report, the trading factors are further backtested to evaluate the effectiveness of the extracted trading factors through their performance in historical data.
[0049] First, a pre-trained code generation model is used to convert the descriptive information of trading factors (e.g., the calculation method or construction process of trading factors, mathematical expressions, or pseudocode) into code implementation (e.g., factor calculation functions written in Python, to facilitate operation in domestic environments and integration with existing quantitative analysis libraries). Compared to manual code generation, this method can significantly speed up code generation and shorten the investment strategy verification cycle.
[0050] Furthermore, code correctness can be further verified through syntax checking and unit testing. As an optional embodiment, after the code generation model generates factor calculation code for the transaction factor based on the descriptive information, the factor calculation code is syntax checked and unit tested. Based on the results of the syntax check and unit testing, the factor calculation code is adjusted until the results of both the syntax check and unit testing meet pre-set code qualification requirements.
[0051] The factor calculation code can be expressed 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 code generation model, F_def represents the calculation steps in the description of the trading factor, C_template represents a predefined code template library (covering common financial calculation patterns), T_syntax represents syntax checking, and U_test represents unit testing. This indicates that the factor calculation code generation process applies the predefined code template library, basic syntax checking, and unit testing.
[0053] S103. Extract the historical data required for backtesting the trading factors from the historical market database based on the descriptive information of the trading factors, call the factor calculation code to traverse the historical data to obtain the factor values of the trading factors under the historical data, and use the 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.
[0054] After the factor calculation code is generated, the performance of the trading factors is evaluated. First, the historical market data base is automatically accessed and, based on the descriptive information, the data required for backtesting the trading factors (such as stock prices, financial indicators, and trading volume) is extracted from the historical market data base. The factor calculation code is then executed to calculate the factor values based on the historical data and the effectiveness of the trading factors is evaluated using pre-set strategy verification methods.
[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 backtest 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). The preset strategy testing methods and evaluation indicators will be explained in detail in subsequent examples and are not detailed here.
[0056] It can be seen that the present invention seamlessly connects the mining and backtesting of trading factors, improves the efficiency and accuracy of backtesting, and provides more reliable data support for investment decisions.
[0057] S104. Display the transaction factors and their evaluation indicators on the client through a visual interface.
[0058] After backtesting a trading factor, its performance is summarized and key evaluation indicators are displayed on the client through a visual interface. For example, a yield curve chart for the factor's long-short portfolio, a backtest performance table, and a list of evaluation indicators are generated.
[0059] In addition, since the present invention introduces intelligent analysis methods, the big model can also be used to describe and interpret the backtest results in natural language. The big model can provide analysis, interpretation and optimization suggestions based on the backtest results, point out the effectiveness of the trading factors and possible improvement directions, and provide feedback to the user through a visual interface. For example, if a trading factor fails in a specific period, the big model can prompt possible reasons (such as changes in the market environment) and suggest adjusting parameters or introducing new trading factors. At the same time, it supports users to interact with the big model in natural language to adjust the parameters involved in the factor mining and backtesting process. For example, on the visual interface, users can interact with the system, such as asking through dialogue "How does this trading factor perform in a bear market?" The system will give corresponding analytical answers based on the backtest 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 domestic software and hardware platforms (also known as trusted innovation environments) to ensure technological autonomy and control. By deploying the method provided by the present invention on a domestic operating system and independently developed hardware architecture, fully adapting to the trusted innovation executable environment, data security and system autonomy and control are ensured, ensuring that the solution provided by the present invention can be safely applied in industries with extremely high security requirements, such as securities and futures.
[0061] In summary, please refer to Figure 2 , Figure 2This is the second flow chart of the securities industry large-model factor mining and backtesting method based on the credible executable environment provided by the present invention. The present invention provides a securities industry large-model factor mining and backtesting method based on the credible executable environment, including preprocessing the acquired financial research reports, mining trading factors from the processed financial research reports using a large language model and extracting descriptive information such as their calculation logic; generating factor calculation codes for the identified trading factors using a code-generated large model; backtesting the trading factors using the factor calculation codes and historical data in the historical market database to obtain factor values, evaluating the trading factors based on the factor values using a preset strategy testing method to obtain evaluation indicators for evaluating the effectiveness of the trading factors, displaying the trading factors and their evaluation indicators on the client through a visual interface, and completing result analysis and feedback.
[0062] This technology fully addresses the existing challenges of manual factor mining, resulting in low efficiency and difficulty integrating with domestic environments. By combining the powerful natural language understanding and code generation capabilities of large models, it automatically mines 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 the trading factors, descriptions, and backtesting results. This significantly improves the accuracy of factor location and the speed of code generation, achieving a high degree of automation in the factor mining and backtesting process.
[0063] Based on the above embodiment:
[0064] As an optional embodiment, a large language model is used to identify trading factors from financial research reports and extract descriptive information of the trading factors, including:
[0065] Use pre-set prompt words to conduct multiple rounds of dialogue with the large language model, guiding 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.
[0066] In this embodiment, a multi-stage, step-by-step approach is used to identify trading factors from financial research reports, making the decision-making process of the large language model transparent and explainable, thereby ensuring the reliability and accuracy of the extracted trading factors.
[0067] Specifically, multiple rounds of dialogue are conducted with the large language model using different pre-set prompt words, allowing the large language model to gradually explore trading factors from financial research reports. For example, the large language model is first given the role of a financial engineer, and the prompt words are used to guide the large language model to read through the financial research report and conduct a preliminary semantic analysis and understanding of the entire content of the financial research report. Then, the prompt words are used to guide the large language model to extract the research report content summary, chapter structure, and incremental information (new discoveries or key conclusions compared to existing knowledge) from the financial research report. Subsequently, the prompt words are used to guide the large language model to focus on analyzing the incremental information, from which the trading factors explicitly proposed or implied in the financial research report are identified. Next, the clues of factors worthy of attention are located in the financial research report, and descriptive information related to the trading factors is extracted.
[0068] For each identified trading factor, the descriptive information includes the name of the trading factor, its financial meaning, the calculation method or indicator construction process, the data indicators involved in calculating the trading factor and the parameter descriptions of each data indicator, and the mathematical expression or pseudocode of the trading factor. Through this process, the system obtains a comprehensive description of the trading factor, from concept to quantitative formula. For example, the trading factor identified in the financial research report is specifically the expected inertia factor, which is defined as a factor used to measure the ongoing impact of Shu Chang on earnings estimate revisions. The calculation method is to calculate the factor value based on the direction and magnitude of analyst expectations, and the data indicators involved include the length of the time window.
[0069] The mining process of transaction factors can be expressed by the following formula:
[0070] F_candidates = FactorMining(R_raw, M, {P_1, P_2, ..., P_n}), where F_candidates is a set of output trading factors (such as expected inertia factor and momentum factor, etc.), P_i represents the prompt word of the i-th round (such as "identify incremental information", "extract factor name", etc.), M represents the large language model, and R_raw represents the preprocessed financial research report (such as structured data after segmentation and key information extraction).
[0071] As an optional embodiment, a preset strategy verification method is used to evaluate the trading factors based on the factor values to obtain evaluation indicators for evaluating the effectiveness of the trading factors, including:
[0072] Sort each stock in the stock pool according to the target order based on the factor value corresponding to each stock, and 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 corresponding to the long-short portfolio. Compare the cumulative return with the benchmark return to obtain the excess return, relative win rate and excess maximum drawdown.
[0073] The information coefficient of the trading factor and the average value of the information coefficient are calculated so that the correlation between the trading factor and future returns can be evaluated through the information coefficient of the trading factor, and the stability of the information coefficient can be evaluated through the average value of the information coefficient.
[0074] The cumulative returns and cumulative return curves, annualized returns, volatility, maximum drawdown, winning rate, information coefficient and average information coefficient of the long-short portfolio 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 calculating the factor value of each stock in the stock pool on the trading factor. The sorting direction (that is, the above-mentioned target order) is determined according to the nature of the trading factor (forward or reverse), and the stocks are sorted according to the sorting direction and the factor value corresponding to each stock. After the sorting is completed, the stocks are divided into several groups, and according to the sorting results, the stocks in the high-risk group are selected to go long and the stocks in the low-risk group are selected to go short, and the above-mentioned long-short combination is constructed. By constructing a long-short combination, it is convenient to subsequently test the effectiveness of the trading factor, calculate the correlation between the factor and future returns, and thus evaluate the stock selection ability and stability value of the trading factor.
[0076] The present invention then backtests the long-short portfolio and determines the corresponding cumulative return, annualized return, volatility, maximum drawdown, and win rate. The cumulative return is further compared with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown, etc. The information coefficient (IC value) and average value of the trading factor are calculated to assess the correlation between the trading factor and future returns using the information coefficient of the trading factor, and the stability of the information coefficient is assessed using the average value of the information coefficient. Ultimately, these parameters are used as evaluation indicators for evaluating the effectiveness of the trading factor. The present invention does not specifically limit the calculation method of these parameters.
[0077] It should also be noted that the embodiments of the present invention are not limited to the fixed order of the above-mentioned processes. For example, for some application scenarios where there is no text input of financial research reports, other forms of factor source data (such as real-time news, announcements, etc.) can also be accepted and trading factors can be mined. Similarly, the choice of large models can be adjusted according to the resource situation of the information innovation environment, such as using domestic pre-trained models of different scales or architectures. In the backtesting phase, 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 factors. These variations and improvements all fall within the scope of protection of the present invention.
[0078] In summary, by integrating large-model text analysis, automatic code generation and quantitative backtesting in a trusted computing environment, the present invention realizes an efficient and intelligent large-model factor mining and backtesting method for the securities industry based on a trusted computing executable environment, which has significant practical value for improving the efficiency and quality of quantitative investment research.
[0079] Please refer to Figure 3 , Figure 3 The first structural diagram of the securities industry large model factor mining and backtesting system based on the xinchuang executable environment provided by the present invention includes:
[0080] The factor mining module 301 is used to pre-process the obtained financial research reports and then input them into the large language model, and use the large language model to identify transaction factors from the financial research reports and extract descriptive information of the transaction factors.
[0081] The factor code generation module 302 is used to input the description information of the transaction factor into the code generation model, and use the code generation model to generate a factor calculation code for the transaction factor 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 descriptive 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 testing method to evaluate the trading factors based on the factor value to obtain the evaluation index for evaluating the effectiveness of the trading factors.
[0083] The result interaction module 304 is used to display the transaction factors and their evaluation indicators on the client through a visual interface.
[0084] Please refer to Figure 4 , Figure 4This is a second structural diagram of the securities industry's large-model factor mining and backtesting system based on the trusted executable environment provided by the present invention. The factor mining module 301 retrieves financial research reports from a research report database through a data input interface and interacts with a deployed large language model to identify trading factors and extract related 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 verify the correctness of the factor calculation code using an algorithm library. The backtesting and evaluation module 303 connects to a historical market database, executes the factor calculation code to complete backtesting, and uses a preset strategy verification method to evaluate the trading factors based on their values to obtain evaluation metrics 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 metrics, to the user through a visual interface and supports interactive model tuning. The entire system is deployed on a domestic operating system and hardware environment. Each module communicates via an internal network cable, ensuring high-speed, secure, and controllable data processing.
[0085] For a detailed introduction to the securities industry large-model factor mining and backtesting system based on the credible executable environment provided by the present invention, please refer to the above-mentioned embodiment of the securities industry large-model factor mining and backtesting method based on the credible executable environment, and the present invention will not elaborate on it here.
[0086] Based on the above embodiment:
[0087] As an optional embodiment, the factor mining module 301 is specifically configured to:
[0088] The obtained financial research reports are pre-processed and then input into the large language model. Multiple rounds of dialogue are conducted with the large language model using pre-set prompt words to 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.
[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 the 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 the historical data to obtain the factor value of the trading factor under the historical data.
[0092] The evaluation module is used to sort each stock in the stock pool according to the target order based on the factor value corresponding to each stock, and construct a long-short combination based on the sorting results, conduct historical backtesting on the long-short combination and calculate the cumulative return, annualized return, volatility, maximum drawdown and win rate corresponding to the long-short combination, and compare the cumulative return with the benchmark return to obtain excess return, relative win rate and excess maximum drawdown; calculate the information coefficient of the trading factor and the average value of the information coefficient, 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 value of the information coefficient; use the cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient and the average value of the information coefficient of the long-short combination as evaluation indicators.
[0093] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of the securities industry large model factor mining and backtesting device based on the Xinchuang executable environment provided by the present invention. The securities industry large model factor mining and backtesting device based on the Xinchuang executable environment includes:
[0094] Memory 501, used for storing 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 Xinchuang executable environment when executing a computer program.
[0096] For a detailed introduction to the large-model factor mining and backtesting device for the securities industry based on the credible executable environment provided by the present invention, please refer to the above-mentioned embodiment of the large-model factor mining and backtesting method for the securities industry based on the credible executable environment, and the present invention will not elaborate on it here.
[0097] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned large-model factor mining and backtesting methods for the securities industry based on the ICT executable environment are implemented.
[0098] For a detailed introduction to the storage medium provided by the present invention, please refer to the above-mentioned embodiment of the securities industry large-model factor mining and backtesting method based on the trusted executable environment, and the present invention will not be elaborated here.
[0099] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. It should also be noted that in this specification, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, article, or device that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, article, or device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, article, or device that includes the element.
[0100] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present 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 present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for factor mining and backtesting of large models in the securities industry based on the Xinchuang executable environment, characterized in that: include: pre-processing the obtained financial research reports and inputting them into a large language model, using the large language model to identify transaction factors from the financial research reports and extract descriptive information of the transaction factors; Inputting the description information of the transaction factor into a code generation model, and using the code generation model to generate a factor calculation code for the transaction factor based on the description information; extracting historical data required for backtesting the trading factor from a historical market database based on the descriptive information of the trading factor, calling the factor calculation code to traverse the historical data to obtain a factor value of the trading factor under the historical data, and evaluating the trading factor based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the trading factor; The trading factors and their evaluation indicators are displayed on the client through a visual interface.
2. The method for factor mining and backtesting a large model in the securities industry based on the xinchuang executable environment as claimed in claim 1, characterized in that: The step of using the large language model to identify transaction factors from the financial research report and extracting description information of the transaction factors includes: Multiple rounds of dialogue are conducted with the large language model using pre-set prompt words to 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 transaction factors in the incremental information, and extract the description information of the transaction factors from the financial research report.
3. The method for factor mining and backtesting a large model in the securities industry based on the xinchuang executable environment as claimed in claim 1, characterized in that: The descriptive information of the trading factor includes the name of the trading factor, financial meaning, calculation method, data indicators involved in calculating the trading factor and parameter description of each data indicator, and the mathematical expression or pseudocode of the trading factor.
4. The method for factor mining and backtesting a large model in the securities industry based on the xinchuang executable environment as claimed in claim 1, characterized in that: After the code generation macro model is used to generate a factor calculation code for the transaction factor based on the description information, the method further includes: The factor calculation code is subjected to syntax checking and unit testing, and the factor calculation code is adjusted based on the results of the syntax checking and unit testing. After the results of the syntax checking and unit testing of the factor calculation code meet the preset code qualification requirements, 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 entered.
5. The method for factor mining and backtesting a large model in the securities industry based on an innocence-based executable environment according to any one of claims 1 to 4, characterized in that: The step of evaluating the transaction factor based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the transaction factor includes: Sort each stock in the stock pool according to the target order based on the factor value corresponding to each stock, and 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 corresponding to the long-short portfolio. Compare the cumulative return with the benchmark return to obtain excess return, relative win rate, and excess maximum drawdown; Calculating the information coefficient and the average value of the 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 to evaluate the stability of the information coefficient through the average value of the information coefficient; The cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, winning rate, information coefficient and average information coefficient of the long-short combination are used as the evaluation indicators.
6. A securities industry large-model factor mining and backtesting system based on the Xinchuang executable environment, characterized by: include: A factor mining module is used to pre-process the obtained financial research reports and input them into a large language model, using the large language model to identify transaction factors from the financial research reports and extract descriptive information of the transaction factors; a factor code generation module, configured to input the description information of the transaction factor into a code generation model, and generate a factor calculation code for the transaction factor based on the description information using the code generation model; a backtesting and evaluation module configured to extract historical data required for backtesting the trading factor from a historical market database based on the descriptive information of the trading factor, invoke the factor calculation code to traverse the historical data to obtain a factor value of the trading factor under the historical data, and evaluate the trading factor based on the factor value using a preset strategy testing method to obtain an evaluation index for evaluating the effectiveness of the trading factor; The result interaction module is used to display the transaction factors and their evaluation indicators on the client through a visual interface.
7. The securities industry large model factor mining and backtesting system based on the Xinchuang executable environment as claimed in claim 6 is characterized in that: The factor mining module is specifically used for: The obtained financial research reports are pre-processed and then input into a large language model. Multiple rounds of dialogues are conducted with the large language model using pre-set prompt words to 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 transaction factors in the incremental information, and extract the descriptive information of the transaction factors from the financial research report.
8. The securities industry large model factor mining and backtesting system based on the Xinchuang executable environment as claimed in claim 6 is characterized in that: The backtesting and evaluation module includes: A historical data extraction module, configured 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, configured to call the factor calculation code to traverse the historical data to obtain the factor value of the transaction factor under the historical data; An evaluation module is used to sort each stock in the stock pool according to the factor value corresponding to each stock in the target order, and construct a long-short combination based on the sorting results, perform historical backtesting on the long-short combination and calculate the cumulative return, annualized return, volatility, maximum drawdown and win rate corresponding to the long-short combination, and compare the cumulative return with the benchmark return to obtain excess return, relative win rate and excess maximum drawdown; calculate the information coefficient of the trading factor and the average value of the information coefficient, 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 value of the information coefficient; and use the cumulative return and cumulative return curve, annualized return, volatility, maximum drawdown, win rate, information coefficient and the average value of the information coefficient of the long-short combination as the evaluation indicators.
9. A securities industry large model factor mining and backtesting device based on the Xinchuang executable environment, characterized by: include: memory for storing computer programs; A processor, configured to implement the steps of the securities industry large-model factor mining and backtesting method based on the ICT executable environment as described in any one of claims 1 to 5 when executing the computer program.
10. 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 ICT executable environment as described in any one of claims 1 to 5.
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
Evolutionary framework construction method for big language model enhancement of formula Alpha factor mining
CN119379434A
Multi-dimensional factor quantification and digital gene recombination method based on behavior deconstruction
CN119941405A
Information analysis system and method based on event regression test
WO2017107010A1
Cited By
Futures quantitative back-testing method and system based on large model
CN121937218A