Combining Financial Data and News Articles for Stock Price Movement Prediction Using Large Language Models

Ali Elahi ♣ Fatemeh Taghvaei ♢ · 2024

Read Combining Financial Data and News Articles for Stock Price Movement Prediction Using Large Language Models by Ali Elahi ♣ Fatemeh Taghvaei ♢ (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2411-01368.txt.

Description

Abstract Predicting financial markets and stock price movements requires analyzing a company’s performance, historic price movements, industry-specific events alongside the influence of human factors such as social media and press coverage. We assume that financial reports (such as income statements, balance sheets, and cash flow statements), historical price data, and recent news articles can collectively represent aforementioned factors.

Catalog record

CREATORAli Elahi ♣ Fatemeh Taghvaei ♢
YEAR2024
COLLECTIONPAPERS
FORMATTXT
FILE SIZE36 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2411-01368

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Combining Financial Data and News Articles for Stock Price Movement Prediction Using Large Language Models Ali Elahi ♣ Fatemeh Taghvaei ♢ Abstract Predicting financial markets and stock price movements requires analyzing a company’s performance, historic price movements, industry-specific events alongside the influence of human factors such as social media and press coverage. We assume that financial reports (such as income statements, balance sheets, and cash flow statements), historical price data, and recent news articles can collectively represent aforementioned factors. We combine financial data in tabular format with textual news articles and employ pre-trained Large Language Models (LLMs) to predict market movements. Recent research in LLMs has demonstrated that they are able to perform both tabular and text classification tasks, making them our primary model to classify the multi-modal data. We utilize retrieval augmentation techniques to retrieve and attach relevant chunks of news articles to financial metrics related to a company and prompt the LLMs in zero, two, and four-shot settings. Our dataset contains news articles collected from different sources, historic stock price, and financial report data for 20 companies with the highest trading volume across different industries in the stock market. We utilized recently released language models for our LLM-based classifier, including GPT- 3 and 4, and LLaMA- 2 and 3 models. We introduce an LLM-based classifier capable of performing classification tasks using combination of tabular (structured) and textual (unstructured) data. By using this model, we predicted the movement of a given stock’s price in our dataset with a weighted F1-score of 58.5% and 59.1% and Matthews Correlation Coefficient of 0.175 for both 3-month and 6-month periods. I Introduction With the advancement of language models and their extensive use in the finance industry [ 1 ] , these models are now applied in finance for various purposes. These include text classification tasks [ 2 , 3 ] , such as semantic analysis of news 1 1 1 Referring to classifying news as positive or negative [ 4 ] . Investors also use language models like ChatGPT to enhance their financial understanding, and there are studies on financial chatbots and fine-tuning LLMs for financial advisement [ 5 , 6 ] . Predicting market trends and making informed investment decisions has remained an important task in finance. One use of LLMs in this field is predicting if the price is going up or down in the future, known as Price Movement Prediction [ 7 , 8 , 9 ] . For this purpose, different studies utilize various sources of data to predict price movements. The performance of a stock in the future is typically influenced by all available information in the current state [ 10 ] . Numerous factors, including the company’s performance, industry dynamics, human responses, social media, news, and broader political and economic shifts, can impact market behavior. We aim to gather as much information as possible to represent these factors for the stock price movement task. This information can be in tabular or textual format; therefore, we aim to design an LLM-based model that can perform stock price movement classification using data in different formats. We also believe that prompting LLM with different sources of information can prevent hallucination. Major trend in the natural language processing research has shifted to finding the right setup to utilize pre-trained LLMs to solve problems instead of training new models. Additionally, fine-tuning language models requires significant time, computational resources, and a large dataset, therefore we will conduct this analysis in a zero to four-shot setting. The following paragraphs will include our sources of information: Financial Factors Every publicly traded company in the United States is mandated by the Securities and Exchange Commission (SEC) to disclose its financial information at the end of each quarter, and among these regulatory filings, the 10-K report stands out as a comprehensive document detailing the company’s financial performance, risks, and operational insights, reported on a quarterly basis. To include the company’s performance, we included the data available in financial reports (a.k.a. 10-K files) in our analysis. Historical Price The trend in historical price changes for a company can indicate potential future movements, making historical price data important for price movement prediction. News Investors often refer to social media and news, which significantly influence their investing behavior. News stories are the most easily accessible type of content on social media; therefore, we include information from news articles as one source of information in our analysis. We use retrieval methods to extract information from the news, summarize, and rank them based on relevance to provide to the model. Company’s Industry and Services/Products The company’s industry and services/products are important because different factors can affect one industry or one type of service/product. We include keywords of the company’s industry and services as input for our analysis. In our approach, we prompt pre-trained language models with the aforementioned information. We utilize a hypothetical user query to retrieve relevant information about a specific company at a specific time. For this purpose, we collect news articles and financial data for 20 highly traded stocks in the stock market. Our model and data will be available upon publication of this research paper. News Article Sample Title: Should You Invest in Apple (AAPL) Based on Bullish Wall Street Views? Description: Based on the average brokerage recommendation (ABR), Apple (AAPL)… Data-Time: April 12, 2024 at 6:30 AM Keywords: Strong Buy, Zacks Rank, brokerage firms, Apple,… Content: Investors often turn to recommendations made by Wall Street analysts… URL: https://news.google.com/articles/CBMiTWh0d… Title: Congress passes spending bill with TikTok ban on government devices Description: Congress passed a large spending package that includes a bill banning TikTok from being used on government devices and new filing fees for mergers. Data-Time: Dec 23, 2022 at 3:08 PM Keywords: Alphabet Class, Amazon, Meta, Apple, Joe Biden, Politics, Social media Content: URL: https://www.cnbc.com/2022/12/23/congress-passes-spending-bill-with-tiktok-ban-on-government-devices.htm Company Names (Tickers) Apple Inc. (AAPL), Amazon.com Inc. (AMZN), Alphabet Inc. (GOOGL), Microsoft Corporation (MSFT), Tesla, Inc. (TSLA), Facebook, Inc. (FB), Berkshire Hathaway Inc. (BRK.B), Johnson & Johnson (JNJ), Visa Inc. (V), JPMorgan Chase & Co. (JPM), Procter & Gamble Company (PG), Walmart Inc. (WMT), The Coca-Cola Company (KO), Netflix Inc. (NFLX), Pfizer Inc. (PFE), Walt Disney Company (DIS), Nvidia Corporation (NVDA), Alibaba Group Holding Limited (BABA), Adobe Inc. (ADBE), Mastercard Incorporated (MA) News Websites Africa.businessinsider.com, Aljazeera.com, Apnews.com, Benzinga.com, Businessinsider.com, CNBC.com, CNN.com, CFO.economictimes.indiatimes.com, Decrypt.co, Defenseworld.net, Edition.cnn.com, Economist.com, Epaper.financialexpress.com, Etfdailynews.com, Financialbuzz.com, Fool.com, Forbes.com, Foxbusiness.com, FT.com, Globenewswire.com, Investingnews.com, Investorideas.com, Kiplinger.com, Markets.businessinsider.com, Moneycontrol.com, Newswire.ca, Pennystocks.com, Prnewswire.com, SCMP.com, Stockmarket.com, Stocknews.com, Theatlantic.com, Theweek.com, UPI.com, TABLE I: Dataset Information Financial Variables Source Description Total Revenue (10K) Reports Aggregate amount of income generated from the sale of goods or services before deducting any expenses Net Income (10K) Reports Also known as profit or net earnings, is the total amount of revenue earned by a company after deducting all expenses Free Cash Flow (10K) Reports Represents the amount of cash generated by a company’s operations Total Assets (10K) Reports Combined value of all resources owned or controlled by a company Price Momentum Historical Pricing Data Price Momentum 6-12 Months — Measures the relative strength and direction of a stock’s price movement over the past months. Forward Return Historical Pricing Data Expected or projected return on an investment or asset over

Read the complete text