A financial intelligence analysis method based on knowledge capacity balance
Through knowledge capacity balancing technology, combined with multi-round dialogue windows and intelligent agents, the knowledge of large language models and professional financial models is integrated, which solves the problem of lack of knowledge of large language models in the financial field, realizes more realistic financial intelligence analysis, and simulates the analysis process of people with different levels of expertise.
Patent Information
- Application Number
- CN202411853732.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Large language models lack knowledge in the financial field, resulting in weak reasoning capabilities in financial intelligence analysis. Existing fine-tuning-based methods have high training costs and are prone to knowledge bias, making them unable to truly simulate the financial intelligence analysis process of people with different levels of expertise.
Through a method based on knowledge capacity balance and combined with prompt word technology, the knowledge fusion of the base model and the professional financial model is achieved. Multi-round dialogue windows and intelligent agents are used to conduct financial intelligence analysis, integrating common sense and limited financial knowledge to generate more realistic analysis results.
It achieves the knowledge capacity balance of large language models in financial intelligence analysis, eliminates knowledge bias, simulates user analysis with different knowledge levels, and provides more reasonable and anthropomorphic financial intelligence analysis results.
Smart Images

Figure CN119761480B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of financial information analysis, and particularly relates to a method for achieving more accurate financial intelligence analysis through knowledge capacity balancing of multiple language models. BACKGROUND
[0002] Financial intelligence analysis plays a crucial role in the financial field, with a wide range of applications. In market risk management, by analyzing various financial data and market information, potential risks can be identified in a timely manner, providing a basis for decision-making. For portfolio management, financial intelligence analysis helps optimize asset allocation and improve investment returns. In the field of anti-money laundering and anti-fraud, analyzing transaction data and customer behavior can effectively identify suspicious activities. In credit risk assessment, comprehensive intelligence analysis can more accurately assess the repayment ability of borrowers. For regulatory compliance, in-depth analysis of relevant regulations and market dynamics helps financial institutions adjust strategies in a timely manner to ensure compliance operations. In product development, analyzing customer demand and market trends can guide innovation. In addition, financial intelligence analysis also plays an important role in macroeconomic forecasting, merger and acquisition decision-making, and enterprise valuation. In summary, financial intelligence analysis has become the cornerstone of modern financial system operation, and has indispensable value in improving the competitiveness of financial institutions and the stability of the entire financial system.
[0003] In addition, financial intelligence analysis technology is also the cornerstone of building simulations of various subjects participating in the financial market. Through the simulation of these subjects, market analysts can provide a reference for market sentiment. Taking the stock market as an example, different types of investors such as institutional investors, individual investors, and high-frequency traders can be simulated, each with its unique decision-making logic and risk preference. This technology can capture the attention of institutional investors to company fundamentals, the sensitivity of individual investors to market rumors, and the reaction of high-frequency traders to small price fluctuations. This multi-level market participant simulation can better reflect the complexity and dynamics of the real market.
[0004] However, existing methods rely heavily on human imagination to speculate on the autonomous analysis of different groups of subjects on available financial intelligence. Alternatively, through continuously optimized deep learning methods, complete rational analysis of financial intelligence is achieved. Both of these methods are difficult to achieve a true reflection of the diverse analysis results of different groups of subjects on the same financial intelligence.
[0005] With the rapid development of artificial intelligence technology, large language models have shown great potential in multiple fields. These models, through the pre-training of massive data, have acquired extensive knowledge and reasoning ability, and can be applied to natural language processing, question and answer systems, intelligent customer service, and other scenarios. However, in the application of the financial field, when the demand for agents to imitate people of different professional levels to reason about financial intelligence, these general models often show insufficient knowledge depth, limited reasoning ability, and inability to reflect different levels of knowledge.
[0006] To solve this problem, various methods have been proposed, among which the most common is the fine-tuning-based technique. By performing additional training on a specific domain dataset, the model can acquire more domain knowledge and improve its performance in that field. However, this method has significant drawbacks. First, the fine-tuning process requires a large amount of computational resources and time, which may be difficult to bear for large-scale models. Second, the fine-tuned model is prone to knowledge bias, overfitting to specific domain data, leading to a decline in general ability. At the same time, due to the strong professional nature, this method cannot truly simulate the process of human reasoning with limited knowledge, resulting in the model's performance in actual application failing to achieve the effect of personification.
[0007] In contrast, the Retrieval-Augmented Generation (RAG) technique has emerged. RAG technology dynamically retrieves external knowledge bases during the reasoning process, providing relevant information to the model, thereby enhancing its performance in specific domains. This method does not require large-scale fine-tuning of the model and can more flexibly adapt to different domains and tasks. However, RAG technology also faces its own challenges. Its performance is highly dependent on the accuracy of retrieval, and the retrieval process is usually based on word embedding technology, which itself has certain instability and non-timeliness.
[0008] In view of the above problems, there is an urgent need for a large language model knowledge embedding technology that does not change the base model parameters while enhancing the ability of financial intelligence analysis, to realize the method of simulating financial intelligence analysis of people with different professional levels. SUMMARY
[0009] The technical problem to be solved by the present application is the lack of knowledge of large language models pre-trained on general datasets in the financial field, which leads to weak reasoning ability in financial intelligence analysis, and the existing fine-tuning-based method has a large training overhead and inevitably brings bias in professional knowledge and common sense after training, which cannot truly simulate the process of human reasoning with different levels of financial knowledge.
[0010] To solve the above technical problems, the present application provides a financial intelligence analysis method based on knowledge capacity balance, wherein the knowledge capacity balance refers to the different degrees of fusion of the financial knowledge of the base model and the knowledge of the professional financial model by the prompt word technology of the agent, so as to achieve more realistic simulation of the different effects of individuals with different knowledge levels on financial intelligence analysis, specifically including:
[0011] Step S101, collecting financial data including news, financial reports, social media, etc. According to the scale of the financial data, a language model for learning financial knowledge is selected; the language model is trained in a parameter fine-tuning manner using the financial data to obtain a language model with financial knowledge;
[0012] Step S102, creating an agent with the ability of multi-round dialogue based on a text modal dialogue window based on a large language model, and realizing the common sense-based analysis and limited financial knowledge-based analysis of the agent on financial intelligence through the prompt word engineering of multi-round dialogue;
[0013] Step S103, inputting the analysis made by the agent in S102 into the language model with financial knowledge in S101 as input; based on financial knowledge, the language model with financial knowledge makes evaluation and suggestion on the analysis and formats the output;
[0014] Step S104, through the prompt word engineering of multi-round dialogue, the agent in S102 modifies the analysis based on the evaluation and suggestion in S103. The final financial intelligence analysis result is obtained after modification, that is, the analysis result after the balance of the limited financial knowledge of the large language model used in the agent and the large amount of financial knowledge of the language model with financial knowledge.
[0015] Specifically, in step S101, a large amount of financial data including news, financial reports, social media, etc. is collected for training a language model with a large amount of financial knowledge.
[0016] Based on the scale of the financial data, a language model is selected for fine-tuning training.
[0017] Based on the language model, the base model is fine-tuned by using the self-recurrent training method to obtain a language model with financial knowledge.
[0018] Specifically, in step S102, a large language model for constructing the common sense reasoning part in financial intelligence analysis is set.
[0019] Based on the large language model, an agent with the ability of multi-round dialogue based on a text modal dialogue window is created, and the creation process of the agent includes:
[0020] setting a large language model used by the agent;
[0021] setting a parameter of the agent according to an effective parameter of the large language model;
[0022] setting a dialogue window of the agent as empty;
[0023] setting a financial knowledge level of the agent;
[0024] setting a character profile of the agent in a text form according to the financial knowledge level, and correctly reflecting the level;
[0025] the financial intelligence analysis process comprises:
[0026] setting a financial background expressing a current economic environment, related news, and market sentiment according to a field where financial intelligence to be reasoned is located;
[0027] adding information of the same character profile to the dialogue window of the agent according to the character profile of the agent, and setting a label of the information in the dialogue window as "system";
[0028] adding text content confirming the current financial background to the dialogue window of the agent, and setting a label of the content in the dialogue window as "user";
[0029] inputting the dialogue window as an input into the large language model, and outputting a confirmation of the current scenario from the large language model, and adding the output content to the dialogue window of the agent, and setting a label of the content in the dialogue window as "agent";
[0030] adding intelligence content to be analyzed to the dialogue window of the agent, the content including but not limited to market trends, company financial reports, or economic indicators, and commanding the agent to confirm the intelligence content, and setting a label of the content in the dialogue window as "user";
[0031] inputting the dialogue window as an input into the large language model, and outputting a confirmation of the intelligence from the large language model, and adding the output content to the dialogue window of the agent, and setting a label of the content in the dialogue window as "agent";
[0032] adding text content commanding the agent to perform common sense analysis on the intelligence to the dialogue window of the agent, and requiring the agent to use general common sense and basic logic to preliminarily analyze the intelligence, including but not limited to identifying obvious contradictions, evaluating the credibility of information, and considering the influence of the intelligence on the investment sentiment of the agent, and setting a label of the content in the dialogue window as "user";
[0033] inputting the dialogue window into the large language model, the output of the large language model being the common sense analysis result of the intelligence, which includes but is not limited to rationality evaluation of intelligence, preliminary judgment of potential impact, identification of possible risks or opportunities, and changes in investment sentiment, and adding the output content to the agent dialogue window and setting the label of the content in the dialogue window to "agent";
[0034] adding text content to the agent dialogue window, which commands the agent to perform limited financial knowledge analysis on the intelligence, requiring the agent to perform more in-depth analysis on the intelligence within its limited financial knowledge, including but not limited to applying basic financial concepts, considering market dynamics, and evaluating potential economic impact, and setting the label of the content in the dialogue window to "user";
[0035] inputting the dialogue window into the large language model, the output of the large language model being the limited financial knowledge analysis result of the intelligence, which includes but is not limited to interpretation of financial indicators and prediction of market reaction, and adding the output content to the agent dialogue window and setting the label of the content in the dialogue window to "agent";
[0036] Specifically, in step S103, the results of the common sense analysis and the limited financial knowledge analysis are input into the language model with financial knowledge, which generates a comprehensive suggestion based on the input content and its professional financial knowledge and analysis capabilities. The process mainly includes:
[0037] embedding the results of the common sense analysis and the limited financial knowledge analysis into a prompt template, which sets the initiator of the two analyses as an ordinary investor and other information includes the financial background, the financial intelligence to be analyzed, and the thought chain prompt words that command the language model with financial knowledge to evaluate and suggest the analysis;
[0038] inputting the prompt into the language model with financial knowledge;
[0039] The language model with financial knowledge evaluates and suggests the common sense analysis and the limited financial knowledge analysis made by the agent step by step based on the financial knowledge obtained in the fine-tuning process.
[0040] formatting the suggestion for subsequent knowledge fusion, which is recorded as the evaluation and suggestion with sufficient financial knowledge;
[0041] Specifically, in step S104,
[0042] Adding content to the agent dialogue window, which requires the agent to modify the common sense analysis and the limited financial knowledge analysis based on the evaluation and suggestions with sufficient financial knowledge, requires the agent to re-examine and optimize its previous analysis results according to the suggestions, including but not limited to adjusting certain judgments, supplementing missing angles, deepening analysis in specific fields, etc., and sets the label of this content in the dialogue window to "user";
[0043] The dialogue window is input into the large language model, and the output of the large language model is the modification result of the analysis based on the suggestions, which includes but is not limited to the modification of the original analysis, the addition of new insights, more comprehensive risk assessment or opportunity analysis, etc., and the output content is added to the agent dialogue window, and the label of this content in the dialogue window is set to "agent".
[0044] In this process, due to the characteristics of the large language model, the token distribution of the text generated in the modification process of the agent will be adaptively affected by the initially set financial knowledge level, achieving different degrees of acceptance of the evaluation and suggestions given by the language model with financial knowledge. In this process, the balance of the financial knowledge capacity of the large language model used in the agent and the large amount of financial knowledge of the language model with financial knowledge is realized.
[0045] Advantages
[0046] Compared with the general large language model agent, the agent based on the knowledge capacity balancing technology and the professional financial language model has more financial knowledge, and can analyze financial intelligence more realistically, reasonably and aligned with humans.
[0047] Compared with the large language model agent obtained by fine-tuning the base large language model with financial knowledge, the method of the present application eliminates the influence of the bias of the base large language model of the agent in the fine-tuning process, reduces the large-scale fine-tuning overhead, limits the bias of the analysis of the agent to completely professional and rational financial analysis, and enables the financial intelligence analysis technology to simulate the financial intelligence analysis process of the general public without a large amount of professional financial knowledge. BRIEF DESCRIPTION OF DRAWINGS
[0048] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, which together with the embodiments of the present application, serve to explain the present application, and do not constitute a limitation of the present application. In the drawings:
[0049] Figure 1The flowchart of the financial information analysis method based on knowledge capacity balance according to an embodiment of the present application is shown.
[0050] Figure 2 The process diagram of the financial information analysis method based on knowledge capacity balance according to an embodiment of the present application is shown.
[0051] Figure 3 The full system module diagram in the embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and embodiments, so that the application of technical means to solve technical problems and achieve technical effects can be fully understood and implemented. It should be noted that, as long as there is no conflict, each embodiment in the present application and each feature in each embodiment can be combined with each other, and the technical solutions formed thereby are within the scope of protection of the present application.
[0053] Example One
[0054] The specific implementation of the present application is illustrated by taking different analyses of the same financial news information by different groups in the futures market as an example in the implementation case one.
[0055] A financial information analysis method based on knowledge capacity balance, the flowchart is shown in Figure 1 , the detailed process is shown in Figure 2 , and the full system module diagram is shown in Figure 3 . The method comprises the following steps:
[0056] In step S101, financial data including news, financial reports, social media, etc. are collected. According to the scale of the financial data, a language model for learning financial knowledge is selected. The language model is trained in a parameter fine-tuning manner using the financial data, and a language model with financial knowledge is obtained.
[0057] First, a comprehensive financial data set Φ is constructed, which contains α subsets representing different types of financial information sources such as news reports, company financial reports, social media posts, etc. In particular, data related to the futures market is focused on, such as commodity price trends, global supply and demand balance reports, etc.
[0058] Among them, the news report data is collected from authoritative financial news sources such as Bloomberg and Reuters, with a certain daily update frequency, such as 24 times / day. The financial data collected in the form of text or web pages is saved in the database;
[0059] The company financial report is the quarterly and annual financial report of a listed company;
[0060] Social media post data is scraped from major mainstream social software platforms, with a certain real-time update frequency, such as per hour;
[0061] Futures market data mainly includes real-time prices, trading volumes, and positions of major futures varieties.
[0062] All the above data are tested for the professionalism of the data source during the cleaning process to ensure the professionalism of the data and the accuracy of the financial knowledge of the fine-tuned model.
[0063] Based on the scale |Φ| and complexity of the collected financial data, a pre-trained large-scale language model Λ is selected as the base model. This model should have strong text understanding and generation capabilities and be able to handle multi-language financial data input.
[0064] Specifically, the open-source model InternLM2-7B is selected as the model used for fine-tuning.
[0065] Next, a special fine-tuning strategy Ω is designed, which contains θ sub-tasks {ω1,ω2,...,ω θ}. These sub-tasks aim to enhance the model's capabilities in specific financial areas, such as:
[0066] ω1: Futures market terminology understanding and usage
[0067] ω2: Financial news summary and key information extraction
[0068] ω3: Market sentiment analysis and quantification
[0069] During the fine-tuning process, in this embodiment, the LoRA (Low-Rank Adaptation of Large Language Models) method is used to fine-tune the pre-trained language model Λ to build a specialized model Λ' with financial knowledge. LoRA is an efficient parameter-efficient fine-tuning technique that adds a low-rank matrix to the original model weights to achieve model adaptation.
[0070] Before the fine-tuning process begins, a set of hyperparameters H is first defined, including:
[0071] η1: LoRA rank r
[0072] η2: LoRA scaling factor α
[0073] η3: Learning rate lr
[0074] η4: Weight decay coefficient wd
[0075] η5: Batch size bs
[0076] η6: Training rounds epochs
[0077] η7: warmup_steps
[0078] The financial dataset Φ is used as training data, which is pre-processed and labeled to form a suitable format for model input. During training, a dynamic learning rate adjustment mechanism ρ(t) is used, where t represents the current training step.
[0079] For each fine-tuning task ωi, a LoRA adapter is trained separately. These adapters are optimized for tasks such as futures market term understanding, financial news summarization, and market sentiment analysis. During training, task-specific loss functions Li are used to evaluate the model's performance on each task.
[0080] To integrate different groups of analysis perspectives, a perspective conversion matrix Μ (which is part of the LoRA algorithm, used to reduce the rank of the matrix to reduce the overhead of fine-tuning) is introduced and integrated into the training of LoRA adapters. This allows the model to generate personalized analysis reports based on the characteristics of different user groups.
[0081] During training, a knowledge distillation mechanism κ is also applied to extract key knowledge from existing financial expert systems. This process is controlled by a temperature parameter to ensure that the model maintains general language understanding capabilities while obtaining in-depth financial domain knowledge.
[0082] To prevent overfitting, an early stopping strategy is used, which stops training when performance on the validation set no longer improves. At the same time, gradient clipping techniques are used to stabilize the training process and prevent gradient explosion.
[0083] After training is complete, an evaluation indicator set Ξ is used to comprehensively evaluate the performance of the model Λ'. This includes evaluating the accuracy of future futures price trend predictions, the depth and logical consistency of analysis reports, and other aspects.
[0084] Finally, a fully trained financial knowledge-enhanced language model Λ' is obtained. Based on the input financial news intelligence χ, the model can make highly professional inferences. This fine-tuned model Λ' will serve as the core component of the subsequent financial intelligence analysis system's common sense reasoning part, providing customized financial insights for different types of users, denoted as a language model with financial knowledge.
[0085] Step S102, based on a large language model, create an agent with the ability to have multi-round dialogue based on text modal dialogue windows, through multi-round dialogue prompt word engineering, realize the agent's common sense-based analysis and limited financial knowledge-based analysis of financial intelligence.
[0086] Specifically, in this embodiment, an agent a with multi-round conversation capability is created based on a large language model M_{LLM}. The M_{LLM} is a large language model of a larger scale than the step S101 InternLM-7B, and is usually a commercial non-open source model, such as chatgpt, Wenxin Yanyan, etc.
[0087] The specific process is as follows: first, set the large language model used by a as M_{LLM}, and configure the parameters of a according to the effective parameter set β = {β1, β2,..., βk} of M_{LLM}. Then, initialize the conversation window w of a as an empty set, and define its financial knowledge level γ. Based on γ, construct a character profile δ in text form that accurately reflects the professionalism and background of a in futures market analysis. Then, add δ to w and label it as "system". In order to establish the current futures background b, add a text describing b to w, such as "the current investment sentiment in the futures market is high", and label it as "user". After inputting w into M_{LLM}, a confirmation response ζ to b is obtained, and ζ is added to w and labeled as "agent".
[0088] Continue this process, add the futures intelligence to be analyzed to w , which may include information such as the price trend of specific commodity futures, changes in supply and demand of related industrial chains, or global economic indicators, and ask a to confirm the content. This instruction is labeled as "user". After M_{LLM} processes this input, a confirmation response θ containing a restatement of key information is generated, and θ is added to w and labeled as "agent".
[0089] Add instructions to w, asking a to use general common sense and basic logic to conduct a preliminary analysis of the futures intelligence. This includes identifying obvious contradictions, evaluating the credibility of the information, considering the impact of the intelligence on investment sentiment, etc. Input the updated w into M_{LLM} to obtain a common sense analysis result μ, which contains an evaluation of the rationality of the intelligence, a preliminary judgment of the potential impact, an identification of possible risks or opportunities, and a prediction of changes in investment sentiment. μ is added to w and labeled as "agent".
[0090] Next, add new instructions to w, asking a to conduct a more in-depth analysis of the futures intelligence within its limited financial knowledge. This includes applying basic financial concepts, considering market dynamics, evaluating potential economic impacts, etc. Input w into M_{LLM} again to obtain a limited financial knowledge analysis result ξ, which contains an interpretation of specific indicators in the futures market, a prediction of possible market reactions, etc. ξ is added to w and labeled as "agent".
[0091] Through this multi-round dialogue, agent a realizes two types of analysis of futures market information, from common sense understanding to application of limited professional knowledge, simulating the preliminary analysis of users with different backgrounds on futures-related financial information.
[0092] Step S103 inputs the analysis made by the agent in S102 into the language model with financial knowledge in S101 as input. Based on financial knowledge, the language model with financial knowledge evaluates and advises the analysis and formats the output.
[0093] Specifically, step S103 inputs the common sense analysis result μ and the limited financial knowledge analysis result ξ of agent a in S102 into the language model with financial knowledge Λ' in S101. First, a prompt template τ is constructed, which sets the analyst of μ and ξ as an ordinary futures investor. τ also contains the futures market background b, the futures information φ_a to be analyzed, and the thinking chain prompt σ indicating that Λ' evaluates and provides advice on the analysis.
[0094] Specifically, the structure of τ can be as follows:
[0095] """
[0096] Background: {b}
[0097] Futures information: {φ_a}
[0098] Common investor's common sense analysis: {μ}
[0099] Common investor's limited financial knowledge analysis: {ξ}
[0100] Please evaluate the above analysis as an experienced futures analyst and provide professional advice. Please consider the following aspects:
[0101] 1. Accuracy and comprehensiveness of analysis
[0102] 2. Important factors that may be overlooked
[0103] 3. In-depth insight into potential impact on futures market
[0104] 4. Investment strategy suggestions based on current market situation
[0105] Please explain your thinking process in detail.
[0106] """
[0107] Input the completed τ into Λ', and Λ' evaluates a's analysis based on its professional financial knowledge obtained in S101.
[0108] For example, φ_a involves a significant geopolitical event affecting crude oil futures, Λ' may first assess a's understanding of the event itself, then analyze whether a adequately considered the event's impact on global crude oil supply-demand balance, and the ripple effects on other energy futures contracts.
[0109] Λ' evaluation process may include the following steps: first, assess a's basic understanding of the geopolitical event; second, analyze whether a correctly identified the event's direct impact on crude oil supply and demand; third, examine whether a's prediction of market sentiment changes is reasonable; finally, evaluate whether a's analysis considers potential long-term policy changes triggered by the event and their impact on futures markets.
[0110] On this basis, Λ' generates a comprehensive recommendation ρ. ρ not only contains an evaluation of a's analysis, but also provides deeper market insights and specific investment strategy recommendations.
[0111] For example, ρ may point out that a overlooked potential OPEC policy adjustments resulting from the geopolitical event, and analyze the potential impact of such adjustments on crude oil futures prices in the next few months. Meanwhile, ρ may also suggest that investors pay attention to other futures contracts related to crude oil, such as natural gas or aviation fuel, to diversify risks.
[0112] Next, ρ is formatted into structured output φ. φ may contain the following main parts:
[0113] 1. Evaluation of a's common sense analysis
[0114] 2. Evaluation of a's limited financial knowledge analysis
[0115] 3. Analysis of key market factors
[0116] 4. Short-term and long-term market trend forecasts
[0117] 5. Investment strategy recommendations for different risk preferences
[0118] This formatted output φ facilitates subsequent knowledge fusion processes, and also makes it easier for intelligent agents simulating different backgrounds of futures market participants to understand and apply these professional analysis results.
[0119] Step S104, through the prompt word engineering of multiple rounds of dialogue, the intelligent agent in S102 modifies the analysis based on the evaluation and recommendations in S103. The final financial intelligence analysis result is obtained after modification, that is, the analysis result after balancing the limited financial knowledge of the large language model used in the intelligent agent and the large financial knowledge of the language model with financial knowledge.
[0120] In this embodiment, step S104 achieves the modification and optimization of the agent a's previous analysis based on the evaluation and recommendations φ with sufficient financial knowledge through the prompt word engineering of multiple rounds of dialogue. First, a new instruction is added to the dialogue window w of the agent a, asking a to re-examine and optimize its previous common sense analysis results μ and limited financial knowledge analysis results ξ according to φ. The content can be as follows:
[0121] """
[0122] Please re-examine and optimize your previous analysis of futures market information η based on the evaluation and recommendations provided by professional analysts.
[0123] Please pay special attention to the following points:
[0124] 1. Adjust the judgments that may have biases
[0125] 2. Supplement important factors that may have been overlooked before
[0126] 3. Deepen the analysis of specific futures varieties and market dynamics
[0127] 4. Consider the potential impact of long-term policy changes on the futures market
[0128] Based on your own beliefs, you can choose to accept these recommendations to different degrees.
[0129] """
[0130] Then, the updated w is input into the large language model M_{LLM}. M_{LLM} processes this input and generates the modified results ω based on μ and ξ based on φ. ω is added to w and marked as "agent". In this process, due to the characteristics of M_{LLM}, the text generated by a in the correction process will be self-adapted to its initial financial knowledge level γ, so that the suggestions in φ are accepted and integrated to different degrees.
[0131] Taking the crude oil futures market as an example, suppose η involves the potential impact of a major geopolitical event on oil supply. In the initial analysis μ and ξ, a may have mainly focused on the direct impact of the event on short-term crude oil prices. In this optimization process, the agent a may deepen its analysis of the geopolitical event according to the recommendations in φ. For example, a may consider the potential impact of the event on OPEC policy and further analyze the chain reaction of this policy adjustment on crude oil futures prices in the next few months. At the same time, a may also begin to focus on other futures related to crude oil, such as natural gas or aviation fuel, thus providing a more comprehensive market risk assessment.
[0132] This iterative optimization process not only allows a to re-examine and improve its previous analysis results, but also enables adjustments based on professional recommendations, supplements missing analysis angles, deepens analysis in specific areas, etc. In this way, the fusion of the limited financial knowledge in the large language model M_{LLM} used by the agent a and the large amount of financial knowledge possessed by the language model with financial knowledge Λ' is achieved.
[0133] The final financial intelligence analysis result ω reflects the organic combination of common sense understanding and professional financial knowledge, containing not only the modification of the original analysis, but also the addition of new insights, more comprehensive risk assessment and opportunity analysis, etc. This optimized analysis result not only reflects a's original analysis ability, but also incorporates professional financial knowledge from Λ', providing a futures market analysis report that is easy to understand and has a certain depth of professional knowledge for users of different backgrounds.
[0134] It is worth noting that due to the initial knowledge level γ of a and the characteristics of M_{LLM}, a will show a certain selectivity and adaptability when accepting and integrating φ's recommendations. This mechanism ensures that the final analysis result ω, while improving professionalism, still maintains the knowledge depth consistent with a's initial setting, better fitting different types of users' financial intelligence analysis while balancing the financial knowledge capacity of M_{LLM} and Λ' during knowledge fusion.
[0135] Compared with traditional methods, the key of the present invention is to overcome the serious bias generated in the text generation space after the traditional large language model uses only the fine-tuning method and RAG method to enhance the financial intelligence analysis ability, resulting in the inability to truly simulate different analysis results of the same financial intelligence by subjects with different financial knowledge levels. In view of the diversified knowledge capacity required for such financial intelligence analysis, the key innovation point of the present invention is to achieve financial knowledge capacity balance based on language model agents through multiple language models, improve the consistency of agents with human subjects represented by agents when analyzing financial intelligence through prompt engineering and communication between language models, and provide a new generation of basic technology for various agent-based financial simulation applications.
[0136] To investigate whether the agent designed in the present application behaves consistently with humans in non-rational market behavior, an evaluation method based on behavioral economics is proposed. This method draws on the core idea of prospect theory and captures the risk attitude and non-rational decision-making characteristics of the agent through a carefully designed experimental questionnaire, and compares the results with those of real humans. Specifically, the questionnaire of the classic prospect theory experiment is referenced and adapted to ensure its suitability for measuring the non-rational behavior of the agent. The questionnaire contains a series of multiple-choice questions, requiring the agent to make choices in different risk-return situations. For example, the agent needs to choose between "guaranteed to get ¥450" (option A) and "50% probability of getting ¥1000" (option B), or make a decision between "definite loss of ¥450" (option A) and "50% probability of loss of ¥1000" (option B). There are 160 different agent personas involved, covering a wide range of cognitive, emotional, and basic information processing characteristics. These agents are required to complete a questionnaire containing 17 multiple-choice questions about gains or losses. To avoid the influence of option position on decision-making, the order of options in each questionnaire is randomized.
[0137] Two different large language models (ERINE-Bot, Deepseek-V2) are selected as M_{LLM} of step S102, aiming to verify whether the human-like non-rational characteristics of the agent designed in the present application are universal. The experimental results are shown in Table 1, and the consistency of the agent corresponding to ERINE-Bot and Deepseek-V2 with human choices is 14 / 17≈82% and 12 / 17≈71% respectively, both showing high consistency with humans, indicating that they can accurately simulate human non-rational market behavior, which further verifies the universality of the human-like non-rational characteristics of the agent designed in the present application.
[0138] Table 1 Comparison of the results of the questionnaire completed by the three agents with the results of the original human experiment in prospect theory. Options A / B represent the majority choice of the agent or human in the questionnaire, and the bold option indicates that the agent's choice is consistent with that of the human. The prospect column distinguishes between "positive" (gain money) and "negative" (loss money) in monetary decisions
[0139] Problem Number ERINE-Bot Deepseek-V2 Human Problem Outlook 1 B B B Positive 2 A A A Positive 3 B B B Positive 4 A B A Negative 5 A A A Positive 6 A B B Negative 7 B B B Positive 8 A B A Negative 9 A A A Positive 10 B B B Negative 11 B B B Positive 12 B B B Positive 13 B B A Negative 14 B B B Positive 15 A B A Negative 16 B B A Positive 17 B B B Negative
Claims
1. A financial intelligence analysis method based on knowledge capacity balance, characterized in that: The following steps are involved: Step S101, collecting financial data, including news, financial reports, and social media; Selecting a language model for learning financial knowledge based on the scale of the financial data; using the financial data to train the language model by fine-tuning parameters to obtain a language model with financial knowledge; Step S102: Based on the large language model, an intelligent agent is created that is capable of conducting multi-round conversations in a text-modal dialog window. Through the prompt word engineering of the multi-round conversations, the intelligent agent can analyze financial intelligence based on common sense and limited financial knowledge. Step S103: The analysis made by the agent in S102 is input to the language model with financial knowledge in S101; based on the financial knowledge, the language model with financial knowledge evaluates and recommends the analysis and outputs the evaluation in a formatted form. Step S104, through the prompt word engineering of multiple rounds of dialogue, the intelligent agent in S102 modifies the analysis based on the evaluation and suggestions in S103; After the modification, a final financial intelligence analysis result is obtained, i.e., an analysis result after the financial knowledge capacity of the limited financial knowledge of the large language model used in the intelligent agent is balanced with the large amount of financial knowledge of the language model with financial knowledge; Step S101 is specifically as follows: First, we construct a comprehensive financial dataset Φ, which consists of α subsets {φ1, φ2, ..., φα}, representing different types of financial information sources, including news reports, company financial reports, and social media posts. During the data cleaning process, the professionalism of the data sources is verified to ensure the professionalism of the data and the accuracy of the financial knowledge of the fine-tuned model. Based on the size and complexity of the collected financial data, a pre-trained large-scale language model Λ is selected as the base model. This model should have strong text understanding and generation capabilities and be able to handle multilingual financial data input. Next, we design a fine-tuning strategy Ω, which consists of θ subtasks {ω1, ω2, ..., ωθ}; these subtasks are designed to enhance the model’s capabilities in specific financial domains. Fine-tune the pre-trained language model Λ to build a specialized model Λ' with financial knowledge; After training is completed, the performance of the model Λ' is fully evaluated using the evaluation metric set Ξ; Finally, a fully trained financial knowledge-enhanced language model Λ' is obtained; this model is able to make highly professional-level reasoning based on the input financial news intelligence χ.
2. The financial intelligence analysis method based on knowledge capacity balance according to claim 1, characterized in that: The specific training process is as follows: The pre-trained language model Λ is fine-tuned using the LoRA method to construct a specialized model Λ' with financial knowledge; Before fine-tuning begins, we first define a set of hyperparameters Η, which includes: η1: LoRA rank r η2: LoRA scaling factor α η3: learning rate lr η4: weight decay coefficient wd η5: batch size bs η6: training rounds epochs η7: warmup_steps The financial dataset Φ is used as training data. This dataset has been preprocessed and annotated to form a format suitable for model input. During the training process, a dynamic learning rate adjustment mechanism ρ(t) is adopted, where t represents the current training step number. For each fine-tuning task ωᵢ, a LoRA adapter is trained separately; these adapters are optimized for the tasks of futures market terminology understanding, financial news summarization, and market sentiment analysis. During training, the performance of the model on each task is evaluated using a task-specific loss function Lᵢ. In order to integrate the analysis perspectives of different groups, a perspective conversion matrix M is introduced. This matrix is used to reduce the rank of the matrix to reduce the overhead of fine-tuning and is integrated into the training of the LoRA adapter; this enables the model to generate personalized analysis reports based on the characteristics of different user groups; During training, a knowledge distillation mechanism, κ, is applied to extract key knowledge from existing financial expert systems. This process controls knowledge transfer through a temperature parameter, ensuring that the model acquires in-depth financial domain knowledge while maintaining general language understanding capabilities. To prevent overfitting, an early stopping strategy is adopted, that is, training is stopped when the performance on the validation set no longer improves; at the same time, gradient clipping technology is used to stabilize the training process and prevent gradient explosion.
3. The financial intelligence analysis method based on knowledge capacity balance according to claim 1, characterized in that: Step S102 is specifically as follows: Setting up a large language model for building the common sense reasoning component of financial intelligence analysis; Based on the large language model, an intelligent agent capable of conducting multi-round dialogues in a text-modal dialogue window is created. The process of creating the intelligent agent includes: Set up the large language model used by the agent; Setting the parameters of the agent according to the effective parameters of the large language model; Set the agent's dialog window to empty; Set the agent's financial knowledge level; Based on the level of financial knowledge, setting the character profile of the agent in text form to accurately reflect the level; The financial intelligence analysis process includes: According to the field of financial intelligence to be inferred, set up financial background to express the current economic environment, relevant news, and market sentiment; According to the agent's character profile, add the same character profile information to the agent's dialogue window, and set the label of the information in the dialogue window to "system"; Add text content confirming the current financial background to the agent dialogue window, and set the label of the content in the dialogue window to "user"; The dialogue window is used as input to the large language model. The output of the large language model is a confirmation of the current scene. The output content is added to the agent dialogue window, and the label of the content in the dialogue window is set to "agent"; Add intelligence content to be analyzed to the agent's dialog window. This content may include market trends, company financial reports, or financial information related to economic indicators. Instruct the agent to confirm the intelligence content and set the label of the content in the dialog window to "User"; The dialog window is used as input to the large language model. The output of the large language model is a confirmation of the intelligence, including a restatement of key information. The output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent"; Add text to the agent's dialog window that instructs the agent to perform a common sense analysis of the intelligence. This requires the agent to use common sense and basic logic to conduct a preliminary analysis of the intelligence, including identifying obvious contradictions, assessing the credibility of the information, and considering the impact of the intelligence on its own investment sentiment. Label this content in the dialog window as "User." The conversation window is used as input to the large language model. The output of the large language model is the common sense analysis result of the intelligence, which includes an assessment of the rationality of the intelligence, a preliminary judgment of the potential impact, the identification of possible risks or opportunities, and changes in its own investment sentiment. The output content is added to the agent conversation window and the label of the content in the conversation window is set to "Agent"; Add text content to the agent's dialog window, instructing the agent to analyze the intelligence using its limited financial knowledge. This content requires the agent to conduct a more in-depth analysis of the intelligence within its limited financial knowledge, including applying basic financial concepts, considering market dynamics, and assessing potential economic impacts. The label of this content in the dialog window is set to "User." The dialogue window is used as input to the large language model. The output of the large language model is the limited financial knowledge analysis result of the intelligence, which includes the interpretation of financial indicators and the prediction of market reaction. The output content is added to the agent dialogue window, and the label of the content in the dialogue window is set to "agent".
4. The financial intelligence analysis method based on knowledge capacity balance according to claim 1, characterized in that: Step S103 is specifically as follows: The results of the common sense analysis and the limited financial knowledge analysis obtained in step S102 are used as input to the language model with financial knowledge obtained in step S101. The language model with financial knowledge generates a comprehensive recommendation based on the input content and its professional financial knowledge and analytical capabilities. The process includes: The results of the common sense analysis and the limited financial knowledge analysis are embedded in a prompt word template. The prompt word template sets the initiator of the two analyses as an ordinary investor. Other information includes financial background, financial intelligence to be analyzed, and thought chain prompt words that instruct the language model with financial knowledge to make evaluations and suggestions on the analysis. Input the prompt word as input to the language model with financial knowledge; The language model with financial knowledge, based on the financial knowledge acquired during the fine-tuning process, evaluates and provides suggestions on the common sense analysis and limited financial knowledge analysis performed by the agent step by step; The suggestions are formatted and output for subsequent knowledge fusion, and recorded as evaluations and suggestions with sufficient financial knowledge.
5. The financial intelligence analysis method based on knowledge capacity balance according to claim 1, characterized in that: Step S104 is specifically as follows: Add content to the agent's dialogue window that instructs the agent to revise its common sense analysis and limited financial knowledge analysis based on the evaluation and suggestions of those with sufficient financial knowledge, requiring the agent to review and optimize its previous analysis results based on the suggestions, including adjusting certain judgments, supplementing omitted perspectives, and deepening analysis in specific areas. Set the label of this content in the dialogue window to "User"; The dialog window is used as input to the large language model. The large language model outputs a modified result of the analysis based on the suggestion, which includes a correction to the original analysis, new insights, a more comprehensive risk assessment or opportunity analysis. The output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent"; During this process, due to the characteristics of the large language model, the token distribution generated by the text during the correction process of the intelligent agent will be adaptively affected by the initially set level of financial knowledge, achieving different degrees of acceptance of the evaluation and suggestions given by the language model with financial knowledge; in this process, a balance is achieved between the limited financial knowledge of the large language model used in the intelligent agent and the large amount of financial knowledge of the language model with financial knowledge.
Citation Information
Patent Citations
Large language model reliable legal question and answer generation method based on knowledge fine tuning
CN118210891A
End-to-end agent financial model method suitable for multi-modal financial analysis task
CN118394894A