Market Sentiment Analysis

Using sentiment analysis (NLTK.VADER and TextBlob) to analyze major indices (DJIA, S&P 500, Nasdaq-100) and their individual stocks

Preface, Theory, & Methodology

Sentiment analysis is one of the many quantitative tools that hedge funds use to form their investment strategies. By analyzing the sentiment of headlines to create sentiment scores for individual stocks and major indices, we can attempt to predict movements in the stock market. Our theory is that while rapid/daily sentiment analysis may not result in any correlation, over longer periods (weeks/months/quarters) there may be indications of correlation between sentiment scores and price movements, especially in regards to major indices as opposed to individual stocks.

We begin by scraping recent headlines for all stocks from 3 sources (TD Ameritrade, Finviz, Financial Modelling Prep) using Beautiful Soup and Selenium. Each individual headline is then analyzed for sentiment using Valence Aware Dictionary for Sentiment Reasoning (VADER), a Natural Language Toolkit (NLTK) module. The headline is also analyzed for sentiment using TextBlob, a Python library.

VADER and TextBlob will give composite scores from -1 (extremely negative) to +1 (extremely positive). VADER also gives scores for negative/neutral/positive, and TextBlob also gives a score for subjectivity. We have scaled the composite and subjectivity scores from a [-1,1] scale to a [0,100] scale. VADER's neg/neu/pos scores remain as is.

If you would like to view the code, please check out my Github.

References:
Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014.

Disclaimer:
While we strive to provide accurate and reliable information, our findings, including sentiment analysis results, may be subject to errors, omissions, or inaccuracies. The stock market is inherently complex and unpredictable, and sentiment analysis has limitations. Therefore, we do not guarantee the accuracy, completeness, or reliability of any information or analysis provided by Orbs Analytics. You assume full responsibility and risk for your use of the information provided by Orbs Analytics.

Recent Reports: