CoolFace
Apppublic

deeraw/equity-research-ai-api

sourceHugging Facemitupdated 5mo agoView on Hugging Face
1likes
App README

AI Equity Research Analyst — API

RAG analyst over NSE / SEC filings. TF-IDF retrieval over chunked filing text (no external embedding API required), with optional LLM hookup (Anthropic Claude) for synthesised investment memos with citations.

Endpoints

  • —GET /companies — list indexed issuers
  • —POST /ask — retrieval Q&A over filings (optionally scoped to a single company)
  • —POST /memo — multi-question structured investment memo with citation-backed answers
  • —POST /dcf — two-stage DCF with WACC × terminal-growth sensitivity grid
  • —POST /comps — peer-comp valuation triangulation (EV/Sales, EV/EBITDA, P/E)

Filing store

Each company gets a directory under data/<TICKER>/ containing a meta.json and one .txt file per section (business.txt, risks.txt, etc.). Drop in real 10-Ks / NSE annual reports — they get auto-chunked and indexed at startup.

The repo ships with seed extracts for DANGCEM, MTNN, GTCO, and ZENITHBANK so retrieval works out of the box.

LLM mode (optional)

Set ANTHROPIC_API_KEY in the environment. Without it, /memo returns retrieval evidence only (still useful — every answer is grounded in citation-numbered excerpts).

Run

bash
pip install -r requirements.txt
uvicorn main:app --reload