All projects

No. 06AI / ML

Stock Intelligence Engine

A personal project — a local web app that turns any Indian company name into a structured stock report: price action, technical indicators, aggregated news, and an AI-generated summary, all from free data sources.

  • Personal Project
  • Data Pipelines
  • NLP
  • LLM Integration
  • Financial Data
  • 11news feeds merged and deduped
  • $0data cost — free sources only

Tech stack

  • Python
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • yfinance
  • nsepython
  • feedparser
  • sentence-transformers
  • FAISS
  • spaCy
  • FinBERT
  • APScheduler
  • OpenAI / Ollama

How it works

  1. 1Resolve company to ticker
  2. 2Pull price + news in parallel
  3. 3Store in Postgres
  4. 4Dedupe + embed for similarity
  5. 5Generate AI summary
  6. 6Serve dashboard
01

Problem

Get a full picture of an Indian public company — price action, technical indicators, aggregated news, and a plain-language summary — from one search box, without paying for a data subscription.

02

Why it was difficult

No single free source covers everything: price history, technicals, and news each come from a different place, and news specifically means merging 11 separate RSS feeds that often republish overlapping stories under different headlines. Keeping the whole pipeline genuinely free meant treating the paid LLM step as optional rather than required.

03

Architecture

A company name resolves to a ticker, which fans out into parallel ingestion: price data and computed technicals on one side, RSS aggregation across 11 financial news sources on the other. Both land in PostgreSQL, after which an AI-analysis step reads the stored price and news data and generates structured summaries and key points, served through a FastAPI backend and a single-page dashboard.

04

Technical approach

Technicals are computed directly rather than pulled from a paid API — RSI-14 uses proper Wilder smoothing rather than a naive moving average, and the 50/200-day moving averages use standard rolling means. News deduplication hashes normalized headlines to drop exact repeats across feeds, while a separate embedding-based similarity layer goes further, matching genuinely similar historical events rather than just identical headlines. The LLM step supports a hosted OpenAI option or a fully local Ollama model, so the tool can run without an ongoing model-API cost when needed.

05

Implementation

A FastAPI backend with SQLAlchemy models, a scheduler that runs daily and weekly ingestion jobs automatically, and prompts constrained to only cite numbers that are actually present in the stored data rather than letting the model speculate.

06

Challenges

Free data sources are less reliable than paid ones — feeds go down, rate-limit, or return incomplete data.

07

Solution

The core dashboard is built to degrade gracefully — if one optional data source is unreachable, the rest of the report still renders instead of failing the whole request.

08

Evaluation

Not documented — no formal evaluation suite exists; this is a personal side project, not production software.

09

Results

Not documented — ask Suraj if he wants adoption or usage numbers included.

10

Future improvements

The project already has a background task queue configured but not yet wired up for heavier scheduled workloads — putting that to use is the clearest next step.

Want something like this built?

Let’s talk