Premium Project

Extract Stock Sentiment from News Headlines

Scrape news headlines for FB and TSLA then apply sentiment analysis to generate investment insight.

Start Project
  • 9 tasks
  • 1,255 participants
  • 1,500 XP

Project Description

Note: this Project is soft launched, which means you may experience bugs. Please click "Report an Issue" in the top-right corner of the Project interface to provide feedback.

It used to take days for financial news to spread via radio, newspapers, and word of mouth. Now, in the age of the internet, it takes seconds. Did you know news articles are automatically being generated from figures and earnings call streams? In this Project, you will generate investing insight by applying sentiment analysis on financial news headlines from Finviz. Using this natural language processing technique, you will understand the emotion behind the headlines and predict whether the market feels good or bad about a stock.

This Project lets you apply the skills from Intermediate Python for Data Science, Manipulating DataFrames with pandas, and Natural Language Processing Fundamentals in Python. We recommend that you take those courses before starting this Project. Familiarity with the Beautiful Soup package may also be helpful.

The datasets used in this Project are raw HTML files for the Facebook (FB) and Tesla (TSLA) stocks from FINVIZ.com, a popular website dedicated to stock information and news.

Project Tasks

  • 1Searching for gold inside HTML files
  • 2What is inside those files anyway?
  • 3Extra, extra! Extract the news headlines
  • 4Make NLTK think like a financial journalist
  • 5BREAKING NEWS: NLTK Crushes Sentiment Estimates
  • 6Plot all the sentiment in subplots
  • 7Weekends and duplicates
  • 8Sentiment on one single trading day and stock
  • 9Visualize the single day
Instructor Avatar
Juan González-Vallinas

Data Scientist at ABN AMRO

I am a scientist in the private sector. I do not like the data scientist title much though. What kind of scientist does not use data? I worked in genomics, video games and now fintech.

See More

Technology

  • Python LogoPython
  • Topics

    Data ManipulationData VisualizationProbability & StatisticsImporting & Cleaning Data