Financial intelligence analysis method based on knowledge capacity balance

Through knowledge capacity balance technology, the financial knowledge of the base model is integrated with the knowledge of professional financial models, solving the problems of lack of knowledge and limited reasoning capabilities in the financial field of large language models, and achieving more realistic and accurate financial intelligence analysis.

CN119761480AActive Publication Date: 2025-04-04TONGJI UNIV

Patent Information

Application Number
CN202411853732.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-04
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

In the application of existing large language models in the financial field, the knowledge depth and reasoning ability are insufficient, so it is impossible to truly simulate financial intelligence analysis of different knowledge levels.

Method used

Through a knowledge capacity balance method, prompt word technology is used to integrate the financial knowledge of the base model with the knowledge of professional financial models to varying degrees, so as to achieve a more realistic analysis of financial intelligence by the agent.

Benefits of technology

More accurate and authentic financial intelligence analysis is achieved, the knowledge bias of the model after fine-tuning is eliminated, the overhead of large-scale fine-tuning is reduced, and the analysis of financial intelligence by subjects of different financial knowledge levels is simulated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761480A_ABST
    Figure CN119761480A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of financial information analysis, and particularly relates to a method for realizing more accurate financial information analysis through knowledge capacity balance of multiple language models. Comprising the following steps: step S101, collecting financial data, and selecting a language model for learning financial knowledge; training the language model to obtain a language model with financial knowledge; step S102, creating an intelligent agent based on a large language model, and analyzing financial intelligence based on common sense and finite financial knowledge; step S103, inputting the analysis in the step S102 into the language model with financial knowledge in the step S101 by taking the analysis in the step S102 as input; evaluating and suggesting the analysis, and outputting the evaluation and suggesting in a formatting manner; and step S104, the intelligent agent in the step S102 modifies the analysis based on the evaluation and the suggestion in the step S103. Through communication between the prompt word engineering and the language model, the consistency between the agent and a human subject represented by the agent during financial intelligence analysis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of financial information analysis, and in particular relates to a method for achieving more accurate financial intelligence analysis by balancing the knowledge capacity of multiple language models. Background Art

[0002] Financial intelligence analysis plays a vital role in the financial sector, and its application range is wide and in-depth. In terms of market risk management, by analyzing various types of financial data and market information, potential risks can be identified in a timely manner to provide a basis for decision-making. For portfolio management, financial intelligence analysis helps to 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 to adjust strategies in a timely manner and ensure compliance operations. In terms of product development, analyzing customer needs and market trends can guide innovation. In addition, financial intelligence analysis also plays an important role in macroeconomic forecasting, M&A decisions, and corporate valuation. In short, financial intelligence analysis has become the cornerstone of the operation of the modern financial system and has indispensable value in enhancing the competitiveness of financial institutions and the stability of the entire financial system.

[0003] In addition, financial intelligence analysis technology is also the cornerstone for building simulations of various entities involved in the financial market. By simulating these entities, market analysts can be provided with a reference for market sentiment. Taking the stock market as an example, different types of investors can be simulated, such as institutional investors, retail investors, high-frequency traders, etc., each with its own unique decision-making logic and risk preferences. This technology can capture the attention of institutional investors to company fundamentals, the sensitivity of retail investors to market rumors, and the reaction of high-frequency traders to small price fluctuations. This multi-level simulation of market participants can better reflect the complexity and dynamics of the real market.

[0004] However, existing methods rely heavily on artificial imagination of different groups of people to infer their autonomous analysis of available financial intelligence. Alternatively, they use continuously optimized deep learning methods to achieve a completely rational analysis of financial intelligence. Both methods are difficult to truly reflect the diverse analysis results of different groups of people on the same financial intelligence.

[0005] With the rapid development of artificial intelligence technology, large language models have shown great potential in many fields. These models have acquired extensive knowledge and reasoning capabilities through pre-training on massive data, and can be applied to multiple scenarios such as natural language processing, question-answering systems, and intelligent customer service. However, in financial applications, when the intelligent agent is required to imitate people of different professional levels to reason about financial intelligence, these general models often show problems such as insufficient knowledge depth, limited reasoning ability, and inability to reflect different knowledge levels.

[0006] To solve this problem, a variety of methods have been proposed, among which the most common is the fine-tuning-based technology. By performing additional training on a dataset in a specific field, 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 lot of computing resources and time, which may be unbearable for larger models. Secondly, the fine-tuned model is prone to knowledge bias and overfitting to data in a specific field, resulting in a decrease in general capabilities. At the same time, due to its strong professionalism, this method cannot truly simulate the process of general humans using limited knowledge to make inferences, resulting in the model's performance in practical applications not being able to achieve an anthropomorphic effect.

[0007] In contrast, Retrieval Augmented Generation (RAG) technology has emerged. RAG technology dynamically retrieves external knowledge bases during the reasoning process to provide relevant information to the model, thereby enhancing its performance in specific fields. This method does not require large-scale fine-tuning of the model and can be more flexibly adapted to different fields 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 untimeliness.

[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 and can improve the financial intelligence analysis capabilities, so as to realize the financial intelligence analysis method that simulates people with different professional levels. Summary of the invention

[0009] The technical problem to be solved by the present invention is that the large language model pre-trained with a general data set lacks knowledge in the financial field, resulting in its weak reasoning ability in financial intelligence analysis. In addition, the existing fine-tuning-based methods have a huge training overhead and inevitably bring about bias in professional knowledge and common sense after training, and cannot truly simulate the process of humans reasoning with different degrees of financial knowledge.

[0010] In order to solve the above technical problems, the present invention provides a financial intelligence analysis method based on knowledge capacity balance, wherein knowledge capacity balance means that the intelligent agent can achieve different degrees of integration of the financial knowledge of the base model and the knowledge of the professional financial model through the prompt word technology, so as to achieve a 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 financial data, selecting a language model for learning financial knowledge; using the financial data, training the language model by fine-tuning parameters to obtain a language model with financial knowledge;

[0012] Step S102, based on the large language model, an intelligent agent is created that has the ability to conduct multiple rounds of dialogue based on a text modal dialogue window, and through the prompt word engineering of the multiple rounds of dialogue, the intelligent agent can perform common sense-based analysis and limited financial knowledge-based analysis of financial intelligence;

[0013] Step S103, taking the analysis made by the agent in S102 as input and inputting it into the language model with financial knowledge in S101; based on the financial knowledge, the language model with financial knowledge makes evaluation and suggestions on the analysis and outputs them in a formatted manner;

[0014] Step S104, through the prompt word engineering of multiple rounds of dialogue, the agent in S102 modifies the analysis based on the evaluation and suggestions in S103. After the modification, the final financial intelligence analysis result is obtained, that is, the analysis result after the financial knowledge capacity of the limited financial knowledge of the large language model used in the agent is balanced with the large amount of financial knowledge of the language model with financial knowledge.

[0015] Specifically, in step S101, a large amount of financial data is collected, including news, financial reports, social media, etc., 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, an autoregressive training method is used to fine-tune the basic model to obtain a language model with financial knowledge.

[0018] Specifically, step S102 is to set a large language model for constructing the common sense reasoning part in financial intelligence analysis.

[0019] Based on the large language model, an intelligent agent capable of conducting multi-round dialogues based on a text modal dialogue window is created. The process of creating the intelligent agent includes:

[0020] Set up the large language model used by the agent;

[0021] Setting parameters of the agent according to the effective parameters of the large language model;

[0022] Set the agent's dialog window to empty;

[0023] Set the agent's financial knowledge level;

[0024] According to the financial knowledge level, setting the character profile of the agent in text form to accurately reflect the level;

[0025] The financial intelligence analysis process includes:

[0026] According to the field of financial intelligence to be inferred, set up financial background that expresses the current economic environment, relevant news, and market sentiment;

[0027] According to the character data of the agent, add the same character data information to the agent dialogue window, and set the label of the information in the dialogue window to "system";

[0028] Adding text content confirming the current financial background to the agent dialogue window, and setting the label of the content in the dialogue window to "user";

[0029] The dialog window is used as input to the large language model, the output of the large language model is confirmation of the current scene, and the output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent";

[0030] Adding intelligence content to be analyzed to the agent's dialogue window, the content including but not limited to financial related information such as market trends, company financial reports or economic indicators, and instructing the agent to confirm the intelligence content, and setting the label of the content in the dialogue window as "user";

[0031] 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, the confirmation content includes but is not limited to restating key information, and the output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent";

[0032] Adding text content to the agent dialogue window that instructs the agent to conduct a common sense analysis of the intelligence, requiring the agent to use common sense and basic logic to conduct a preliminary analysis of the intelligence, including but not limited to identifying obvious contradictions, evaluating the credibility of the information, and considering the impact of the intelligence on its own investment sentiment, and setting the label of the content in the dialogue window to "user";

[0033] The dialog window is used as input to the large language model, and the output of the large language model is the common sense analysis result of the intelligence, which includes but is not limited to the rationality assessment of the intelligence, the preliminary judgment of the potential impact, the identification of possible risks or opportunities, and the change of its own investment sentiment, and the output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent";

[0034] Adding text content to the agent dialogue window that instructs the agent to perform limited financial knowledge analysis of the intelligence, requiring the agent to perform a more in-depth analysis of the intelligence within its limited financial knowledge, including but not limited to applying basic financial concepts, considering market dynamics, and evaluating potential economic impacts, and setting the label of the content in the dialogue window to "user";

[0035] The dialog window is used as input to the large language model, and the output of the large language model is the limited financial knowledge analysis result of the intelligence, which includes but is not limited to the interpretation of financial indicators and the prediction of market reaction, and the output content is added to the agent dialog window, and the label of the content in the dialog window is set as "agent";

[0036] Specifically, in step S103, the results of the common sense analysis and the results of the limited financial knowledge analysis are input into the language model with financial knowledge. The language model with financial knowledge generates a comprehensive suggestion based on the input content and combined with its professional financial knowledge and analysis ability. The process mainly includes:

[0037] The results of the common sense analysis and the results of the limited financial knowledge analysis are embedded in a prompt word template, wherein the prompt word template 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 a thought chain prompt word that instructs the language model with financial knowledge to make evaluations and suggestions on the analysis;

[0038] Input the prompt word as input to the language model with financial knowledge;

[0039] The language model with financial knowledge evaluates and makes suggestions on the common sense analysis and the limited financial knowledge analysis made by the agent step by step based on the financial knowledge acquired during the fine-tuning process;

[0040] Outputting the suggestions in a formatted manner for subsequent knowledge fusion, and recording them as evaluations and suggestions with sufficient financial knowledge;

[0041] Specifically, step S104:

[0042] Adding content to the agent dialogue window that instructs the agent to modify the common sense analysis and the limited financial knowledge analysis based on the evaluation and suggestions with sufficient financial knowledge, requiring the agent to review and optimize its previous analysis results based on the suggestions, including but not limited to adjusting certain judgments, supplementing omitted angles, deepening analysis in specific areas, etc., and setting the label of this content in the dialogue window to "user";

[0043] The dialog window is used as input and input into the large language model. The output of the large language model is the modification result of the analysis based on the suggestion, which includes but is not limited to the correction of the original analysis, new insights, more comprehensive risk assessment or opportunity analysis, etc. The output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent".

[0044] In this process, due to the characteristics of the large language model, the token distribution generated by the text in the correction process of the agent will be adaptively affected by the financial knowledge level initially set, so as to achieve different degrees of acceptance of the evaluation and suggestions given by the language model with financial knowledge. In this process, the financial knowledge capacity balance between 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 is achieved.

[0045] Beneficial Effects

[0046] Compared with the intelligent agent that only uses a general large language model, the intelligent agent that combines the large language model based on knowledge capacity balancing technology with the professional financial language model has more financial knowledge and can analyze financial intelligence more realistically, reasonably, and in line 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 invention eliminates the influence of the bias of financial knowledge on the base large language model of the agent during fine-tuning. While reducing the large-scale fine-tuning overhead, it limits the bias of the agent's analysis towards completely professional and rational financial analysis, enabling financial intelligence analysis technology to simulate the financial intelligence analysis process of ordinary people who do not have a lot of professional financial knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0049] Figure 1A schematic diagram of the process of a financial intelligence analysis method based on knowledge capacity balance according to the first embodiment of the present invention is shown;

[0050] Figure 2 A schematic diagram of the process of a financial intelligence analysis method based on knowledge capacity balance according to the first embodiment of the present invention is shown;

[0051] Figure 3 The diagram shows a full system module diagram in the first embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that as long as there is no conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present invention.

[0053] Embodiment 1

[0054] In the implementation case 1, different analyses of the same financial news intelligence by different groups of people in the futures market are taken as an example to illustrate the specific implementation mode of the present invention.

[0055] A financial intelligence analysis method based on knowledge capacity balance, the process is as follows Figure 1 The detailed process is as shown in Figure 2 As shown in the figure, the whole system module is as follows Figure 3 . The following steps are included:

[0056] Step S101, collect financial data, including news, financial reports, social media, etc. According to the scale of the financial data, select a language model for learning financial knowledge. Use the financial data to train the language model by fine-tuning parameters to obtain a language model with financial knowledge.

[0057] First, we construct a comprehensive financial dataset Φ, which contains α subsets They represent different types of financial information sources such as news reports, company financial reports, social media posts, etc. In particular, they focus on data related to the futures market, such as commodity price trends, global supply and demand balance reports, etc.

[0058] Among them, news report data is collected from authoritative financial news sources such as Bloomberg and Reuters, and a certain daily update frequency is maintained, such as 24 times / day. Financial data collected in the form of text or web pages will be stored in the database;

[0059] Corporate financial reports are quarterly and annual financial reports of public companies;

[0060] Social media post data is captured from major mainstream social software platforms and maintained at a certain real-time update frequency, such as times / hour;

[0061] Futures market data mainly include real-time prices, trading volumes, positions and other data of major futures products.

[0062] During the cleaning process, all the above data have their data sources verified for professionalism to ensure the professionalism of the data and the accuracy of the financial knowledge of the fine-tuned model.

[0063] Based on the size and complexity of the collected financial data, a pre-trained large-scale language model Λ is selected as the base model. The model should have strong text understanding and generation capabilities and be able to handle multilingual financial data input.

[0064] Specifically, the open source model InternLM2-7B was selected as the model used for fine-tuning.

[0065] Next, we design a specialized fine-tuning strategy Ω, which consists of θ subtasks {ω1,ω2,...,ω θ These subtasks are designed to enhance the model’s capabilities in specific financial domains, such as:

[0066] ω1: Understanding and using futures market terms

[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 pre-trained language model Λ is fine-tuned using the LoRA (Low-Rank Adaptation of Large Language Models) method to construct a specialized model Λ' with financial knowledge. LoRA is an efficient parameter-efficient fine-tuning technique that achieves model adaptation by adding a low-rank matrix next to the original model weights.

[0070] Before the fine-tuning process begins, a hyperparameter set Η is first defined, which includes:

[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. The dataset is preprocessed and labeled 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.

[0079] For each fine-tuning task ωi, a LoRA adapter is trained separately. These adapters are optimized for tasks such as futures market terminology understanding, financial news summarization, and market sentiment analysis. During training, the task-specific loss function Li is used to evaluate the performance of the model on each task.

[0080] In order to integrate the analysis perspectives of different groups, the perspective conversion matrix M is introduced (this matrix is ​​part of the LoRA algorithm and is used to reduce the rank of the matrix to reduce the overhead of fine-tuning) and 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.

[0081] During the training process, a knowledge distillation mechanism κ is also applied to extract key knowledge from existing financial expert systems. This process controls knowledge transfer through temperature parameters to ensure that the model acquires deep financial domain knowledge while maintaining general language understanding capabilities.

[0082] 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.

[0083] After training is complete, the evaluation indicator set Ξ is used to comprehensively evaluate the performance of the model Λ'. This includes the evaluation of the accuracy of the prediction of future futures price trends, the depth of the analysis report, and the logical consistency.

[0084] Finally, a fully trained language model Λ' with enhanced financial knowledge is obtained. The model can make highly professional-level inferences based on the input financial news intelligence χ. This fine-tuned model Λ' will serve as the core component of the common sense reasoning part of the subsequent financial intelligence analysis system, providing customized financial insights for different types of users, and is recorded as a language model with financial knowledge.

[0085] Step S102, based on the large language model, an intelligent agent is created that has the ability to conduct multiple rounds of dialogue based on a text modal dialogue window. Through the prompt word engineering of multiple rounds of dialogue, the intelligent agent can perform common sense-based analysis of financial intelligence and analysis based on limited financial knowledge.

[0086] Specifically, in this embodiment, an agent a with multi-round dialogue capability is created based on a large language model M_{LLM}. The M_{LLM} is a large language model with a larger scale than step S101 InternLM-7B, and is usually a commercial non-open source model, such as chatgpt, Wenxinyiyan, etc.

[0087] The details are as follows: First, set the large language model used by a to M_{LLM}, and configure the parameters of a according to the effective parameter set β={β1,β2,...,βk} of M_{LLM}. Next, initialize α's dialogue window w to an empty set, and define its financial knowledge level γ. Based on γ, construct a textual character profile δ that accurately reflects a's professionalism and background in futures market analysis. Subsequently, add δ to w and set its label to "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 mark it as "user". After w is entered into M_{LLM}, a confirmation response ζ to b is obtained, and ζ is added to w and marked as "agent".

[0088] Continue this process and add the futures intelligence to be analyzed to w It may include information such as the price trend of specific commodity futures, changes in supply and demand in the relevant industrial chain, or global economic indicators, and requires confirmation from a This instruction is marked as "user". M_{LLM} processes this input and generates a The confirmation response θ of the key information restatement is added to w and labeled as “agent”.

[0089] Add instructions to w, requiring a to use common sense and basic logic to conduct a preliminary analysis of futures intelligence. This includes identifying obvious contradictions, evaluating the credibility of information, considering the impact of intelligence on investment sentiment, etc. Input the updated w into M_{LLM} to obtain a's common sense analysis result μ, 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 a prediction of changes in investment sentiment. μ is added to w and marked as "agent".

[0090] Next, new instructions are added to w, requiring a to conduct a deeper analysis of futures intelligence within its limited financial knowledge. This includes applying basic financial concepts, considering market dynamics, assessing potential economic impacts, etc. w is input into M_{LLM} again to obtain a's limited financial knowledge analysis results ξ, which include interpretations of specific indicators in the futures market, possible market reaction predictions, etc. ξ is added to w and labeled as "agent".

[0091] Through this multi-round dialogue method, agent a realizes two types of analysis of futures market intelligence, from common sense understanding to the application of limited professional knowledge, simulating the preliminary analysis of futures-related financial intelligence by users from different backgrounds.

[0092] Step S103, the analysis made by the agent in S102 is input to the language model with financial knowledge in S101. Based on financial knowledge, the language model with financial knowledge makes evaluation and suggestions on the analysis and outputs them in a formatted manner.

[0093] Specifically, step S103 takes the common sense analysis result μ and the limited financial knowledge analysis result ξ of agent a in S102 as input and passes them to the language model Λ' with financial knowledge in S101. First, a prompt word template τ is constructed, which sets the analyst of μ and ξ as an ordinary futures investor. τ also contains the futures market background b, the futures intelligence φ_a to be analyzed, and the thinking chain prompt word σ that instructs Λ' to evaluate the analysis and provide suggestions.

[0094] Specifically, the structure of τ can be as follows:

[0095] """

[0096] Background:

[0097] Futures Information: {φ_a}

[0098] Common sense analysis of ordinary investors: {μ}

[0099] Analysis of the limited financial knowledge of ordinary investors: {ξ}

[0100] As an experienced futures analyst, please evaluate the above analysis 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 insights into the potential impact on futures markets

[0104] 4. Investment strategy recommendations based on current market conditions

[0105] Please explain your thought process in detail, step by step.

[0106] """

[0107] The filled-in τ is input into Λ', which performs a comprehensive evaluation of the analysis of a based on its professional financial knowledge acquired in S101.

[0108] For example, φ_a involves a major geopolitical event that affects crude oil futures. Λ' may first evaluate the accuracy of a's understanding of the event itself, and then analyze whether a has fully considered the impact of the event on the global crude oil supply and demand balance, as well as the chain reaction on other energy futures products.

[0109] The evaluation process of Λ' may include the following steps: first, evaluate a's basic understanding of geopolitical events; second, analyze whether a correctly identifies the direct impact of the event on crude oil supply and demand; third, examine whether a's prediction of changes in market sentiment is reasonable; finally, evaluate whether a's analysis takes into account the long-term policy changes that may be triggered by the event and its impact on the futures market.

[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 has ignored the possible policy adjustment of the Organization of Petroleum Exporting Countries (OPEC) caused by the geopolitical event, and analyze the potential impact of such adjustment on crude oil futures prices in the coming months. At the same time, ρ may also suggest that investors pay attention to other futures products related to crude oil, such as natural gas or aviation fuel, to diversify risks.

[0112] Next, ρ is formatted and converted into a structured output φ. φ may contain the following main parts:

[0113] 1. Evaluation of a common sense analysis

[0114] 2. Evaluation of the analysis of a limited financial knowledge

[0115] 3. Additional 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 the subsequent knowledge fusion process, and also makes it easier for intelligent agents simulating futures market participants with different backgrounds to understand and apply these professional analysis results.

[0119] Step S104, through the prompt word engineering of multiple rounds of dialogue, the agent in S102 modifies the analysis based on the evaluation and suggestions in S103. After the modification, the final financial intelligence analysis result is obtained, that is, the analysis result after the financial knowledge capacity of the limited financial knowledge of the large language model used in the agent is balanced with the large amount of financial knowledge of the language model with financial knowledge.

[0120] In this embodiment, step S104 enables agent a to modify and optimize its previous analysis based on the evaluation and suggestion φ 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 agent a, requiring a to review and optimize its previous common sense analysis result μ and limited financial knowledge analysis result ξ based on φ. The content can be as follows:

[0121] """

[0122] Please review and optimize your previous analysis of futures market intelligence η based on the comments and suggestions provided by professional analysts.

[0123] Pay special attention to the following points:

[0124] 1. Adjust judgments that may be biased

[0125] 2. Supplement important factors that may have been overlooked before

[0126] 3. Deepen the analysis of specific futures products 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 may choose to accept these suggestions to varying degrees.

[0129] """

[0130] Subsequently, the updated w is input into the large language model M_{LLM}. M_{LLM} processes this input and generates a modification result ω of μ and ξ based on φ. ω is added to w and labeled as "agent". In this process, due to the characteristics of M_{LLM}, the text generated by a during the correction process will be adaptively affected by its initial financial knowledge level γ, thereby achieving different degrees of acceptance and integration of the suggestions in φ.

[0131] Taking the crude oil futures market as an example, suppose η involves the potential impact of a major geopolitical event on crude oil supply. In the initial analysis μ and ξ, a may focus mainly on the direct impact of the event on short-term crude oil prices. During this optimization process, agent a may deepen its analysis of geopolitical events based on the suggestions in φ. For example, a may consider the potential impact of the event on OPEC policy and further analyze the chain reaction of such policy adjustments on crude oil futures prices in the coming months. At the same time, a may also begin to pay attention to other futures products related to crude oil, such as natural gas or aviation fuel, to provide a more comprehensive market risk assessment.

[0132] This iterative optimization process not only allows a to review and improve its previous analysis results, but also adjusts its judgment based on professional advice, supplements missed analysis angles, deepens analysis in specific areas, etc. In this way, the limited financial knowledge in the large language model M_{LLM} used by agent a is integrated with the large amount of financial knowledge possessed by the language model Λ' with financial knowledge.

[0133] The final financial intelligence analysis result ω reflects the organic combination of common sense understanding and professional financial knowledge, including not only the revision of the original analysis, but also the new insights, more comprehensive risk assessment and opportunity analysis. This optimized analysis result not only reflects the original analysis ability of a, but also incorporates the professional financial knowledge from Λ', thus providing users from different backgrounds with a futures market analysis report that is both easy to understand and has a certain degree of professional depth.

[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 degree of selectivity and adaptability when accepting and integrating the suggestions in φ. This mechanism ensures that the final analysis result ω, while improving professionalism, still maintains the knowledge depth consistent with the initial setting of a, thereby better fitting different types of users' needs for financial intelligence. , and achieve the financial knowledge capacity balance between the limited financial knowledge of M_{LLM} and the professional financial knowledge of Λ' while carrying out knowledge fusion.

[0135] Compared with traditional methods, the key of the present invention is to overcome the serious bias in the text generation space after the traditional large language model only uses the fine-tuning method and RAG method to enhance the financial intelligence analysis ability, resulting in the inability to truly simulate the different analysis results of the same financial intelligence by subjects with different financial knowledge levels. In view of the diverse knowledge capacity required for such financial intelligence analysis, the key innovation of the present invention is to achieve the balance of financial knowledge capacity based on language model agents through multiple language models, and improve the consistency of the agent with the human subject represented by the agent when conducting financial intelligence analysis through the communication between the prompt word engineering and the language model, providing a new generation of basic technology for various financial simulation applications based on agents.

[0136] In order to study whether the performance of the intelligent agent designed by the present invention in irrational market behavior is consistent with that of humans, an evaluation method based on behavioral economics is proposed. This method draws on the core ideas of prospect theory, captures the risk attitude of the intelligent agent and its irrational decision-making characteristics through a carefully designed experimental questionnaire, and compares them with real human results. Specifically, the questionnaire of the classic prospect theory experiment is referenced and adapted to ensure that it is suitable for measuring the irrational behavior of intelligent agents. The questionnaire contains a series of multiple-choice questions, requiring the intelligent agent to make choices in different risk-return scenarios. For example, the intelligent agent needs to choose between "guaranteed to get ¥450" (option A) and "50% probability to get ¥1000" (option B), or make a decision between "certain loss of ¥450" (option A) and "50% probability to lose ¥1000" (option B). 160 different intelligent agent personalities are involved, covering a variety of cognitive, emotional and basic information processing characteristics. These intelligent agents are required to complete a questionnaire containing 17 multiple-choice questions about gains or losses. To avoid the influence of the position of the options on the decision, the order of the options in each questionnaire is randomized.

[0137] Two different large language models (ERINE-Bot and Deepseek-V2) are selected as M_{LLM} in step S102 to verify whether the human-like irrational characteristics of the agent designed by the present invention are universal. The experimental results are shown in Table 1. The consistency between the ERINE-Bot and Deepseek-V2 agents and human choices is 14 / 17≈82% and 12 / 17≈71% respectively, both showing high human consistency, indicating that they can simulate human irrational market behavior more accurately, which further verifies the universality of the agent designed by the present invention in terms of human-like irrational characteristics.

[0138] Table 1 Comparison of the results of the three agents completing the questionnaire with the results of the original human experiment in prospect theory. Option A / B represents the majority choice of the agents or humans in the questionnaire. The bold option indicates that the agent's choice is consistent with that of humans. The prospect column of the question distinguishes between the "positive" (gaining money) and "negative" (losing money) situations in monetary decision making.

[0139] Question 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. According to the scale of financial data, a language model for learning financial knowledge is selected; using the financial data, the language model is trained 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 has the ability to conduct multiple rounds of dialogue based on a text modal dialogue window, and through the prompt word engineering of the multiple rounds of dialogue, the intelligent agent can perform common sense-based analysis and limited financial knowledge-based analysis of financial intelligence; Step S103, taking the analysis made by the agent in S102 as input and inputting it into the language model with financial knowledge in S101; based on the financial knowledge, the language model with financial knowledge makes evaluation and suggestions on the analysis and outputs them in a formatted manner; 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, the final financial intelligence analysis result is obtained, that is, the 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.

2. The financial intelligence analysis method based on knowledge capacity balance as claimed in claim 1, characterized in that: Step S101 is specifically as follows: First, we construct a comprehensive financial dataset Φ, which contains α subsets They represent different types of financial information sources, including news reports, company financial reports, and social media posts. During the cleaning process, the professionalism of the data sources is tested 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; the model should have strong text understanding and generation capabilities and be able to handle multi-language financial data input; Next, we design a fine-tuning strategy Ω, which contains θ 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 evaluation metric set Ξ is used to comprehensively evaluate the performance of the model Λ'; Finally, a fully trained financial knowledge enhanced language model Λ' is obtained; this model is able to make highly professional inferences based on the input financial news intelligence χ.

3. The financial intelligence analysis method based on knowledge capacity balance as claimed in claim 2 is characterized in that: The specific training process is as follows: The pre-trained language model Λ is fine-tuned using the LoRA method to build a specialized model Λ' with financial knowledge; Before the fine-tuning process begins, a set of hyperparameters Η is defined, 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. The dataset is preprocessed and annotated to form a format suitable for model input. During the training process, a dynamic learning rate adjustment mechanism ρ(t) is used, where t represents the current training step number. For each fine-tuning task ωi, a LoRA adapter is trained separately; these adapters are optimized for tasks such as futures market terminology understanding, financial news summarization, and market sentiment analysis; during training, the task-specific loss function Li is used to evaluate the performance of the model on each task; In order to fuse the analysis perspectives of different groups, a perspective conversion matrix M is introduced, which 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; enabling the model to generate personalized analysis reports based on the characteristics of different user groups; During the training process, the knowledge distillation mechanism κ is applied to extract key knowledge from the existing financial expert system. This process controls the knowledge transfer through the temperature parameter to ensure that the model acquires in-depth financial domain knowledge while maintaining the ability to understand general language. In order 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.

4. The financial intelligence analysis method based on knowledge capacity balance as claimed in claim 1, characterized in that: Step S102 is specifically as follows: Setting up a large language model for building the common sense reasoning part of financial intelligence analysis; Based on the large language model, an intelligent agent capable of conducting multi-round dialogues based on 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 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; According to the financial knowledge level, 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 that expresses 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, and the output of the large language model is 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, including but not limited to market trends, company financial reports, or economic indicators and financial related information, and 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, and the output of the large language model is confirmation of the intelligence, including but not limited to restating key information, and 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 content to the agent dialogue window that instructs the agent to conduct a common sense analysis of the intelligence, requiring the agent to use common sense and basic logic to conduct a preliminary analysis of the intelligence, including but not limited to identifying obvious contradictions, evaluating the credibility of the information, and considering the impact of the intelligence on its own investment sentiment, and set the label of this 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 the common sense analysis result of the intelligence, which includes but is not limited to the rationality assessment of the intelligence, the preliminary judgment of the potential impact, the identification of possible risks or opportunities, and the change of its own investment sentiment. The output content is added to the dialogue window of the agent, and the label of the content in the dialogue window is set to "agent"; Add text content to the agent dialogue window that instructs the agent to perform limited financial knowledge analysis of the intelligence, requiring the agent to conduct a more in-depth analysis of the intelligence within its limited financial knowledge, including but not limited to applying basic financial concepts, considering market dynamics, and evaluating potential economic impacts, and 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 output of the large language model is the limited financial knowledge analysis result of the intelligence, which includes but is not limited to the interpretation of financial indicators and the prediction of market reaction. The output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent".

5. The financial intelligence analysis method based on knowledge capacity balance as claimed in claim 1, characterized in that: Step S103 is specifically as follows: The results of the analysis based on common sense and the results of the analysis based on limited financial knowledge 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 suggestion based on the input content and combined with its professional financial knowledge and analysis ability; The process includes: The results of the common sense analysis and the results of the limited financial knowledge analysis are embedded in a prompt word template, wherein the prompt word template sets the initiator of the two analyses as an ordinary investor, and other information includes financial background, financial intelligence to be analyzed, and a thought chain prompt word that instructs a 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 evaluates and makes suggestions on the common sense analysis and the limited financial knowledge analysis made by the agent step by step based on the financial knowledge acquired during the fine-tuning process; The suggestions are formatted and output for subsequent knowledge fusion, and recorded as evaluations and suggestions with sufficient financial knowledge.

6. The financial intelligence analysis method based on knowledge capacity balance as claimed in claim 1, characterized in that: Step S104 is specifically as follows: Adding content to the agent dialogue window that instructs the agent to modify the common sense analysis and the limited financial knowledge analysis based on the evaluation and suggestions of the agent with sufficient financial knowledge, requiring the agent to review and optimize its previous analysis results according to the suggestions, including but not limited to adjusting certain judgments, supplementing omitted angles, deepening the analysis of specific areas, etc., and setting the label of this content in the dialogue window to "user"; The dialog window is used as input to the large language model, and the output of the large language model is the modification result of the analysis based on the suggestion, which includes but is not limited to the correction of the original analysis, the new insight, the more comprehensive risk assessment or opportunity analysis, etc., and the output content is added to the agent dialog window, and the label of the content in the dialog window is set to "agent"; In 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 financial knowledge level initially set, so as to achieve 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

  • Financial intelligence analysis method and system based on parallel computing

    CN114490626A

  • Financial analysis task reasoning method based on large language model, terminal and medium

    CN117744804A

  • Multi-agent question answering system and method based on large language model

    CN118093833A

  • 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

Cited By

  • Simulation system for bulk commodity price risk management

    CN120430629A