AnonymousResearchICAIF commited on
Commit
ad5cda1
·
verified ·
1 Parent(s): 888ac32

Add model card

Browse files
Files changed (1) hide show
  1. README.md +110 -0
README.md ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: ProsusAI/finbert
4
+ tags:
5
+ - financial-sentiment
6
+ - social-media
7
+ - reddit
8
+ - wallstreetbets
9
+ - text-classification
10
+ pipeline_tag: text-classification
11
+ language:
12
+ - en
13
+ ---
14
+
15
+ # WSB-FinBERT
16
+
17
+ A FinBERT model fine-tuned on r/wallstreetbets text for three-class sentiment
18
+ classification (negative / neutral / positive).
19
+
20
+ Off-the-shelf financial sentiment models are trained on formal financial English —
21
+ earnings calls, analyst reports, newswire. Retail social-media text is a different
22
+ register: irony, slang, emoji, and self-deprecation. On the held-out set below,
23
+ vanilla FinBERT scores **below the majority-class floor**, i.e. worse than ignoring
24
+ the text entirely. This model is a domain-adaptation check on that gap.
25
+
26
+ ## Labels
27
+
28
+ | id | label |
29
+ |---|---|
30
+ | 0 | negative |
31
+ | 1 | neutral |
32
+ | 2 | positive |
33
+
34
+ ## Usage
35
+
36
+ ```python
37
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
38
+ import torch
39
+
40
+ model_id = "AnonymousResearchICAIF/wsb-finbert"
41
+ tok = AutoTokenizer.from_pretrained(model_id)
42
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
43
+
44
+ text = "NVDA printing again, loaded calls for next week"
45
+ inputs = tok(text, return_tensors="pt", truncation=True, max_length=128)
46
+ with torch.no_grad():
47
+ probs = model(**inputs).logits.softmax(-1)[0]
48
+
49
+ print({model.config.id2label[i]: round(p.item(), 3) for i, p in enumerate(probs)})
50
+ ```
51
+
52
+ A continuous sentiment score in [-1, 1] can be formed as `P(positive) - P(negative)`.
53
+
54
+ ## Training data
55
+
56
+ 2,503 r/wallstreetbets posts and comments mentioning a fixed universe of AI-related
57
+ tickers, labelled for sentiment by an LLM teacher (Claude) and split 70/15/15
58
+ stratified by label with seed 42 — 1,752 train / 375 validation / **376 test**.
59
+ The sample is stratified across tickers and balanced 50/50 between the first and
60
+ second halves of the collection period.
61
+
62
+ ## Training procedure
63
+
64
+ | | |
65
+ |---|---|
66
+ | Base model | `ProsusAI/finbert` |
67
+ | Max sequence length | 128 |
68
+ | Learning rate | 2e-5 |
69
+ | Epochs | 4 |
70
+ | Train batch size | 8 |
71
+ | Weight decay | 0.01 |
72
+ | Warmup ratio | 0.1 |
73
+ | Seed | 42 |
74
+
75
+ ## Evaluation
76
+
77
+ On the 376 held-out texts:
78
+
79
+ | Model | Accuracy | Macro F1 |
80
+ |---|---|---|
81
+ | **WSB-FinBERT (this model)** | **0.524** | **0.495** |
82
+ | Vanilla `ProsusAI/finbert` | 0.410 | 0.400 |
83
+ | Majority-class baseline ("always positive") | 0.434 | — |
84
+
85
+ Cohen's κ = 0.252.
86
+
87
+ Per-class (this model):
88
+
89
+ | label | precision | recall | f1 | support |
90
+ |---|---|---|---|---|
91
+ | negative | 0.448 | 0.312 | 0.368 | 96 |
92
+ | neutral | 0.513 | 0.513 | 0.513 | 117 |
93
+ | positive | 0.557 | 0.656 | 0.603 | 163 |
94
+
95
+ ## Limitations
96
+
97
+ - **Absolute accuracy is modest.** 52.4% on a three-class problem is only ~9 points
98
+ above the majority-class floor. The gain over vanilla FinBERT (+11.4 points) is the
99
+ meaningful result; the model is not a strong standalone classifier.
100
+ - **Labels are LLM-generated**, not human gold standard. They inherit the teacher's
101
+ biases. They do correlate with *past* five-day returns, as a text-only annotator
102
+ should, and show no positive correlation with *forward* returns (no evidence of
103
+ look-ahead leakage).
104
+ - **Narrow domain.** Trained on r/wallstreetbets text about a small universe of
105
+ AI-related tickers over a specific period. Generalisation to other subreddits,
106
+ other sectors, other periods, or to formal financial text is untested and unlikely.
107
+ - **Positive skew.** The forum's labels run ~1.7 to 1 positive and the model inherits
108
+ this (51.1% of predictions positive vs 43.4% in truth). Use within-entity demeaning
109
+ if the level matters for your application.
110
+ - Not investment advice; not suitable for trading decisions on its own.