FinVADER
VADER sentiment classifier updated with financial lexicons
VADER (Valence Aware Dictionary and sEntiment Reasoner) is a mainstream model for sentiment analysis using a general-language human-curated lexicon, including linguistic features expressed on social media. As such, the model works worse on texts that use domain-specific language, such as finance or economics.
FinVADER improves VADER's classification accuracy, including two finance lexicons: SentiBignomics, and Henry's word list. SentiBigNomics is a detailed financial lexicon for aspect-based sentiment analysis with approximately 7300 terms containing a polarity score ranging in [-1,1] for each item. Henry's lexicon covers 189 words appearing in the company earnings press releases.
FinVADER outperforms VADER on Financial PhraseBank data:
The code for this benchmark test is here
Installation
FinVADER requires Python 3.8 - 3.11, and NLTK.
To install using pip, use:
pip install finvader
Usage
- Import the library:
from finvader import finvader
- Select lexicons:
def finvader(text = 'str', # Text
indicator = 'str', # VADER' indicator: 'pos'/'neg'/'neu'/'compound'
use_sentibignomics: bool= False, # Use SentiBignomics lexicon
use_henry: bool= False): # Use Henry's lexicon
)
- Use the classifier:
text = "The period's sales dropped to EUR 30.6 m from EUR 38.3 m, according to the interim report, released today."
scores = finvader(text,
use_sentibignomics = True,
use_henry = True,
indicator = 'compound' )
Documentation, examples and tutorials
For examples of coding, read these tutorials:
FinVADER: Sentiment Analysis for Financial Applications here
Fine-tuning VADER Classifier with Domain-specific Lexicons here
Please visit here for any questions, issues, bugs, and suggestions.
Metadata
Release files for finvader 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| finvader-1.0.2.tar.gz | 45.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| finvader-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.1 kB
Release files / finvader-1.0.2.tar.gz
| Download URL | finvader-1.0.2.tar.gz |
|---|---|
| Size | 45.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74d6c241ea92a6b545a952f2c154044897671ba413340dbb06c75b46ecf8adf1
|
|
BLAKE2b-256 checksum How to use checksums |
1dd0e9c839210a6e8db1b0ec34d01116b1382f809228849a0b294eba260d4d89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / finvader-1.0.2-py3-none-any.whl
| Download URL | finvader-1.0.2-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a3fc7d3ea23f1bc56968c1c25a10b854dbbbbf52c091c1d5ea5f02a131c98ad
|
|
BLAKE2b-256 checksum How to use checksums |
944f7f5c7e0e7d8e55410e8a560898803940ee4ac55745f82df3f240d57cacee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for finvader 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.