File size: 1,464 Bytes
6163039
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c77ead7
6163039
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
tags:
- sentiment-analysis
- finance
- stock-market
- english
pipeline_tag: text-classification
license: mit
language: en
---

# ๐Ÿง  FinancialBERT Sentiment Analysis (FinNews Binary)

This is a fine-tuned BERT model for **binary sentiment classification** of financial news headlines, adapted for real-time **stock market sentiment prediction**.

## ๐Ÿ” Model Details

- **Architecture**: BERT (12-layer, 768-hidden, 12-heads)
- **Base model**: `ahmedrachid/FinancialBERT-Sentiment-Analysis`
- **Fine-tuned task**: Binary classification โ€“ `Positive` or `Negative`
- **Problem type**: `single_label_classification`
- **Special tokens**: `[CLS]`, `[SEP]`, `[PAD]`, `[MASK]`, `[UNK]`

Neutral headlines are **mapped to Positive** to simplify binary output.

## ๐Ÿงพ Training Summary

- **Dataset**: 5,000+ manually labeled financial news headlines
- **Tokenizer**: Custom WordPiece tokenizer
- **Max sequence length**: 128
- **Framework**: Transformers v4.51.3 (PyTorch backend)
- **Output labels**:
  - `LABEL_0 = Negative`
  - `LABEL_1 = Positive`

## ๐Ÿ“ˆ Intended Use

Ideal for:

- Real-time market sentiment dashboard
- Trading signal pipelines
- Event-driven NLP analysis

## ๐Ÿš€ Usage (Example)

```python
from transformers import pipeline

classifier = pipeline("text-classification", model="your-username/your-model-name")
classifier("Apple's Q4 earnings beat expectations amid strong iPhone sales")
# Output: [{'label': 'LABEL_1', 'score': 0.98}]