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
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