BERT Stock Market

Problem description

Using a BERT model to predict stock market sentiments.

Market sentiment, also known as investor attention, is the general prevailing attitude of investors as to anticipated price development in a market. This attitude is the accumulation of a variety of fundamental and technical factors, including price history, economic reports, seasonal factors, and national and world events.

Market sentiment is used because it is believed to be a good predictor of market moves, especially when it is more extreme.

(from https://en.wikipedia.org/wiki/Market_sentiment)

Thus, having a model that can be used for predicting stock market sentiment can help in selecting an appropriate investment portfolio.

Problem source (URL)

https://www.kaggle.com/code/supreethrao/bert-s-a-stock-market-guru-86-22-huggingface

Codebase description

This codebase uses deep learning based approach where a Large Language Model (LLM), RoBERTa, in this case, which has been pretrained is finetuned to our task of sentiment classification, It proves to be much better than the machine learning based approaches and achieves an accuracy of 86.32% after just 5 epochs of fine tuning.

Codebase source (URL)

https://www.kaggle.com/code/supreethrao/bert-s-a-stock-market-guru-86-22-huggingface/notebook

Dataset description

Two datasets (FiQA, Financial PhraseBank) combined into one easy-to-use CSV file. It provides financial sentences with sentiment labels.

Dataset source (URL)

https://www.kaggle.com/datasets/sbhatti/financial-sentiment-analysis

Citation:

Malo, Pekka, et al. "Good debt or bad debt: Detecting semantic orientations in economic texts." Journal of the Association for Information Science and Technology 65.4 (2014): 782-796.

no-limits