Skip to content

AI agent that monitors financial news and detects meaningful sentiment shifts using LLM-based analysis and persistent context.

Notifications You must be signed in to change notification settings

QuantTradingOS/Sentiment-Shift-Alert-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📰📈 Sentiment Shift Alert Agent

A Streamlit-based AI agent that monitors news sentiment shifts for a watchlist of stocks and triggers in-app alerts when sentiment changes exceed your configured thresholds.

It uses:

  • Finnhub for news sentiment (/news-sentiment) and optional company headlines (/company-news).
  • OpenAI (optional) to generate a short narrated explanation of why a shift may have happened.

⚠️ Educational project only — not financial advice.


✨ Features

  • Watchlist-based monitoring (AAPL, NVDA, etc.)
  • Finnhub News Sentiment polling
  • Threshold-based “shift detection” (delta-based)
  • Persistent user context stored locally in JSON
  • In-app alerts feed (acknowledge / clear)
  • Email + chat notification channels included as disabled stubs (safe for public GitHub)

🧠 How “Context” Works (JSON Memory)

This project stores context in a local JSON file instead of a database.

context.json stores:

  • Per-user watchlist
  • Threshold settings
  • Last-seen sentiment values (baseline) to compute deltas

alerts.json stores:

  • Alert history (per user)
  • Acknowledgement status

For a public repo, JSON is simple, portable, and easy to understand. For enterprise/multi-instance deployments, you’d replace this with a database.


🔑 API Keys

You need:

  • Finnhub API Key (required)
  • OpenAI API Key (optional for narration)

Keys are entered in the Streamlit sidebar and are not committed to git.


📄 Setup

Clone repo and install dependencies:

python -m venv venv
source venv/bin/activate  # macOS/Linux
pip install -r requirements.txt

About

AI agent that monitors financial news and detects meaningful sentiment shifts using LLM-based analysis and persistent context.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages