Skip to content

Repository files navigation

News Sentiment Tracker

A news sentiment dashboard for a stock watchlist. Fetches recent headlines per ticker from Finnhub, scores each one bullish/bearish/neutral with a short rationale, and shows an aggregated sentiment breakdown per stock.

How it works

  1. You maintain a watchlist of tickers (persisted in your browser's localStorage).
  2. The app fetches recent company news per ticker from Finnhub.
  3. Each headline is scored bullish/bearish/neutral with a rationale — via the Claude API if ANTHROPIC_API_KEY is set, otherwise via a local keyword-based fallback classifier.
  4. Scores are aggregated per ticker into a sentiment breakdown chart and an overall verdict.

Setup

npm install
cp .env.example .env.local

Fill in .env.local:

  • FINNHUB_API_KEYrequired. News fetching has no fallback without it. Get a free key at finnhub.io/register.
  • ANTHROPIC_API_KEY — optional. Without it, sentiment scoring automatically falls back to a rule-based keyword classifier, so the app is fully demoable without a Claude API key.
npm run dev

Open http://localhost:3000.

Tech

Next.js (App Router) + TypeScript, Tailwind CSS, Recharts, @anthropic-ai/sdk.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages