Downloads · 30 days
15
15% of all-time downloads
shubhampm/stock-news-sentiment-finetuned
stock-news-sentiment-finetuned is a text classification model from shubhampm. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Fine-tuned FinBERT (ProsusAI/finbert) that classifies a stock-market / financial news headline or sentence as bullish / neutral / bearish (mapped to BUY / HOLD / SELL signals in the demo app).
Downloads · 30 days
15
15% of all-time downloads
All-time downloads
100
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
Fine-tuned FinBERT (ProsusAI/finbert) that classifies a stock-market /
financial news headline or sentence as bullish / neutral / bearish
(mapped to BUY / HOLD / SELL signals in the demo app).
bearish (0), neutral (1), bullish (2)POST /predict + Gradio UIlmassaron/FinancialPhraseBank — 3,872 financial news sentences annotated by finance experts (Malo et al., 2014, "Good Debt or Bad Debt"). 90/10 train/test split (seed 42).
Fine-tuned with Hugging Face Trainer on a Kaggle GPU:
| Hyperparameter | Value |
|---|---|
| Epochs | 3 |
| Batch size | 16 |
| Learning rate | 2e-5 (AdamW) |
| Max sequence length | 128 |
| Metric | Value |
|---|---|
| Accuracy | 0.825 |
| Macro F1 | 0.811 |
| Class | Precision | Recall | F1 |
|---|---|---|---|
| bearish | 0.81 | 0.78 | 0.80 |
| neutral | 0.92 | 0.80 | 0.85 |
| bullish | 0.70 | 0.90 | 0.78 |
from transformers import pipeline
pipe = pipeline("text-classification", model="shubhampm/stock-news-sentiment-finetuned")
pipe("Company X beats earnings estimates, shares surge 8%")
# bullish (BUY) — confidence ≈ 0.93
pipe("Regulator opens probe into accounting practices at the company")
# bearish (SELL)