FinEAS: Financial Embedding Analysis of Sentiment šŸ“ˆ

Overview

FinEAS: Financial Embedding Analysis of Sentiment šŸ“ˆ

(SentenceBERT for Financial News Sentiment Regression)

This repository contains the code for generating three models for Finance News Sentiment Analysis.

The models implemented are:

  • A SentenceBERT with simple classifier.
  • A BERT with simple classifier.
  • A simple Bi-directional Long-Short Term Memory (LSTM) network.
  • FinBERT from HuggingFace.
  • SentenceBERT from HuggingFace

Models šŸ¤–

Results āœ…

We used three partitions of the datasets from the February 11th, 2021. 6 months previous to that date, 1 year previous to that date and 2 years previous to the date mentioned.

We also evaluated the models 2 weeks later that date; that is to say, we evaluated from February 12th, 2021 to February 26th, 2021.

The table below shows the results:

FinEAS BERT BiLSTM
6 months 0.0556 0.2124 0.2108
6 months
Next 2 weeks
0.1061 0.2190 0.2194
1 year 0.0654 0.2137 0.2140
1 year
Next 2 weeks
0.1058 0.2191 0.2194
2 years 0.0671 0.2087 0.2086
2 years
Next 2 weeks
0.1065 0.2188 0.2185

The table below shows the results for the HuggingFace models

Dates FinEAS FinBERT
6 months 0.0044 0.0050
12 months 0.0036 0.0034
24 months 0.0033 0.0040

Citing šŸ“£

@misc{gutierrezfandino2021fineas,
      title={FinEAS: Financial Embedding Analysis of Sentiment}, 
      author={Asier GutiƩrrez-FandiƱo and Miquel Noguer i Alonso and Petter Kolm and Jordi Armengol-EstapƩ},
      year={2021},
      eprint={2111.00526},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

License šŸ¤

MIT License.

Copyright 2021 Asier GutiƩrrez-FandiƱo & Jordi Armengol-EstapƩ.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
FinGAT: A Financial Graph Attention Networkto Recommend Top-K Profitable Stocks
FinGAT: A Financial Graph Attention Networkto Recommend Top-K Profitable Stocks

FinGAT: A Financial Graph Attention Networkto Recommend Top-K Profitable Stocks This is our implementation for the paper: FinGAT: A Financial Graph At

StocksMA is a package to facilitate access to financial and economic data of Moroccan stocks.
StocksMA is a package to facilitate access to financial and economic data of Moroccan stocks.

Creating easier access to the Moroccan stock market data What is StocksMA ? StocksMA is a package to facilitate access to financial and economic data

RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving

RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving (AAAI2021). RTS3D is efficiency and accuracy s

the code used for the preprint Embedding-based Instance Segmentation of Microscopy Images.
the code used for the preprint Embedding-based Instance Segmentation of Microscopy Images.

EmbedSeg Introduction This repository hosts the version of the code used for the preprint Embedding-based Instance Segmentation of Microscopy Images.

 UMEC: Unified Model and Embedding Compression for Efficient Recommendation Systems
UMEC: Unified Model and Embedding Compression for Efficient Recommendation Systems

[ICLR 2021] "UMEC: Unified Model and Embedding Compression for Efficient Recommendation Systems" by Jiayi Shen, Haotao Wang*, Shupeng Gui*, Jianchao Tan, Zhangyang Wang, and Ji Liu

Y. Zhang, Q. Yao, W. Dai, L. Chen. AutoSF: Searching Scoring Functions for Knowledge Graph Embedding. IEEE International Conference on Data Engineering (ICDE). 2020
Y. Zhang, Q. Yao, W. Dai, L. Chen. AutoSF: Searching Scoring Functions for Knowledge Graph Embedding. IEEE International Conference on Data Engineering (ICDE). 2020

AutoSF The code for our paper "AutoSF: Searching Scoring Functions for Knowledge Graph Embedding" and this paper has been accepted by ICDE2020. News:

Code for
Code for "Learning the Best Pooling Strategy for Visual Semantic Embedding", CVPR 2021

Learning the Best Pooling Strategy for Visual Semantic Embedding Official PyTorch implementation of the paper Learning the Best Pooling Strategy for V

Visual Tracking by TridenAlign and Context Embedding
Visual Tracking by TridenAlign and Context Embedding

Visual Tracking by TridentAlign and Context Embedding (TACT) Test code for "Visual Tracking by TridentAlign and Context Embedding" Janghoon Choi, Juns

Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).
Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).

Deep Text Search - AI Based Text Search & Recommendation System Deep Text Search is an AI-powered multilingual text search and recommendation engine w

Comments
  • Download and prepare data

    Download and prepare data

    1. Use Ravenpack keys to access the dataset.
    2. Download dataset.
    3. Filter by companies (column COMP). We only want rows with COMP in [LIST OF COMPANIES*]. "Company+US" (by default 50 companies).
    4. For the model we will use the free text from EVENT_TEXT as input and EVENT_SENTIMENT_SCORE (-1 to ++1). Free text should be left as is. SENTIMENT_SCORE should be scaled to [0, 1]. Column COMP should be kept. If there is an "id" column, keep it as well.
    5. Sampling. For the moment, don't sample any subset. If there are too many rows for the model, we will take a subset.
    6. Do a train-valid-test split. For the moment, random but reproducible. Validation and test should be like 4000 sentences each, ideally with at least 1 company of the ones we selected.

    *this list should be public companies: Apple, Google...

    opened by jordiae 2
  • Train SentenceBERT model

    Train SentenceBERT model

    Use https://github.com/UKPLab/sentence-transformers

    It's very easy to use. Use it as feature extractor for the moment, attach a simple linear classifier for the moment.

    enhancement 
    opened by jordiae 1
  • Train baseline(s)

    Train baseline(s)

    First train SentenceBERT. At some point, train one or two baselines. Like: An LSTM (embeddings + LSTM + linear classifier), or the original BERT (to show that SentenceBERT is more sensible choice).

    enhancement 
    opened by jordiae 0
Owner
LHF Labs
https://huggingface.co/lhf
LHF Labs
Semi-supervised Learning for Sentiment Analysis

Neural-Semi-supervised-Learning-for-Text-Classification-Under-Large-Scale-Pretraining Code, models and Datasets for怊Neural Semi-supervised Learning fo

null 47 Jan 1, 2023
This is the code for ACL2021 paper A Unified Generative Framework for Aspect-Based Sentiment Analysis

This is the code for ACL2021 paper A Unified Generative Framework for Aspect-Based Sentiment Analysis Install the package in the requirements.txt, the

null 108 Dec 23, 2022
This repository contains various models targetting multimodal representation learning, multimodal fusion for downstream tasks such as multimodal sentiment analysis.

Multimodal Deep Learning ?? ?? ?? Announcing the multimodal deep learning repository that contains implementation of various deep learning-based model

Deep Cognition and Language Research (DeCLaRe) Lab 398 Dec 30, 2022
This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Information Maximization for Multimodal Sentiment Analysis, accepted at EMNLP 2021.

MultiModal-InfoMax This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Informa

Deep Cognition and Language Research (DeCLaRe) Lab 89 Dec 26, 2022
A Python multilingual toolkit for Sentiment Analysis and Social NLP tasks

pysentimiento: A Python toolkit for Sentiment Analysis and Social NLP tasks A Transformer-based library for SocialNLP classification tasks. Currently

null 298 Jan 7, 2023
Enhancing Aspect-Based Sentiment Analysis with Supervised Contrastive Learning.

Enhancing Aspect-Based Sentiment Analysis with Supervised Contrastive Learning. Enhancing Aspect-Based Sentiment Analysis with Supervised Contrastive

HLT@HIT(SZ) 7 Dec 16, 2021
Experimental solutions to selected exercises from the book [Advances in Financial Machine Learning by Marcos Lopez De Prado]

Advances in Financial Machine Learning Exercises Experimental solutions to selected exercises from the book Advances in Financial Machine Learning by

Brian 1.4k Jan 4, 2023
A resource for learning about deep learning techniques from regression to LSTM and Reinforcement Learning using financial data and the fitness functions of algorithmic trading

A tour through tensorflow with financial data I present several models ranging in complexity from simple regression to LSTM and policy networks. The s

null 195 Dec 7, 2022
PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).

This is the original implementation of our paper, A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem (arXiv:1706.1

Zhengyao Jiang 1.5k Dec 29, 2022
This project is a loose implementation of paper "Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach"

Stock Market Buy/Sell/Hold prediction Using convolutional Neural Network This repo is an attempt to implement the research paper titled "Algorithmic F

Asutosh Nayak 136 Dec 28, 2022