Sentiment of News Headlines as a Directional Signal of Stock Price Movement


Quantitative hedge funds have been using computer algorithms to make trade decisions. The first algorithms were driven by static models developed by data scientists. Decisions made by these algorithms yielded results that were often inferior to those made by human traders. Since the emergence of machine learning and deep learning, there have been breakthroughs and innovations in the development of computational trading software.

It’s impossible to prove definitely that positive or negative public sentiment of a company causes the company’s stock price to increase or decrease but most finance theories cannot be proven yet many are extremely useful. Sentiment analysis of news, twitter and other media is widely incorporated by quantitative hedge funds in their trading strategies. Companies such as Two Sigma, DE Shaw and Renaissance Technologies have taken advantage of machine learning algorithms to provide the power to bring unstructured data to order. Unstructured data includes a wide range of data types including job posts, social media discussions, satellite imagery, credit card transactions, and data obtained from mobile devices, information that enables analysts to better predict how stocks will perform. Natural language processing algorithms can perform sentiment analysis on social media posts and forum discussions to see which to evaluate customer satisfaction.

My project tries to visualize and examine examples of how real world events result in a high volume of news being written about a company which in turns results in a increase in stock price if news sentiment is very positive and decrease if news sentiment is very negative. We will try to analyze and identify ‘events’ for the most liquid assets. Liquidity of a stock is proportional to the ease at which when an ‘event’ occurs, we can take advantage this information and trade the asset in high volumes and boost profits.


The most liquid stocks were scrapped from WSJ with selenium. Using the pandas_datareader library, closing stock prices were obtained with calls to Investors Exchange (iex) API. The news headline and description source is from API calls to the News API which required a API key. Unfortunately, although the documentation for the API states that you can get news headlines from the last 6 months, the API gives an error for any requests made going back more than one month. I was only able to obtain data from the last 30 days. The news headlines and descriptions were published from September 16th, 2018 to October 16th, 2018.

Using Pysentiment, a python package that contains a financial sentiment dictionary, I obtained subjectivity and polarity scores for each news article.


Of the most liquid stocks, I chose two to analyze: Bank of America and JPMorgan Chase. Polarity measures how negative or positive the news article is and subjectivity measures how objective the piece is.

I. JPMorgan Chase

The Wall Street Journal reported on Oct. 5th that JPMorgan Chase has plans to cut nearly 400 positions in its consumer home lending division. The Wall Street Journal also reported on Oct. 5th that JPMorgan Chase has agreed to pay $5.3 million to settle allegations it violated various U.S. sanctions programs.

On Oct. 6th, mean sentiment of JPMorgan Chase declined from a positive polarity score to a slightly negative polarity score.

JPMorgan Chase stock price declined after Oct. 8th from 115.32 to 106.34. Polarity became negative before stock price decreased. Drop in stock prices lag behind news and change in reaction to an ‘event’.

There is less news publication on the weekends as one would expect. Sept. 22nd and Sept. 23, Sept.29 and Sept.30, Oct.13 and Oct.14 in 2018 are all weekends. On Oct. 12th there was an ‘event’, that was either very positive or negative that resulted in large amount of news production on or related to JPMorgan Chase. This ‘event’ was the release of JPMorgan Chase’s financial results for the third quarter of 2018.

Consistently good earnings tend to lead investors to be optimistic about the future of a company and its stock price. The stock closing price increased after Oct. 12th after several days of a downward trend likely because it was reported that JPMorgan beat earnings for the 15th quarter in a row.

However, it was reported on Oct. 14th that strong earnings for the third quarter have repeatedly failed to boost stock prices this year leaving investors unsatisfied. This may explain why JPMorgan Chase’s stock price increased for a couple of days before decreasing again.

One news article reported, ‘Big banks to kick off earnings season this week, but reports may not boost their stocks. Strong economy and high credit quality will weigh against slowing loan growth and pressure on net interest margins.’

There are 64661 words total in 1000 news articles related to or on JPMorgan Chase.

The conference refers to the Saudi Arabia’s investment conference held on Oct. 23rd, a conference that was supposed to celebrate Saudia Arabia’s arrival on the global financial stage. JPMorgan Chase’s CEO Jamie Dimon and other Wall Street executives pulled out of the conference after the death of Jamal Khashoggi, a well-known journalist and critic of the Saudi government.

The news articles reported President Trump defending Saudia Arabia Government against accusations of murder and the affect of his economic policies on major banks including JPMorgan Chase. Earnings refer to JPMorgan Chase’s third quarter financial results for 2018.

II. Bank of America

On Oct. 15th, there was a very high volume of news indicating the potential for an ‘event’ that may have lead to a large rise or decrease in stock price in the days following Oct. 15th.

Bank of America’s mean news polarity score was very negative on Oct. 15th, almost -0.8. Bank of America’s stock price may have declined the days following Oct. 15th because very negative news sentiment may influence investors to short the stock.

There was a mix of negative and positive news on Bank of America from Oct. 14th and Oct. 15th.

Bank of America reported third-quarter 2018 financial results on Oct. 15th. According to the Wall Street Journal Bank of America’s profits increased by 32%. However, there were negative news articles reported that ‘Bank of America has lost ground to rivals like JPMorgan Chase in investment banking.’ likely due to its risk-adverse culture and the article urges Bank of America should seize its moment.

Another article concludes that Bank of America’s investment bank unit was failing to produce results and the unit’s revenue has been flat for the first three quarters of 2018.

We can see that Bank of America’s stock price entered a downward trend for the week following Oct. 16th.

There are 65521 words total in the news data related or on Bank of America.

Bank of America is based in Charlotte, NC. Bank of America ’s chief operating officer, Tom Montag, was listed as attending the Saudi conference despite the potential public backlash from attending.


Sentiment analysis on news, social media and other types of unstructured data provides unconventional ways of improving risk-adjusted performance and beating the market. Sentiment analysis on alternative data is useful for day trading but not for long term investments. We can identify events that may lead to huge drops or hikes in stock prices by a stark increase the news volume relating or on a company.

Further Improvements

Performing sentiment analysis on twitter or other social media data would give more accurate polarity and subjectivity scores. Typically, a much lower amount of news is written and published on weekends. Taking the mean of polarity on weekends with very news articles is not a good central tendency measure.