File size: 3,976 Bytes
ed78fa5
 
8746881
 
19e685d
8746881
 
 
 
 
 
 
da059da
 
 
 
8746881
9872c2a
da059da
8746881
9872c2a
8746881
9872c2a
da059da
9872c2a
 
 
 
8746881
c079da7
 
 
 
 
 
 
 
 
 
 
47d5578
 
 
ed78fa5
8746881
 
9872c2a
c2a1f69
9872c2a
 
 
 
 
 
 
c2a1f69
 
 
 
 
 
9872c2a
 
 
 
 
 
 
 
 
47d5578
9872c2a
47d5578
 
 
 
9872c2a
 
 
47d5578
9872c2a
 
 
 
 
 
19e685d
9872c2a
 
 
 
 
 
 
 
 
 
19e685d
 
 
 
 
 
 
 
 
 
 
 
9872c2a
 
 
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
license: mit
datasets:
- TimKoornstra/financial-tweets-sentiment
- TimKoornstra/synthetic-financial-tweets-sentiment
language:
- en
metrics:
- accuracy
- f1
pipeline_tag: text-classification
tags:
- NLP
- BERT
- FinBERT
- FinTwitBERT
- sentiment
- finance
- financial-analysis
- sentiment-analysis
- financial-sentiment-analysis
- twitter
- tweets
- tweet-analysis
- stocks
- stock-market
- crypto
- cryptocurrency
base_model: StephanAkkerman/FinTwitBERT
widget:
- text: Nice 9% pre market move for $para, pump my calls Uncle Buffett 🤑
  example_title: Bullish Crypto Tweet
- text: It is about damn time that my $ARB and $ETH bags pump FFS. 🚀
  example_title: Bullish Crypto Tweet 2
- text: $SPY $SPX closed higher 8th consecutive weeks. Last time it closed 9th straight was 20 years ago.
  example_title: Bullish Stock Tweet
- text: $TCBP Lowest float stock in the market. Float just 325k. Don’t sell for pennies, this one will be a monster. Still early
  example_title: Bullish Stock Tweet 2
- text: Italian companies braced for more political uncertainty
  example_title: Bearish News
#model-index:
#- name: FinTwitBERT-sentiment
#  results:
---

# FinTwitBERT-sentiment

FinTwitBERT-sentiment is a finetuned model for classifying the sentiment of financial tweets. It uses [FinTwitBERT](https://huggingface.co./StephanAkkerman/FinTwitBERT) as a base model, which has been pre-trained on 10 million financial tweets.
This approach ensures that the FinTwitBERT-sentiment has seen enough financial tweets, which have an informal nature, compared to other financial texts, such as news headlines.
Therefore this model performs great on informal financial texts, seen on social media.

## Intended Uses

FinTwitBERT-sentiment is intended for classifying financial tweets or other financial social media texts.

## Dataset

FinTwitBERT-sentiment has been trained on two datasets. One being a collection of several financial tweet datasets and the other a synthetic dataset created out of the first.
- [TimKoornstra/financial-tweets-sentiment](https://huggingface.co./datasets/TimKoornstra/financial-tweets-sentiment): 38,091 human-labeled tweets
- [TimKoornstra/synthetic-financial-tweets-sentiment](https://huggingface.co./datasets/TimKoornstra/synthetic-financial-tweets-sentiment): 1,428,771 synethtic tweets

## More Information

For a comprehensive overview, including the training setup and analysis of the model, visit the [FinTwitBERT GitHub repository](https://github.com/TimKoornstra/FinTwitBERT).

## Usage

Using [HuggingFace's transformers library](https://huggingface.co./docs/transformers/index) the model and tokenizers can be converted into a pipeline for text classification.

```python
from transformers import pipeline

# Create a sentiment analysis pipeline
pipe = pipeline(
    "sentiment-analysis",
    model="StephanAkkerman/FinTwitBERT-sentiment",
)

# Get the predicted sentiment
print(pipe("Nice 9% pre market move for $para, pump my calls Uncle Buffett 🤑"))
```

## Citing & Authors

If you use FinTwitBERT or FinTwitBERT-sentiment in your research, please cite us as follows, noting that both authors contributed equally to this work:

```
@misc{FinTwitBERT,
  author = {Stephan Akkerman, Tim Koornstra},
  title = {FinTwitBERT: A Specialized Language Model for Financial Tweets},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/TimKoornstra/FinTwitBERT}}
}
```

Additionally, if you utilize the sentiment classifier, please cite:

```
@misc{FinTwitBERT-sentiment,
  author = {Stephan Akkerman, Tim Koornstra},
  title = {FinTwitBERT-sentiment: A Sentiment Classifier for Financial Tweets},
  year = {2023},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co./StephanAkkerman/FinTwitBERT-sentiment}}
}
```

## License

This project is licensed under the MIT License. See the [LICENSE](https://choosealicense.com/licenses/mit/) file for details.