🧾 Model Card β€” financial_sentiment_model

🧠 Model Overview

financial_sentiment_model is a highly optimized financial sentiment analysis model fine-tuned for financial news, market headlines, and economic reports.

Built on top of the robust ProsusAI/finbert architecture, this model classifies text into three distinct sentiment categories with high precision:

  • 🟒 Positive β€” Market gains, optimism, positive growth indicators
  • βšͺ Neutral β€” Factual reports, regulatory updates, mixed signals
  • πŸ”΄ Negative β€” Market declines, losses, macroeconomic risks

It is tailored to assist quantitative trading pipelines, risk management engines, and financial analysts in extracting crisp sentiment signals from volatile financial text.

πŸ—οΈ Training Details

  • Base Model: ProsusAI/finbert
  • Framework: Hugging Face Transformers & PyTorch
  • Training Depth: 3 full epochs with validation checkpoints
  • Total Evaluation Samples: 156 samples

πŸ“Š Evaluation Metrics

The following performance metrics were captured during the final validation run (as recorded in Accuracy_after_last.png):

Global Performance

  • Overall Accuracy: 89.74% (0.8974358974358975)
  • Macro Average F1-Score: 89.00%
  • Weighted Average F1-Score: 90.00%

Class-by-Class Breakdown

Class Precision Recall F1-Score Support
πŸ”΄ Negative 0.86 0.86 0.86 44
βšͺ Neutral 0.91 0.86 0.88 56
🟒 Positive 0.92 0.96 0.94 56

Confusion Matrix

Actual \ Predicted   Negative   Neutral   Positive
Negative [44]           38         5          1
Neutral  [56]            4        48          4
Positive [56]            2         0         54

The model shows exceptional robustness in identifying Positive sentiments, capturing a 96% Recall rate (54 out of 56 true positives).

πŸ’¬ Example Usage

Using Hugging Face Pipeline (High-Level)

from transformers import pipeline

pipe = pipeline("text-classification", model="sbasu2512/financial_sentiment_model")

texts = [
    "Sensex surges 500 points as IT and banking stocks rally.",
    "Rupee falls sharply against the dollar amid global uncertainty.",
    "TCS announces leadership reshuffle; markets await further clarity.",
]

for t in texts:
    print(pipe(t))

Loading the Model Directly

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained(
    "sbasu2512/financial_sentiment_model"
)
model = AutoModelForSequenceClassification.from_pretrained(
    "sbasu2512/financial_sentiment_model"
)

🧩 Intended Use

  • Real-time sentiment analysis for Indian and global stock market news.
  • Generation of features and sentiment signals for algorithmic trading models.
  • Parsing and tone classification of corporate earnings reports or press releases.

πŸ“œ Licensing & Commercial Use

This model is published under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.

  • Personal, Academic, and Research Use: Completely free.
  • Commercial Use: If you wish to use this model, its weights, or derivatives for commercial purposes, enterprise applications, or monetary gain, you must obtain a commercial license.

πŸ“§ Contact for Commercial Licensing

sayantanworks@gmail.com

πŸ§‘β€πŸ’» Developer Info

  • Author: Sayantan Basu
  • Website: sayantan-basu.vercel.app
Downloads last month
251
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ 2 Ask for provider support

Space using sbasu2512/financial_sentiment_model 1