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




