Sentiment Analysis from Financial News

Applying sentiment analysis to news headlines for generating investment insights.

Raw HTML files for the Facebook (FB) and Tesla (TSLA) stocks are used to generate investing insight by applying sentiment analysis on financial news headlines. Using natural language processing technique, emotion behind the headline is understood and it is predicted whether the market feels good or bad with respect to the particular stock.

Aiming to generate investing insight by applying sentiment analysis on financial news headlines from FINVIZ.com. Using this NLP technique, the emotion behind the headlines can be understood and we can predict whether the market feels good or bad about a stock. It would then be possible to make a prudent guess on how certain stocks will perform and trade accordingly

*The technique used here to handle large amounts of data can be applied to other text datasets as well.

Libraries used in this code : Beautiful-Soup and NLTK (to add sentiments to the lexicon)

Data Overview after Extracting News Headlines

rim1

NLTK : to add sentiments to the lexicon ; predict sentiments from news

Plotting TIME SERIES of sentiments for stock :

rim2

Visualization for a single day :

Positive, negative and neutral scores for a single day of trading and a single stock

rim3