Inspiration

Traditional stock screeners force traders into rigid filter UIs with dropdowns and sliders. We wanted to build something that feels like talking to a financial analyst , explainable results instantly. The London Stock Exchange, with its 350 listed companies, was the perfect sized universe to prove this out.

What it does

Fin-LSE is a full-stack fintech platform that delivers explainable trade insights for LSE-listed stocks through three intelligent modes:

  • Natural-Language Screener : Ask questions like "Show me stocks with ROE above 20% and PE below 15" and a LangGraph multi-agent system parses your intent, builds SQL, queries a live fundamentals database, and returns ranked results with a human-readable summary.
  • Technical Pattern Scanner :Automatically detects Golden Cross, Death Cross, RSI Oversold/Overbought, Near Breakout, Volume Surges, and MACD crossovers across all LSE stocks every 30 minutes. Users can also describe custom strategies in plain English.
  • Market Intel Feed : Ingests RSS feeds from BBC Business, CNBC, Google News, MarketWatch, and Yahoo Finance, deduplicates articles into unique stories, and uses GPT-4o-mini to extract sentiment, entities, and per-stock impact mappings.

Every stock also gets a 0–100 Opportunity Score and 0–100 Risk Score, broken down into named, auditable drivers (e.g., "Strong ROE +12", "High Volatility −8") so traders understand why a stock scores the way it does.

How we built it

The backend is a FastAPI application orchestrating multiple LangGraph state-machine agents:

  • A Supervisor agent classifies user intent and routes to specialist sub-graphs.
  • A Screener agent uses GPT-4o-mini with Pydantic structured output to convert natural language into validated SQL filters.
  • A Market Feed pipeline (fetch → deduplicate → LLM-enrich → persist) runs on a 1-hour auto-ingest loop.
  • A Scoring engine combines Yahoo Finance fundamentals and 6-month price data (RSI, MACD, moving averages, volatility) into weighted composite scores.

All data is stored in SQLite (WAL mode) for zero-config deployment. The frontend is a Next.js 16 app with React 19, Tailwind CSS 4, and Recharts for interactive OHLCV charts. Firebase Authentication handles Google sign-in.

Challenges we ran into

  • LLM output reliability : Getting GPT-4o-mini to consistently produce valid SQL filter structures required careful prompt engineering and Pydantic structured output with retry logic.
  • RSS deduplication : Different news sources often cover the same story with different headlines. We built a similarity-matching pipeline to group articles into unified stories before LLM enrichment.
  • Rate limiting : Yahoo Finance throttles requests heavily. We had to implement batching, delays, and caching to scan ~350 tickers without getting blocked.
  • Real-time feel : Balancing background data freshness (pattern scans every 30 min, news ingest every hour) with API response speed required careful async scheduling.

Accomplishments that we're proud of

  • A unified prompt bar that auto-detects whether you're asking a screening question, describing a technical pattern, or searching for news — no mode switching needed.
  • Fully explainable scores : every number has a traceable driver, making the system auditable rather than a black box.
  • The entire stack runs locally with just Python, Node.js, and an OpenAI API key : no cloud infrastructure needed.

What we learned

  • LangGraph's state-machine approach to multi-agent systems is far more controllable than chaining LLM calls : each node has a clear contract and errors are recoverable.
  • Structured output (Pydantic models as LLM output schemas) dramatically reduces parsing failures compared to free-form JSON extraction.
  • Building for explainability from day one (named drivers with impact values) makes the product fundamentally more trustworthy.

What's next for Fin-LSE

  • Real-time WebSocket streaming for live price updates and pattern alerts.
  • Portfolio tracking : let users build watchlists and get personalized scoring alerts.
  • Expand to more exchanges : the architecture is exchange-agnostic; adding NYSE/NASDAQ is a configuration change.
  • Fine-tuned models : replace GPT-4o-mini with fine-tuned open-source models for lower latency and cost.

Built With

Share this project:

Updates