Skip to content
All work

Fintech · AI agents · Contributor

Agentic Quantitative Research Copilot

Financial research means stitching data, analysis and write-up together by hand — this agent answers a plain-English question with a streamed, structured research report.

  • Python
  • FastAPI
  • MCP
  • Groq LLaMA-3.3-70B
  • Redis
  • MongoDB
  • WebSockets
Architecture of the copilot: browser, FastAPI, Redis cache, Groq LLM and MCP tool servers

Problem

Answering a question like “how correlated are these stocks, and what’s the drawdown?” usually means pulling prices, running analysis and writing it up by hand. A chatbot alone can’t do the computation.

What I built

I contributed to an agentic research assistant in which a Groq LLaMA-3.3-70B model decides which MCP-based quant tools to call, runs them against live market data, and answers with a structured report.

  • Extended the system with Indian market support (NSE / BSE tickers).
  • Improved the backtesting engine.
  • Added context shrinking so large tool outputs don’t overflow the LLM context.
  • Added a timeout and fallback to Ollama for high availability when Groq is rate-limited.
  • Layered Redis caching (1-hour TTL), MongoDB Atlas persistence and FastAPI WebSocket streaming, cutting redundant yfinance API calls.

Architecture

Browser → WebSocket → FastAPI → Redis cache → Groq LLM → MCP tool servers (market data via yfinance and MongoDB, quant analysis and backtests) → events streamed back to the browser as the agent works.

Results

The agent streams each tool call live and returns a report with correlations, portfolio Sharpe ratio and maximum drawdown. Cache hits avoid repeat market-data calls entirely.

Tech stack

  • Agent: Groq LLaMA-3.3-70B, MCP tool servers, Ollama fallback
  • Backend: Python, FastAPI, WebSockets
  • Data: yfinance, Redis (1-hour TTL cache), MongoDB Atlas
  • Frontend: Next.js

Next project

Drishti

Visually impaired users depend on others for everyday tasks — Drishti turns a spoken request into an action, offline, on a phone or PC.

Drishti walkthrough — a spoken question becomes detected objects and a spoken answer