Financial Sentiment DistilBERT

Fine-tuned DistilBERT model for financial news sentiment classification.

Model Description

This model classifies financial news headlines into three sentiment categories:

  • Bearish (label 0) — Negative market sentiment
  • Bullish (label 1) — Positive market sentiment
  • Neutral (label 2) — No clear directional sentiment

Training Data

Performance

Metric Score
Accuracy 84.43%
Macro F1 0.80
Bearish F1 0.74
Bullish F1 0.77
Neutral F1 0.90

Usage

from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="Riddhi2952/financial-sentiment-distilbert"
)

result = classifier("$AAPL beats earnings estimates revenue up 12%")
print(result)
# [{'label': 'Bullish', 'score': 0.99}]

Training Details

  • Base model: distilbert-base-uncased
  • Max sequence length: 23 tokens
  • Batch size: 16
  • Learning rate: 2e-5
  • Epochs: 3
  • Class imbalance handling: Class weights (Bearish 2.19x, Bullish 1.64x)

Limitations

  • Negation handling: Complex negations like "not expected to miss" may be misclassified
  • Domain specific: Trained on Twitter financial news, may not generalize to formal reports
  • Short text: Optimized for headlines (avg 11.7 tokens), not long documents
Downloads last month
15
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Riddhi2952/financial-sentiment-distilbert