takala/financial_phrasebank
Updated • 9.32k • 257
Fine-tuned ProsusAI/finbert for 3-class financial news sentiment classification (positive / negative / neutral).
Part of the SentimentPulse pipeline — an open-source replica of Bloomberg BQuant Textual Analytics.
Evaluated on 349 held-out examples from FinancialPhraseBank + FiQA-SA:
| Model | Precision | Recall | F1 |
|---|---|---|---|
| VADER | 0.52 | 0.48 | 0.51 |
| Loughran-McDonald | 0.64 | 0.47 | 0.47 |
| FinBERT zero-shot | 0.79 | 0.75 | 0.76 |
| FinBERT fine-tuned (this model) | 0.92 | 0.92 | 0.92 |
Per-class (fine-tuned):
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| negative | 0.83 | 0.86 | 0.85 | 74 |
| neutral | 0.99 | 0.98 | 0.99 | 140 |
| positive | 0.90 | 0.90 | 0.90 | 135 |
sentences_allagree, 2,264 sentences) + FiQA-SA (pauri32/fiqa-2018, 1,173 sentences) — 80/10/10 stratified splitfrom transformers import pipeline
pipe = pipeline(
"text-classification",
model="EomaxlSam/finbert-finetuned-sentimentpulse",
)
pipe("Apple beats Q1 earnings estimates by 12%")
# [{'label': 'positive', 'score': 0.94}]
pipe("Goldman Sachs fell sharply after issuing a guidance cut.")
# [{'label': 'negative', 'score': 0.91}]
| ID | Label |
|---|---|
| 0 | negative |
| 1 | neutral |
| 2 | positive |
Base model
ProsusAI/finbert