Transaction decision generation method and system based on large language model

Through the transaction decision generation method based on the large language model, the transaction market information is analyzed and split, and the existing quantitative trading system is solved, and the problem of difficulty in capturing complex market characteristics is achieved, high-quality transaction decision generation is achieved, and market transaction efficiency and financial market competitiveness are improved.

CN120011483AInactive Publication Date: 2025-05-16HANGZHOU XINGRUI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510488315.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing quantitative trading systems are difficult to capture small features in complex market environments, limiting their profitability in actual market environments.

Method used

The transaction decision generation method based on the large language model is adopted. By obtaining and analyzing trading market information, the information retrieval index is generated, and it is divided into multiple search sub-tasks. These tasks are performed using the corresponding search tools, the search results are obtained, and the transaction decision is finally generated.

Benefits of technology

It can generate high-quality trading decisions, enhance transaction risk control, improve the credibility and interpretability of trading decisions, promote the development of quantitative trading, and improve market trading efficiency and financial market competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011483A_ABST
    Figure CN120011483A_ABST
Patent Text Reader

Abstract

The invention provides a transaction decision generation method and system based on a large language model, and relates to the technical field of computers, and the method comprises the steps: obtaining transaction market information; analyzing the transaction market information to obtain an information retrieval index of a market change trend corresponding to the transaction market information; calling a large language model to identify the information retrieval index, splitting the information retrieval index into a plurality of retrieval sub-tasks, and calling a search tool matched with the retrieval sub-tasks to execute the corresponding retrieval sub-tasks to obtain a retrieval result; and generating a transaction decision according to the market change trend and the retrieval result. According to the method, the transaction risk control can be enhanced through the generated transaction decision, the credibility and the interpretability of the transaction decision are remarkably improved through the retrieval result formed by the different retrieval sub-tasks, quantitative transaction development is promoted, and the market transaction efficiency and the financial market competitiveness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a transaction decision generation method and system based on a large language model. Background Art

[0002] At present, quantitative trading systems are mainly based on statistics and mathematics: such quantitative trading systems are designed to construct statistics that can represent the future profitability of assets, and specify trading strategies based on these statistics, such as momentum factors, value factors, dividend factors, etc. These statistics reflect a certain inherent characteristic of assets, and by setting investment rules based on the above characteristics, an investment strategy can be formed. However, the actual market environment is often complex and changeable, and some of the subtle features are difficult to capture through fixed statistics, which limits its profitability in the actual market environment. Summary of the invention

[0003] The purpose of this application is to provide a trading decision generation method, system, storage medium and device based on a large language model, which can generate high-quality trading decisions based on trading market information and is suitable for automatic quantitative trading systems.

[0004] In order to solve the above technical problems, this application provides a transaction decision generation method based on a large language model. The specific technical solution is as follows:

[0005] Obtain trading market information;

[0006] Parsing the transaction market information to obtain an information retrieval index of the market change trend corresponding to the transaction market information;

[0007] Calling the large language model to identify the information retrieval index, splitting the information retrieval index into a number of retrieval subtasks, calling a search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtaining a retrieval result;

[0008] A trading decision is generated according to the market change trend and the search results; the trading decision includes an investment strategy and investment reasons.

[0009] Optionally, parsing the transaction market information to obtain an information retrieval index of a market change trend corresponding to the transaction market information includes:

[0010] Reading news information in the trading market information;

[0011] retrieving additional news stories related to the news information;

[0012] Retrieving the financial market fluctuation pattern corresponding to the news information;

[0013] Determine market trends based on the additional news reports and the financial market fluctuation patterns;

[0014] An index framework is determined, and index content is filled based on the index framework according to the market change trend to obtain an information retrieval index.

[0015] Optionally, if the news information includes structured information and unstructured information, reading the news information in the trading market information further includes:

[0016] For the structured information, a statistical analysis algorithm is used to determine the data features of the structured information, and a data mining algorithm is used to determine the data regularity of the structured information; the data features and the data regularity are used to assist in determining the market change trend;

[0017] For the unstructured information, a natural language recognition algorithm is used to extract key information from the unstructured information; the key information includes subject entities, time types and impact dimensions; related market information associated with the key information is retrieved; an event impact chain is constructed based on the key information and the related market information; the event impact chain is used to assist in determining the market change trend.

[0018] Optionally, calling the large language model to identify the information retrieval index, splitting the information retrieval index into a number of retrieval subtasks, calling a search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtaining the retrieval results including:

[0019] Constructing prompt words for the information retrieval index;

[0020] guiding the large language model to recognize the prompt word, and splitting the information retrieval index into retrieval subtasks according to a set task decomposition strategy; the set task decomposition strategy includes at least one of a decomposition strategy based on market trends, a decomposition strategy based on influencing factors, and a decomposition strategy based on competitor analysis;

[0021] A search tool matching the search subtask is determined from a search tool library, a query statement matching the search subtask is determined, and the search tool is used to search the query statement to obtain a search result.

[0022] Optionally, generating a transaction decision according to the market change trend and the search result includes:

[0023] Generate a market trend analysis report based on the market change trend;

[0024] Generate a technical analysis report based on the simple moving average and momentum factor according to the search results;

[0025] Generate trading decisions based on the market trend analysis report and the technical analysis report.

[0026] Optionally, generating a technical analysis report based on the search results and simple moving average and momentum factor includes:

[0027] Read the historical price data of individual stocks in the search results, and determine the short-term simple moving average and the long-term simple moving average of the historical price data of the individual stocks;

[0028] Determine a trend change signal rule based on the short-term simple moving average and the long-term simple moving average;

[0029] If there is a golden cross or a dead cross, the first technical analysis report including the cross type, cross time point and the current quantitative deviation range will be output;

[0030] Reading the entire market stock price sequence in the search result;

[0031] Determine the price change rate and relative strength index corresponding to the full market stock price series;

[0032] Sorting the momentum values ​​according to the relative strength index to obtain a second technical analysis report including the price change rate and the momentum value sorting results;

[0033] Output a technical analysis report based on the first technical analysis report and the second technical analysis report.

[0034] Optionally, generating a trading decision according to the market trend analysis report and the technical analysis report includes:

[0035] Based on the market trend analysis report and the technical analysis report, the trading actions, trading amounts and trading amount derivation records of the financial products corresponding to the trading market information are generated; the trading decision includes the trading actions, the trading amount and the trading amount derivation records, and the trading amount derivation records are used to guide the output process of the trading amount.

[0036] The present application also provides a trading decision generation system based on a large language model, comprising:

[0037] Information acquisition module, used to obtain trading market information;

[0038] An information analysis module, used to analyze the transaction market information and obtain an information retrieval index corresponding to the market change trend of the transaction market information;

[0039] A task retrieval module is used to call the large language model to identify the information retrieval index, split the information retrieval index into a number of retrieval subtasks, call the search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtain the retrieval result;

[0040] A decision generation module is used to generate a trading decision according to the market change trend and the search results; the trading decision includes an investment strategy and an investment reason.

[0041] The present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above-mentioned method when executed by a processor.

[0042] The present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned method when calling the computer program in the memory.

[0043] The present application provides a method for generating trading decisions based on a large language model, comprising: acquiring trading market information; parsing the trading market information to obtain an information retrieval index corresponding to the market change trend of the trading market information; calling the large language model to identify the information retrieval index, and splitting the information retrieval index into a number of retrieval subtasks, calling a search tool matching the retrieval subtask to execute the corresponding retrieval subtask to obtain a retrieval result; generating a trading decision according to the market change trend and the retrieval result; the trading decision includes an investment strategy and an investment reason.

[0044] This application is conducive to extracting market trend signals from unstructured market information by parsing trading market information based on information retrieval index and task splitting. Different search tools can be used for different retrieval subtasks, and resource retrieval and scheduling can be performed for different dimensions of trading market information, including but not limited to fundamental analysis of trading market information, potential market sentiment analysis and technical analysis based on data evolution. The generated trading decisions can enhance trading risk control, and the retrieval results composed of different retrieval subtasks significantly improve the credibility and interpretability of trading decisions, which will help promote the development of quantitative trading and improve market trading efficiency and financial market competitiveness.

[0045] The present application also provides a transaction decision generation system based on a large language model, a computer-readable storage medium and an electronic device, which have the above-mentioned beneficial effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0047] Figure 1 A flowchart of a transaction decision generation method based on a large language model provided in an embodiment of the present application;

[0048] Figure 2 The information retrieval index parsing flow chart provided in the embodiment of the present application;

[0049] Figure 3 A flowchart of splitting retrieval subtasks provided in an embodiment of the present application;

[0050] Figure 4 A flowchart of a transaction decision generation system based on a large language model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] Please refer to Figure 1 , Figure 1 A flowchart of a transaction decision generation method based on a large language model provided in an embodiment of the present application, the method comprising:

[0053] S101: Obtaining trading market information;

[0054] S102: parsing the transaction market information to obtain an information retrieval index of the market change trend corresponding to the transaction market information;

[0055] S103: calling the large language model to identify the information retrieval index, splitting the information retrieval index into a number of retrieval subtasks, calling a search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtaining a retrieval result;

[0056] S104: Generate a trading decision according to the market change trend and the search result; the trading decision includes an investment strategy and investment reasons.

[0057] There is no limitation on how to obtain trading market information, including but not limited to official channels, financial data suppliers and news media. The trading market information obtained may include structured information and unstructured information. Structured information refers to information with a clear structure and format, usually in the form of databases, tables, charts, etc., which is easy to be recognized and processed by computer programs. For example, data such as the opening price, closing price, and trading volume of stocks. Unstructured information refers to information without a fixed structure and format, usually in the form of text, images, audio, etc., such as news reports, comments on social media, and the management discussion and analysis section in company financial reports.

[0058] After that, it is necessary to parse the trading market information to obtain the information retrieval index of the market change trend corresponding to the trading market information. This step aims to parse the trading market information to obtain the information retrieval index so as to understand the latest market trends contained in the trading market information. The information retrieval index is used to perform subsequent retrieval related to the trading market information.

[0059] See also Figure 2 , Figure 2 The information retrieval index parsing flow chart provided in the embodiment of the present application may include the following steps in a feasible implementation manner:

[0060] S201: Reading news information in the trading market information;

[0061] S202: Retrieving additional news reports related to the news information;

[0062] S203: Retrieving the financial market fluctuation pattern corresponding to the news information;

[0063] S204: Determine the market change trend according to the additional news report and the financial market fluctuation law;

[0064] S205: Determine an index framework, and fill index content based on the index framework according to the market change trend to obtain an information retrieval index.

[0065] Get news information from professional financial news websites or financial news apps. Filter news reports related to market dynamics, policy changes, company events, etc. based on trading markets (such as stocks, futures, foreign exchange, etc.). Use keywords in the news (such as specific company names, industry terms, policy keywords, etc.) to search in news databases or search engines to find more relevant news reports. In addition, some news platforms will recommend other related news based on the news you have read, which can be used as a supplementary reference.

[0066] For structured information and unstructured information, there may be an adaptive reading method when executing step S201.

[0067] For the structured information, a statistical analysis algorithm is used to determine the data features of the structured information, and a data mining algorithm is used to determine the data rules of the structured information; the data features and the data rules are used to assist in determining the market change trend.

[0068] For the unstructured information, existing quantitative trading systems usually tend to structure the unstructured text information in the market into numerical quantitative indicators. A common strategy is to use BERT (Bidirectional Encoder Representations from Transformers) or Transformer to map text information into emotional factors that reflect market sentiment, and then use it together with other structured market information for feature extraction and subsequent investment strategy generation. However, in practical applications, since the analysis of market text information requires a lot of logical reasoning, these reasoning processes usually cannot be simplified into simple indicator induction processes. Structuring strategies for text often result in a lot of information loss, which limits the further application of quantitative trading systems to market structured text information.

[0069] In this embodiment, in order to solve the current defect of limited use of unstructured text information, a natural language recognition algorithm can be used to extract key information from unstructured information, and then retrieve related market information associated with the key information; an event impact chain is constructed based on the key information and related market information. Key information includes subject entities, time types, impact dimensions and quantitative indicators, and the event impact chain is used to assist in determining market change trends. When extracting key information, a variety of natural language processing technologies such as named entity recognition (NER), relationship extraction (RE) and event extraction (EE) can be used in combination.

[0070] Named entity recognition can accurately identify entity information such as organization names, personal names, place names, time, etc. in the text; relationship extraction can explore the associations between entities, such as the ownership relationship between companies and products, the participation relationship between people and events, etc.; event extraction can identify event types, event trigger words, and event participants in the text.

[0071] For example, in a news report, named entity recognition can be used to extract the company name and the names of related people. Relationship extraction can be used to discover the employment relationship between the company and the people. Event extraction can be used to determine the event of a new product launch held by the company, as well as the important people involved in the event and information such as time and place.

[0072] Based on key information and related market information, logical reasoning is used to determine the causal relationship between events. The constructed event impact chain is presented in a visual way, such as a mind map or a flow chart, so as to more intuitively show the logical relationship between events. Through the above methods, the ability to extract information from unstructured information can be maximized, and relevant information contained in unstructured information that may affect trading decisions can be effectively mined.

[0073] In S203, the news content can be analyzed to extract factors that affect financial market fluctuations, such as macroeconomic data releases, policy adjustments, industry trend changes, etc. By consulting financial historical data and analysis reports, the historical fluctuations and patterns of financial markets (such as stock indexes, exchange rates, commodity prices, etc.) when similar news events occur can be determined.

[0074] Combine expert opinions and market analysis from multiple news reports to form a comprehensive understanding of current market sentiment and expectations. Combine information from the news with historical fluctuation patterns to analyze the possible direction of the current market trend, such as up or down.

[0075] In step S205, the structure of the information retrieval index needs to be determined, including different market sectors, indicator categories, etc., so as to fill in the corresponding index content based on the index framework. The determined market change trend information is filled in according to the index framework to form a complete information retrieval index for subsequent further analysis and decision-making.

[0076] By reading news from trading market information and retrieving additional news reports related to it, information from different channels can be integrated together. This fusion of multi-source information can provide a more comprehensive and richer data basis for market analysis, avoiding the one-sidedness that may be caused by a single information source. At the same time, news information is combined with the fluctuation rules of the financial market, not only focusing on the historical data of the market, but also fully considering the impact of news events on the market, which can more comprehensively capture the dynamic changes of the market and provide stronger support for market trend prediction.

[0077] After that, the large language model is called to identify the information retrieval index, and it is split into several retrieval subtasks. Splitting the information retrieval index can process the retrieval subtasks in parallel and shorten the retrieval time. More importantly, in order to use the appropriate search tool to perform the corresponding search subtasks. It should also be noted that in the process of identifying the information retrieval index, multiple rounds of retrieval can be performed, and the multiple rounds of retrieval are performed serially. Multiple retrieval subtasks in each single round of retrieval can be executed in parallel. The purpose of multiple rounds of retrieval is that when the large language model agent obtains new information, it will affect its understanding of the original retrieval task and may generate new retrieval subtasks. If a new retrieval subtask is generated, the large language model is guided to generate a new retrieval subtask until the output results of the large language model are sufficient, the subtask index is terminated and the final report is generated. It can be seen that this step aims to split the information retrieval index in the form of natural language input into retrieval subtasks for different retrieval tools, and then execute them one by one. Since trading market information often uses a variety of different information sources, each of which provides different types of information, using a large language model to split the macro-abstract search statement into multiple sub-search tasks will help make full use of different information sources and generate more comprehensive information retrieval results. There is no specific restriction on which large language model to use, and you can choose a pre-trained language model based on deep learning, such as a model with a Transformer architecture.

[0078] When splitting tasks, see Figure 3 , Figure 3 The search subtask splitting flowchart provided in the embodiment of the present application can be executed according to the following steps:

[0079] S301: constructing prompt words of the information retrieval index;

[0080] S302: guiding the large language model to recognize the prompt word, and splitting the information retrieval index into retrieval subtasks according to a set task decomposition strategy;

[0081] S303: Determine a search tool that matches the search subtask from the search tool library, determine a query statement that matches the search subtask, use the search tool to search the query statement, and obtain a search result.

[0082] When constructing the prompt words of the information retrieval index, the construction can be combined with setting a task decomposition strategy, such as constructing market trend keywords, influencing factor keywords and competitive analysis keywords.

[0083] Market trend keywords refer to key prompt words determined based on market trends, such as market fluctuations, industry dynamics, policy impacts, etc. These prompt words can guide the large language model to focus on information related to market trends.

[0084] Influencing factor keywords are used to consider various factors that affect market changes, such as economic data, company performance, technological innovation, etc. These keywords are used as prompts to help the large language model identify news reports and financial data related to these factors.

[0085] Competitive analysis keywords refer to the prompt words such as competitor dynamics, market share changes, and competitive strategies that can be set when it comes to competitor analysis, so that the large language model can retrieve information related to competitors and provide a more comprehensive perspective for market analysis.

[0086] Through clear prompt word instructions, such as "Please perform information retrieval based on the following prompt words:...", the large language model is guided to recognize these prompt words and understand their role in information retrieval. Setting the task decomposition strategy may include at least one of a decomposition strategy based on market trends, a decomposition strategy based on influencing factors, and a decomposition strategy based on competitive analysis.

[0087] The decomposition strategy based on market trends is used to split the information retrieval index according to different market trend stages or aspects, such as "news reports in the market rising stage", "financial market fluctuation patterns in the market falling stage", etc., to form multiple retrieval sub-tasks.

[0088] The decomposition strategy based on influencing factors is used to decompose the information retrieval index according to different influencing factors, such as "news related to economic data", "financial market reaction to company performance announcements", etc. Each decomposed part serves as a retrieval subtask.

[0089] When the decomposition strategy based on competitor analysis is used to perform competitor analysis, the index is decomposed according to different aspects of the competitors, such as "market dynamics of competitor A", "technological innovation of competitor B", etc., which are used as retrieval subtasks respectively.

[0090] According to different retrieval subtasks, the most appropriate tool can be selected from the search tool library. For example, for the retrieval of news reports, a news search engine can be selected; for the retrieval of financial data, a financial database query tool can be selected, etc.

[0091] For each retrieval subtask, determine the query statement that matches it in combination with its characteristics and requirements. The query statement should be specific and clear, and can accurately point to the required information. For example, "search for news reports on the rising stage of the market" can generate the query statement "market rising stage + news reports".

[0092] This embodiment combines information retrieval and text generation based on the operational concept of RAG (Retrieval-Augmented Generation). It first retrieves relevant information from external data sources, and then uses the generation capability of a large language model to fuse the retrieved information with the model's own knowledge, thereby generating more accurate, smooth, and logical retrieval results. This not only improves the accuracy of the retrieval results, but also enhances the interpretability of the retrieval results, that is, the retrieval results can be traced back to specific retrieval documents.

[0093] In step S104, a trading decision including investment strategy and investment reasons can be generated according to the market trend and the search results. In this process, a market trend analysis report can be generated according to the market trend, and a technical analysis report can be generated based on the simple moving average and momentum factor according to the search results. Finally, a trading decision can be generated according to the market trend analysis report and the technical analysis report.

[0094] Simple moving averages can reflect the trend and support and resistance levels of prices, including short-term trend judgment (such as 5-day simple moving average SMA5, 10-day simple moving average SMA10), medium-term trend judgment (such as 20-day simple moving average SMA20) and long-term trend judgment (such as 60-day simple moving average SMA60). If SMA5 crosses SMA10, forming a "golden cross", it is usually regarded as a short-term rising signal, and the market may enter a short-term rising channel; if SMA5 crosses SMA10, forming a "death cross", it may be a warning of short-term decline, reminding investors to pay attention to risks. When SMA20 crosses SMA60, forming a "golden cross" from medium-term to long-term, it may mean that the medium-term rising momentum of the stock begins to be transmitted to the long-term trend. Long-term investors can pay attention and gradually arrange; if SMA20 crosses SMA60, forming a "death cross", it may indicate a weakening of the long-term trend, and long-term investors should consider reducing positions or exiting.

[0095] The momentum factor can measure the speed and magnitude of price changes, focusing on the relative strength index, stochastic indicator and momentum indicator, and can screen out a group of financial products with the best price momentum for recommendation or to assist in stock selection.

[0096] It can be seen that the technical analysis report performs corresponding data analysis based on actual financial market data and generates a report. The market trend analysis report and the technical analysis report jointly affect the generation of trading decisions. That is, the trading actions, transaction amounts and transaction amount derivation records of the financial products corresponding to the trading market information can be generated based on the market trend analysis report and the technical analysis report. The transaction amount derivation records are used to guide the output process of the transaction amount, so that the trading decision has better explainability.

[0097] The embodiment of the present application is conducive to extracting market trend signals from unstructured market information by parsing trading market information based on information retrieval index and task splitting. Different search tools can be used for different retrieval subtasks, and resource retrieval and scheduling can be performed for different dimensions of trading market information, including but not limited to fundamental analysis of trading market information, potential market sentiment analysis and technical analysis based on data evolution. The generated trading decisions can enhance trading risk control, and the retrieval results composed of different retrieval subtasks significantly improve the credibility and interpretability of trading decisions, which is helpful to promote the development of quantitative trading and improve market trading efficiency and financial market competitiveness.

[0098] In a feasible implementation, the process of generating a technical analysis report may include the following steps:

[0099] The first step is to read the historical price data of individual stocks in the search results, and determine the short-term simple moving average and the long-term simple moving average of the historical price data of individual stocks;

[0100] Step 2: determining a trend change signal rule based on the short-term simple moving average and the long-term simple moving average;

[0101] Step 3: If there is a golden cross or a dead cross, output the first technical analysis report including the cross type, cross time point and the current quantitative deviation range;

[0102] Step 4: Read the stock price sequence of the entire market in the search results;

[0103] Step 5: Determine the price change rate and relative strength index corresponding to the full market stock price sequence;

[0104] Step 6: sort the momentum values ​​according to the relative strength index to obtain a second technical analysis report including the price change rate and the momentum value sorting results;

[0105] Step 7: output a technical analysis report based on the first technical analysis report and the second technical analysis report.

[0106] You can first read the historical price data of individual stocks from the search results, including date, opening price, highest price, lowest price, closing price, etc. These data will serve as the basis for subsequent analysis.

[0107] Usually 5 or 10 days are selected as the calculation period of the short-term simple moving average. The calculation method is to add the closing prices of the most recent N days and divide by N. For example, the calculation formula of 5-day SMA is: SMA5 = (closing price of the day + closing price of the previous day + closing price of the previous 2 days + closing price of the previous 3 days + closing price of the previous 4 days) ÷ 5.

[0108] Generally, 20 days, 30 days or longer are selected as the calculation period of the long-term simple moving average. For example, the calculation formula of the 20-day SMA is: SMA20 = (closing price of the day + closing price of the previous 19 days) 20.

[0109] When the short-term SMA line crosses the long-term SMA line, a golden cross is formed, which is usually regarded as an upward signal. This indicates that the rising speed of the short-term moving average exceeds that of the long-term moving average, and the market may enter a bullish market.

[0110] When the short-term SMA line crosses the long-term SMA line, a death cross is formed, which is usually regarded as a falling signal. This indicates that the decline speed of the short-term moving average exceeds that of the long-term moving average, and the market may enter a bearish market.

[0111] If there is a golden cross or dead cross signal, the first technical analysis report containing the cross type, cross time point and current quantitative deviation range is output. The cross type needs to clearly indicate whether it is a golden cross or a dead cross. The cross time point is used to determine the specific date when the golden cross or dead cross occurs. The current quantitative deviation range can reflect the deviation range between the current short-term SMA line and the long-term SMA line, for example, (short-term SMA-long-term SMA) ÷ long-term SMA × 100%, to quantitatively indicate the degree to which the current price deviates from the long-term trend.

[0112] Get the price series data of all stocks in the market from the search results, including key information such as the closing price of each stock. Calculate the price change rate of each stock, usually expressed as a percentage, reflecting the rise and fall of the stock price in a certain period of time. For example, the price change rate of a certain stock in N days is: (closing price of the day - closing price N days ago) ÷ closing price N days ago × 100%.

[0113] Relative Strength Index (RSI): RSI is an indicator that measures the intrinsic power of stock prices. The calculation formula is: RSI = 100- [100 ÷ (1 + RS)], where RS is the ratio of the average increase in points to the average decrease in points in a specific period. Generally, 14 days is the common period.

[0114] The stocks in the entire market are sorted according to their RSI values ​​to obtain a second technical analysis report containing the sorting results of the price change rate and momentum value. This can help investors understand the momentum of different stocks and screen out stocks with strong upward momentum or overbought or oversold status.

[0115] Combine the first technical analysis report and the second technical analysis report to output the final technical analysis report. The technical analysis report may include:

[0116] Individual stock trend analysis: Based on the crossover signals and deviation amplitude of the short-term and long-term SMA lines, the short-term, medium-term and long-term trends of individual stocks are analyzed and judged.

[0117] Market-wide momentum analysis: RSI sorting shows the momentum distribution of stocks in the entire market, indicating which stocks have higher upward momentum and which stocks are overbought or oversold.

[0118] Investment advice: Based on the analysis results, provide investors with corresponding investment advice, such as buying, selling, holding and other operation strategies, as well as risk points and market dynamics that need attention.

[0119] The following is an introduction to the transaction decision generation system based on a large language model provided in an embodiment of the present application. The transaction decision generation system described below and the transaction decision generation method based on a large language model described above can be referenced to each other.

[0120] See also Figure 4 , Figure 4 A flowchart of a transaction decision generation system based on a large language model provided in an embodiment of the present application, the system comprising:

[0121] Information acquisition module, used to obtain trading market information;

[0122] An information analysis module, used to analyze the transaction market information and obtain an information retrieval index corresponding to the market change trend of the transaction market information;

[0123] A task retrieval module is used to call the large language model to identify the information retrieval index, split the information retrieval index into a number of retrieval subtasks, call the search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtain the retrieval result;

[0124] A decision generation module is used to generate a trading decision according to the market change trend and the search results; the trading decision includes an investment strategy and an investment reason.

[0125] Based on the above embodiment, as a preferred embodiment, the information parsing module includes:

[0126] A news reading unit, used for reading news information in the trading market information;

[0127] a news retrieval unit, configured to retrieve additional news reports related to the news information;

[0128] A financial law retrieval unit, used to retrieve the financial market fluctuation law corresponding to the news information;

[0129] A financial trend determination unit, used for determining a market change trend according to the additional news report and the financial market fluctuation law;

[0130] The index generating unit is used to determine an index framework, and fill index content based on the index framework according to the market change trend to obtain an information retrieval index.

[0131] Based on the above embodiment, as a preferred embodiment, if the news information includes structured information and unstructured information, the news reading unit is a unit for performing the following steps:

[0132] For the structured information, a statistical analysis algorithm is used to determine the data features of the structured information, and a data mining algorithm is used to determine the data regularity of the structured information; the data features and the data regularity are used to assist in determining the market change trend;

[0133] For the unstructured information, a natural language recognition algorithm is used to extract key information from the unstructured information; the key information includes subject entities, time types and impact dimensions; related market information associated with the key information is retrieved; an event impact chain is constructed based on the key information and the related market information; the event impact chain is used to assist in determining the market change trend.

[0134] Based on the above embodiment, as a preferred embodiment, the task retrieval module includes:

[0135] A prompt word construction unit, used for constructing prompt words of the information retrieval index;

[0136] A task splitting unit, used to guide the large language model to recognize the prompt word, and split the information retrieval index into retrieval subtasks according to a set task splitting strategy; the set task splitting strategy includes at least one of a splitting strategy based on market trends, a splitting strategy based on influencing factors, and a splitting strategy based on competitor analysis;

[0137] The task retrieval unit is used to determine a search tool that matches the retrieval subtask from the search tool library, determine a query statement that matches the retrieval subtask, and use the search tool to retrieve the query statement to obtain a retrieval result.

[0138] Based on the above embodiment, as a preferred embodiment, the decision making module includes:

[0139] A trend analysis unit, used to generate a market trend analysis report according to the market change trend;

[0140] A technical analysis unit, used for generating a technical analysis report based on the search results and a simple moving average and a momentum factor;

[0141] A decision generating unit is used to generate a trading decision based on the market trend analysis report and the technical analysis report.

[0142] Based on the above embodiment, as a preferred embodiment, the technical analysis unit is a unit for performing the following steps:

[0143] Read the historical price data of individual stocks in the search results, and determine the short-term simple moving average and the long-term simple moving average of the historical price data of the individual stocks;

[0144] Determine a trend change signal rule based on the short-term simple moving average and the long-term simple moving average;

[0145] If there is a golden cross or a dead cross, the first technical analysis report including the cross type, cross time point and the current quantitative deviation range will be output;

[0146] Reading the entire market stock price sequence in the search result;

[0147] Determine the price change rate and relative strength index corresponding to the full market stock price series;

[0148] Sorting the momentum values ​​according to the relative strength index to obtain a second technical analysis report including the price change rate and the momentum value sorting results;

[0149] Output a technical analysis report based on the first technical analysis report and the second technical analysis report.

[0150] Based on the above embodiments, as a preferred embodiment, the decision generation unit is a unit for generating trading actions, trading amounts and trading amount derivation records of financial products corresponding to the trading market information according to the market trend analysis report and the technical analysis report; the trading decision includes the trading actions, the trading amount and the trading amount derivation record, and the trading amount derivation record is used to guide the output process of the trading amount.

[0151] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps of the method provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0152] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the method provided in the above embodiment can be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0153] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the system provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0154] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

[0155] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A trading decision generation method based on a large language model, characterized in that: include: Obtain trading market information; Parsing the transaction market information to obtain an information retrieval index of the market change trend corresponding to the transaction market information; Calling the large language model to identify the information retrieval index, splitting the information retrieval index into a number of retrieval subtasks, calling a search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtaining a retrieval result; A trading decision is generated according to the market change trend and the search results; the trading decision includes an investment strategy and investment reasons.

2. The transaction decision generation method according to claim 1, characterized in that: Parsing the transaction market information to obtain an information retrieval index corresponding to the market change trend of the transaction market information includes: Reading news information in the trading market information; retrieving additional news stories related to the news information; Retrieving the financial market fluctuation pattern corresponding to the news information; Determine market trends based on the additional news reports and the financial market fluctuation patterns; An index framework is determined, and index content is filled based on the index framework according to the market change trend to obtain an information retrieval index.

3. The transaction decision generation method according to claim 2, characterized in that: If the news information includes structured information and unstructured information, reading the news information in the trading market information further includes: For the structured information, a statistical analysis algorithm is used to determine the data features of the structured information, and a data mining algorithm is used to determine the data regularity of the structured information; the data features and the data regularity are used to assist in determining the market change trend; For the unstructured information, a natural language recognition algorithm is used to extract key information from the unstructured information; the key information includes subject entities, time types and impact dimensions; related market information associated with the key information is retrieved; an event impact chain is constructed based on the key information and the related market information; the event impact chain is used to assist in determining the market change trend.

4. The transaction decision generation method according to claim 1, characterized in that: The large language model is called to identify the information retrieval index, and the information retrieval index is split into a number of retrieval subtasks, and a search tool matching the retrieval subtask is called to execute the corresponding retrieval subtask, and the retrieval results obtained include: Constructing prompt words for the information retrieval index; guiding the large language model to recognize the prompt word, and splitting the information retrieval index into retrieval subtasks according to a set task decomposition strategy; the set task decomposition strategy includes at least one of a decomposition strategy based on market trends, a decomposition strategy based on influencing factors, and a decomposition strategy based on competitor analysis; A search tool matching the search subtask is determined from a search tool library, a query statement matching the search subtask is determined, and the search tool is used to search the query statement to obtain a search result.

5. The transaction decision generation method according to claim 1, characterized in that: Generating a transaction decision according to the market change trend and the search result includes: Generate a market trend analysis report based on the market change trend; Generate a technical analysis report based on the simple moving average and momentum factor according to the search results; Generate trading decisions based on the market trend analysis report and the technical analysis report.

6. The transaction decision generation method according to claim 5, characterized in that: The technical analysis report generated based on the search results based on the simple moving average and momentum factor includes: Read the historical price data of individual stocks in the search results, and determine the short-term simple moving average and the long-term simple moving average of the historical price data of the individual stocks; Determine a trend change signal rule based on the short-term simple moving average and the long-term simple moving average; If there is a golden cross or a dead cross, the first technical analysis report including the cross type, cross time point and the current quantitative deviation range will be output; Reading the entire market stock price sequence in the search result; Determine the price change rate and relative strength index corresponding to the full market stock price series; Sorting the momentum values ​​according to the relative strength index to obtain a second technical analysis report including the price change rate and the momentum value sorting results; Output a technical analysis report based on the first technical analysis report and the second technical analysis report.

7. The transaction decision generation method according to claim 5, characterized in that: Generating trading decisions based on the market trend analysis report and the technical analysis report includes: Based on the market trend analysis report and the technical analysis report, the trading actions, trading amounts and trading amount derivation records of the financial products corresponding to the trading market information are generated; the trading decision includes the trading actions, the trading amount and the trading amount derivation records, and the trading amount derivation records are used to guide the output process of the trading amount.

8. A trading decision generation system based on a large language model, characterized in that: include: Information acquisition module, used to obtain trading market information; An information analysis module, used to analyze the transaction market information and obtain an information retrieval index corresponding to the market change trend of the transaction market information; A task retrieval module is used to call the large language model to identify the information retrieval index, split the information retrieval index into a number of retrieval subtasks, call the search tool matching the retrieval subtask to execute the corresponding retrieval subtask, and obtain the retrieval result; A decision generation module is used to generate a trading decision according to the market change trend and the search results; the trading decision includes an investment strategy and an investment reason.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the transaction decision generating method based on a large language model as described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the transaction decision generating method based on a large language model as described in any one of claims 1 to 7 are implemented.