Stock News Sentiment Analysis with Fin-BERT Transformer.

Konstantinos Poulinakis
CodeX
Published in
4 min readApr 18, 2022

--

Tutorial on financial news sentiment analysis using BERT NLP Transformer.

Photo by Markus Spiske on Unsplash

You’ve heard about it. You’ve thought about it. Does it work, you ‘re wondering … Short answer : “Yes it does!“

News is a huge source of information and influence traders’ behaviour in semi-predictable ways. “Predictable” did you say ? Yes, so let’s get to work !

Sentiment Analysis and Transformers

TLDR: Transformers are effective deep learning models in the NLP task of extracting sentiment out of a sentence eg. positive, negative. FinBERT is a pretrained transformer model trained on financial corpora.

Sentiment analysis is a natural language processing technique of analyzing the emotion or positiveness of a sentence. For example, “Microsoft misses profit expectations” has a negative sentiment while “Microsoft exceeds yearly sales” has a positive sentiment. We understand the sentiment behind those sentences, but it’s a lot harder for a computer to do so.

Fortunately, natural language processing transformers have nearly perfected this art. If you are familiar with Deep Learning’s newer advances you have probably heard about Transformers, but even if you haven’t, don’t worry because we are not getting into the details today. We…

--

--