Skip to content

AI Driven Investment Decisions: Fine-tuning an LLM for Enhanced Financial Analysis

Notifications You must be signed in to change notification settings

20manubansal/Llama2_Financial-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Llama2_Financial-Analysis

AI Driven Investment Decisions: Fine-tuning an LLM for Enhanced Financial Analysis

Introduction

Large Language Models (LLMs), led by groundbreaking models like ChatGPT, have emerged as linguistic marvels, enchanting users with their masterful text understanding and generation. The initial wave of enthusiasm prompted many to investigate their potential in a variety of applications, with the goal of achieving seamless integration into a variety of contexts. However, inherent limitations became apparent, most notably the knowledge cutoff, posing challenges to the realworld viability of LLMdriven applications. The fundamental question arose in the realm of financial analytics, where dynamic insights are paramount: Can LLMs be trained to predict valuation fluctuations based solely on companyspecific financial metrics? The general consensus was unambiguously negative. Nonetheless, this study challenged the dominant narrative, fuelled by a belief in LLMs' untapped potential for decoding intricate patterns in financial data. This study attempted an exciting experiment in an attempt to bridge the gap between advanced language models and the complexities of financial analytics. The goal was simple: to show that LLMs could be used to forecast directional changes in market capitalization using a company's unique financial parameters. This study unfolds as an investigation into the delicate balance between the exceptional capabilities of LLMs and the complex landscape of financial data analysis. The study seeks to contribute to the evolving dialogue on the potential and limitations of LLMs in deciphering the complexities of financial markets by dissecting methodologies, delving into the nuances of finetuning, and navigating the dynamic interplay between language models and external data sources. The research, however, produced unfavourable results, reminiscent of historical instances in which experiments designed to prove one hypothesis inadvertently contradicted it. The pursuit of finetuning LLMs to predict financial market dynamics revealed profound insights into the complexities and limitations of language models in the domain of financial forecasting.

Problem Definition and Objectives

In the volatile world of finance, where market trends, economic factors, and corporate dynamics are constantly changing, the ability to accurately predict fluctuations in company valuations is critical. This research delves into the complexities of this problem, attempting to determine the viability of using the power of Large Language Models (LLMs) to decode and predict these complex financial patterns. This investigation is significant because it has the potential to redefine the boundaries of LLM applications, particularly in the specialised and intricate domain of financial analytics. The primary goal of this study is to investigate systematically, using welldesigned experiments and methodologies, the adaptability of LLMs to the unique challenges posed by financial datasets. In doing so, the study not only challenges preexisting assumptions, but also aims to provide valuable insights into the potential and limitations of LLMs in deciphering intricate financial patterns. Beyond a theoretical investigation, the research aims to assess the practical utility of LLMs in financial forecasting, filling a critical knowledge gap in this specialised domain.

Course of the Investigation

The investigation used a systematic methodology with the goal of finetuning a large language model (LM) for predicting changes in company valuation based on specific financial parameters. A comprehensive financial dataset was curated and prepared. This dataset contained 33 financial parameters for various companies chosen from a welldefined universe of publicly traded companies, which served as the foundation for model training. The careful selection of relevant financial metrics ensured that the model was exposed to relevant information for valuation predictions. This data was then extensively cleaned and normalised to transform it into high quality, standardised data, fit to be exposed to the model. The language model used in this study was extensively trained on the financial dataset. The training aimed to give the model the ability to understand and capture complex patterns in financial data, laying the groundwork for future work. The model's behaviour was heavily influenced by hyperparameter configurations. A complex investigation included varying learning rates, epochs, model length, block size and prompt structure. The research looked into how different configurations affected the model's sensitivity and responsiveness to subtleties in the financial dataset. Despite its extensive methodology and rigorous experimentation, the study encountered difficulties while yielding profound insights. The investigation highlighted the intricate relationships governing the LM's predictive performance by highlighting the complex interplay between hyperparameters. The model's unpredictability, particularly its sensitivity to prompt structure changes, highlighted the importance of precise input formulation. The lack of consistent patterns in the face of varying hyperparameter combinations indicated that the LM's interaction with financial data was nuanced and nonlinear. Finally, the investigation revealed the complexities involved in finetuning LLMs for nuanced financial analyses. From data preparation to result analysis, the journey provided valuable insights into the challenges and limitations, paving the way for future research and refinement at the intersection of machine learning and financial forecasting. The indepth examination of hyperparameter dynamics contributes to a better understanding of the complex relationship between model architecture, training configurations, and task complexities in the context of financial predictions.

About

AI Driven Investment Decisions: Fine-tuning an LLM for Enhanced Financial Analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages