F in LLM - B : When Large Language Models Meet Financial Breakout Trading (2025)

Abstract: Trading range breakout is a key method in the technical analysis of financial trading, widely employed by traders in financial markets such as stocks, futures, and foreign exchange. However, distinguishing between true and false breakout and providing the correct rationale cause significant challenges to investors. Traditional quantitative methods require large amounts of data and cannot directly present the reasoning process to users, making them less than perfect in this field. Recently, large language models have achieved success in various downstream applications, but their effectiveness in the domain of financial breakout detection has been subpar. The reason is that the unique data and specific knowledge are required in breakout detection. To address these issues, we created the first financial breakout dataset and introduce FinLLM-B, the premier large language model for financial breakout detection, which enhances the effectiveness of breakout trading strategies. Furthermore, we have developed a novel framework for large language models, namely multi-stage structure, effectively reducing mistakes in downstream applications. Experimental results indicate that compared to GPT-3.5, FinanceGPT-B improves the average accuracy of answers and rational by 49.97%, with the multi-stage structure contributing 9.72% to the improvement. Additionally, it outperforms ChatGPT-4 by 42.38%.

## introduction fundamental and technical analysis are the primary methods in financial investment. given the limitations of the efficient market hypothesis in real financial markets @xcite @xcite , the significance of technical analysis is recognized @xcite @xcite . trading range breakouts, a key aspect of technical analysis, have rationale: a true breakout means when a stock breaks through a significant resistance level and continues to rise or fall.the resistance level is the highest or lowest price ever reached among ## related work trading range breakout. technical analysis focuses on predicting financial market movements based on historical chart data (murphy, 1999), demonstrating its profitability @xcite . a key method within technical analysis is the trading range breakout @xcite @xcite , which suggests that a price struggle occurs between buyers and sellers at resistance levels. once the price surpasses this resistance level, it forms a strong support, preventing a shortterm price reversal @xcite @xcite . large language models. large language models (llms) have shown success across various applications @xcite @xcite @xcite @xcite @xcite . a challenge of applications is generation of incorrect answers. one solution related to this study is chain-of-thought (cot) @xcite which prompts llms to reason before providing answers. pioneering works involved manually designing examples to teach models reasoning, enabling more accurate responses @xcite . subsequent research introduced approaches like zero-shot-cot @xcite and auto-cot @xcite , though cot does not fully eliminate incorrect outputs, and researchers have explored incorporating new modalities @xcite . ## problem formulation financial breakout detection is an important problem in the field of breakout trading. it determines whether a financial product is undergoing a true or false breakout, with true breakouts identified based on the order flow rule @xcite . this study focuses on training a large language model to generate financial breakout detection reports with accurate rationales using processed data tables. time scale variability affects resistance levels and breakout authenticity, requiring a clear definition of the resistance level and true breakouts. the resistance level is defined as the highest or lowest price in the ten time ticks before the breakout @xcite . a true breakout occurs when the closing price remains beyond the resistance level for two consecutive time units. the primary input is a data table as shown in figure 1 derived from footprint charts. these charts capture detailed price information within each time unit, along with the order volumes from buyers and sellers at various price levels. compared to historical stock line and candlestick charts, footprint charts offer richer detail, enabling more accurate assessments of breakout authenticity. the output should include both the rationale and the answer as illustrated in figure 1 . this design is chosen because the investment field demands high explainability of decisions, and auditing the rationality behind decisions helps mitigate the risk of overvalued accuracy caused by guesses. data tables question input data tables s1 question: what is the breakout dirention? finllm-b s1 output: ...upward... data tables s2 question: what is the resistance level？ s2 output: ...1007.25... data tables s3 question: which side has more orders? s1 output stage-2 input stage-1 input stage-3 input s1 output s2 output s3 output: ## method our model is designed for financial breakout detection, with inputs being prompts and specialized data tables. the multi-stage architecture is the main framework of our model, as shown in figure 2 . the reasons for its design are as follows. the amount of data is limited in our task. researchers usually choose to tackle this task by fine-tuning models directly. in the initial trial of our study, we attempted to address the problem by directly fine-tuning with one llm as well, but the results were unsatisfactory. we think that reasoning and drawing conclusions are the two main steps humans take to solve this task. based on this, we create two distinct datasets and trained two llms respectively responsible for reasoning and conclusion: finllm-b and report generator. under this structure, finllm-b focuses on the problem itself rather than the details of report generation. however, simply splitting the whole model into two parts for finllm-b and the report generator still has limited improvement. we find that longer outputs tend to increase errors. therefore, based on the steps to solve the problem, we divide the training set for finllm-b into three parts, each part responsible for answering one subtask with a standard answer. this design offers three advantages. firstly, this structure provides a framework for breakout detection, serving as prior knowledge to compensate for the lack of data. secondly, these sub-tasks have a sequential relation-ship. they share parameters and complement each other so that we can more effectively solve these subtasks with one large language model (finllm-b). thirdly, each part answers only one question, allowing it to focus on specialized knowledge and provide concise responses. this approach is similar to the division of labor and cooperation within a human team, significantly enhancing the accuracy and stability of final outputs. ## future work our work is the first to explore the application of large language models in financial breakout detection tasks, and we propose a multi-stage framework that enables our model to outperform other competitors. however, there is still room for improvement in the following two aspects. future work could expanding data modalities, such as images or videos, to better align the model with real-world scenarios. currently, finllm-b relies on minute-level data from converted static footprint charts. however, the financial trading market changes rapidly, and continuous dynamic data could improve breakout detection accuracy. for instance, finllm-b could directly input videos to capture real-time changes in buy and sell orders in the future, enhancing breakout detection performance. additionally, enriching the dataset with a broader range would provide deeper insights into the model's optimal performance and robustness. there is still room for improvement in the accuracy of the s3 task. we found the accuracy of s3 is significantly lower than the other two subtasks primarily due to its inherent complexity. the s3 task involves comparing the strength of buyers and sellers based on resistance levels, a process that is relatively intricate. this complexity may limit the full utilization of the capabilities of large language models. in the future, researchers could further segment the s3 task using a multi-stage structure to attempt to improve its accuracy. ## conclusion we present finllm-b, the first large language model specifically designed for breakout detection, which alleviates the important issue in financial breakout trading field. to develop this model, we construct a high-quality financial breakout dataset. furthermore, we create an innovative multi-stage framework, distinguishing finllm-b from the report generator and segmenting it into three distinct components based on problem-solving steps. this design enables finllm-b to more effectively demonstrate domain knowledge and enhances the model's accuracy and stability in our task. we believe that our model will serve as a valuable resource for future research and foster further exploration in the field of financial breakout trading.