Skip to main content
CK Works
Work

Financial NLP · Market Data

SentimentTrader

A financial data pipeline that turns online market discussions, search activity, and stock data into structured features for future machine-learning research.

Result

Creates a growing historical dataset for testing how online investor sentiment relates to market activity.

RoleData Engineering, Machine Learning, System Design
TimeframeJanuary 2025 – May 2025, resumed December 2025
StatusPersonal Project / Data Collection in Progress

What I worked on

Data PipelinesNLPFeature EngineeringFinancial Data

Stack

PythonPandasNumPyHugging FacePRAWpytrendsyfinance
SentimentTrader data pipeline preview

The short version

  1. 01

    SentimentTrader started from a question I kept coming back to: can the way people talk about a stock online reveal anything useful about how that stock behaves afterward?

  2. 02

    The first version was built between January and May 2025. I returned to the project in December 2025 with a clearer goal: instead of rushing into a prediction model with a small and unreliable dataset, I would focus on building a dependable historical data pipeline first.

  3. 03

    The project now collects Reddit finance discussions, Google Trends search interest, and stock-market data, then turns those sources into structured features that can support future machine-learning research.

The problem

Online financial discussion moves quickly, but it is also extremely messy. People use ticker symbols, company names, abbreviations, jokes, sarcasm, and everyday words that can easily be mistaken for stocks.

A ticker such as AI or IT might refer to a company, or it might just be part of a normal sentence. Even when a post clearly discusses a stock, not every mention should be treated equally.

Reddit activity, Google search interest, and stock prices all arrive in different formats and at different intervals, so the system has to normalize each source and align the data around the same ticker symbols and dates.

What I built

  • Reddit post and comment collection through PRAW
  • Text cleaning and ticker/company mention extraction
  • False-positive filtering for ambiguous ticker symbols
  • Financial and social-media sentiment analysis
  • Engagement-weighted daily sentiment aggregation
  • Google Trends data collection through pytrends
  • Historical stock price and volume collection through yfinance
  • Ticker-and-date aligned feature dataset for future modeling

Design decisions

I treated the historical dataset as the primary product instead of presenting the first version as a stock-prediction system.

That made the project more honest. Financial markets are noisy, and a small dataset can make a model look much more accurate than it really is.

I also kept the output structured so different sentiment models, engagement signals, search interest, and market features can be compared or combined later instead of locking the system into one interpretation too early.

Technical decisions

Python, Pandas, and NumPy handle most of the pipeline because the core work is text processing, feature creation, date alignment, aggregation, and dataset management.

The Reddit portion uses PRAW to collect finance discussions, then cleans text, extracts possible ticker mentions, and filters out common false positives before sentiment analysis.

The sentiment layer uses financial and social-media models, including FinBERT and Twitter-RoBERTa, so the system can compare formal financial language with the shorter, more informal language common in Reddit comments.

The final pipeline combines Reddit sentiment, engagement signals, Google Trends data, and market data into a repeated data-collection workflow that continues growing the dataset over time.

Challenges

Ticker extraction was one of the first major challenges because a simple regular expression creates many incorrect matches from normal words, unsupported symbols, and ambiguous references.

Another challenge was deciding what a sentiment score should represent. A single positive post should not necessarily outweigh a large negative discussion, but raw engagement can also be misleading.

Timing was also difficult because a post made after the market closes should not be treated the same as one made before trading begins, and Reddit, Google Trends, and market prices do not naturally share the same reporting windows.

The outcome

SentimentTrader is currently operating as a data-collection and feature-engineering pipeline.

The pipeline handles external APIs, natural-language processing, scheduled data workflows, noisy real-world datasets, and financial time-series data as one running system, built within the practical limits of machine-learning projects.

The project is now accumulating historical observations that can later be divided into training, validation, and out-of-sample testing periods.

What I'd improve next

The next phase is to begin testing prediction models once the dataset covers enough time and different market conditions.

The first models will likely focus on limited questions, such as whether changes in discussion volume or sentiment provide any useful signal for short-term volatility or directional movement.

I also want to improve company-mention detection, experiment with time-of-day features, monitor changes in sentiment rather than only daily averages, and build a dashboard for inspecting individual tickers and pipeline health.

Let's Talk

Want something like this for your business?

Whether it's a website, a system, or an idea that still feels a little messy, I can help you figure out what makes sense next.