← Selected work

03 / Market Sentiment Analysis with NLP

Reading the headlines.
Testing the signal.

Does the tone of financial news tell us anything about what happens next? A working NLP pipeline compares VADER and TextBlob with stock returns over 30-day windows — practice in the evaluation methods designers meet when working with data and research teams.

Project
Applied data science
Tools
Python · VADER · TextBlob
Study
Historical Agilent (A) sample
Implementation
September 2026 · AI-assisted

Language → sentiment → evidence

A positive headline
is a hypothesis.

The test is whether its sentiment helps estimate later returns, beyond a baseline that never reads the news.

Real historical data · No live predictions
Scatterplot of VADER sentiment and subsequent 30-day Agilent returns for non-overlapping holdout windows.
Each point is one held-out, non-overlapping return window.

01 / The question

Can tone become a useful signal?

Financial headlines combine facts, uncertainty, and opinion. This project turns their language into measurable features, then asks whether those features add information about subsequent price movements.

VADER provides a rule-based sentiment score. TextBlob provides polarity and subjectivity. Both are general-purpose language tools, so their treatment of financial phrases is something to inspect, not assume.

How much does a sentiment score explain once we keep future outcomes out of training?

Historical research dashboard

Inspect the evidence

Agilent (A) headlines and adjusted closing prices from FNSPID.

One stock · Exploratory study

Loading the computed analysis…

02 / The pipeline

Make every comparison traceable

  1. Clean without losing tone

    Validate timestamps, remove repeated URLs and same-day duplicate headlines, and preserve punctuation, capitalization, and negation for scoring.

  2. Compare two independent readings

    Run VADER compound and TextBlob polarity on each complete headline. Average scores for headlines that map to the same stock and entry date.

  3. Wait until the news is available

    Use the first observed trading close strictly after the headline’s UTC date. Measure the adjusted-price return to the first close on or after 30 calendar days later. Exclude incomplete windows and matches with gaps over seven days.

  4. Hold future outcomes apart

    Train before January 1, 2017. Remove windows that cross that boundary. Select non-overlapping windows in chronological order within each period, fit one linear model per sentiment feature, and compare with the training mean on later data.

03 / Interpretation

The limits are part of the result

One company is a narrow view

The sample uses the first complete ticker in the source file, Agilent (A), selected for a bounded, reproducible study. Its results do not describe the broader market.

Association is not prediction

The chart shows correlation. The holdout table separately evaluates predictions. Neither establishes causality, and no statistical significance or profitable strategy is claimed.

Language can miss financial meaning

A phrase such as “lower costs” can be favorable to a company without sounding positive to a general language model. Some source headlines cover several companies and may only weakly relate to Agilent.

Historical data needs scrutiny

Dates are interpreted as supplied by FNSPID; publisher timestamps have not been independently verified. Market regimes, source coverage, corporate actions, and overlapping themes can affect the findings.

04 / Reproduce & extend

Open the work behind the page

The downloadable Python project includes the data fetcher, scoring pipeline, evaluation, and tests for time alignment, duplicate handling, missing prices, and future-data leakage. The web dashboard displays the pipeline’s computed output; it does not run a live news feed.

This implementation was built with ChatGPT assistance in September 2026. A useful next study would add more stocks, evaluate several chronological periods, and compare these baselines with a finance-specific sentiment model.

Sources: Dong, Fan & Peng · FNSPID (2024) · Original dataset · Hutto & Gilbert · VADER (2014) · TextBlob documentation. Original headline publishers are linked in the explorer.

Next exploration

Common Ground