kdave commited on
Commit
5b25b5a
·
1 Parent(s): 16d4a04

Create README.md

Browse files

# Fine-Tuned FinBERT for Indian Stock Market Sentiment Analysis

## Overview:
Our fine-tuned FinBERT model is a powerful tool designed for sentiment analysis specifically tailored to Indian stock market news. Leveraging the foundation of FinBERT, a BERT model pre-trained on extensive financial communication text (https://huggingface.co/yiyanghkust/finbert-tone) , our model focuses on enhancing sentiment analysis within the context of the Indian financial landscape.

## Training Data:
The model was fine-tuned using a meticulously curated dataset comprising Indian financial news articles with summaries. This dataset was generated utilizing the T5-base model from Hugging Face for text summarization, and sentiment labels were derived through the GPT add-on for Google Sheets. The incorporation of diverse and contextually rich data ensures that the model is adept at capturing nuanced sentiment expressions related to the Indian stock market.

## Acknowledgment:
It's crucial to credit the original FinBERT model by yiyanghkust/finbert-tone (https://huggingface.co/yiyanghkust/finbert-tone), which laid the groundwork for our fine-tuned model. We express gratitude for their contribution to financial NLP research and practice.

## Performance:
The model demonstrates robust performance in sentiment analysis, providing insights into the emotional tone of Indian stock market news. The sentiment labels include positive, negative, and neutral, offering a comprehensive understanding of the overall sentiment conveyed in the analyzed text.

## How to Use:
Utilize the model seamlessly with the Transformers library's pipeline for sentiment analysis. Incorporate it into your financial NLP research or analysis workflows to enhance the accuracy and depth of sentiment assessments related to the Indian stock market.

```python
from transformers import BertTokenizer, BertForSequenceClassification
from transformers import pipeline

# Load the fine-tuned FinBERT model and tokenizer
finbert = BertForSequenceClassification.from_pretrained('kdave/FineTuned_Finbert, num_labels=3)
tokenizer = BertTokenizer.from_pretrained('kdave/FineTuned_Finbert')

# Create a sentiment-analysis pipeline
nlp_pipeline = pipeline("sentiment-analysis", model = finbert, tokenizer = tokenizer)

# Example sentences related to Indian stock market news
sentences = [
"The Indian stock market experienced a surge in trading activity.",
"Investors are optimistic about the future of Indian financial markets.",
"Concerns about economic uncertainties are affecting stock prices in India.",
"Earnings reports from Indian companies show a positive trend."
]

# Perform sentiment analysis using the fine-tuned FinBERT model for Indian stock market news
results = nlp_pipeline(sentences)
print(results)
```

## Citation:
If you find this fine-tuned model valuable for your academic work or research, please consider citing my work:

Khushi Dave, Data Scientist, 2024

Files changed (1) hide show
  1. README.md +13 -0
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - financial-sentiment-analysis
6
+ - Transformers
7
+ - ' sentiment-analysis'
8
+ - TensorFlow
9
+ - PyTorch
10
+ - Text Classification
11
+ - bert
12
+ - Inference Endpoints
13
+ ---