Inspiration
Institutional investment research — the kind that drives billion-dollar decisions — has always been locked behind teams of analysts, expensive Bloomberg terminals, and days of work. A retail investor asking "should I buy NVDA?" gets a tweet. A hedge fund gets a 20-page research memo backed by real data.
We wanted to close that gap. The idea: what if a multi-agent AI system could do in 2 minutes what a team of 5 analysts does in 2 days?
What it does
Hedge Fund Analyst is a multi-agent system built on Google ADK that produces institutional-grade investment memos for any stock — just type a company name or ticker in plain English.
The system orchestrates 8 specialized AI agents:
- OrchestratorAgent — extracts the stock ticker from any natural language input ("Should I buy Microsoft?" → MSFT)
- NewsAgent — fetches and analyses recent news, identifies market-moving stories, rates sentiment BULLISH/BEARISH/NEUTRAL
- FinancialsAgent — deep dives into P&L, balance sheet, cash flow, analyst price targets, and technical indicators
- SentimentAgent — analyses short interest, insider buying/selling activity, and institutional ownership changes
- CompetitorAgent — benchmarks the company against key peers on P/E, margins, growth, and ROE
- RiskAgent — evaluates beta, macro risk, sector performance, and flags specific red flags
- SynthesisAgent — aggregates all 5 research reports into a structured 8-section investment memo
- ReviewerAgent — quality-gates the memo, triggering revision if any section is incomplete
The final output is a complete investment memo with: Executive Summary, Investment Thesis, Financial Analysis, Competitive Landscape, News & Catalysts, Market Sentiment, Risk Assessment, and a clear BUY/HOLD/SELL recommendation with conviction level and time horizon.
How we built it
Google ADK (Agent Development Kit) is the core framework, using all 4 major primitives:
SequentialAgent— orchestrates the overall pipeline (extract ticker → research → synthesise → review)ParallelAgent— designed to fan-out all 5 specialists simultaneously (upgradeable from sequential on paid API tier)LoopAgent— runs the synthesis-review cycle up to 2 times until the memo passes quality checksLlmAgent— powers each specialist with tailored instructions and dedicated tools
Data layer (all free, no paid data subscriptions needed):
yfinance— stock prices, financial statements, analyst recommendations, price history, insider transactions, institutional holdingsNewsAPI— recent news articles (optional, falls back to yfinance news)
Infrastructure:
- Python 3.12 with
uvpackage manager - Google Gemini 2.5 Flash as the LLM backbone
- Deployed and tested on Google Cloud Shell
- ADK Web UI for interactive demo
Key engineering decisions:
- Used a deterministic Python function (regex + company name map) for ticker extraction instead of relying on the LLM — this eliminated the "what ticker?" bug where agents would ask for input instead of proceeding
- Used
output_keyon every specialist agent to write results into sharedsession.state, which the SynthesisAgent reads via{variable}template injection - Sequential research pipeline respects Gemini free tier rate limits (5 RPM) while a one-line swap enables parallel execution on paid tiers
Challenges we faced
Rate limiting was the first major obstacle. Our initial design used ParallelAgent to fire all 5 specialists simultaneously — which is the right architectural choice — but instantly hit Gemini's free tier limit of 5 requests/minute. We solved this by making the research pipeline sequential, with a clear upgrade path to parallel documented in the code.
Session state propagation was subtle. Sub-agents inside workflow agents don't automatically receive the user's original message. Early versions had all specialist agents asking "please provide a ticker" because {ticker} wasn't in session state yet. The fix was adding an OrchestratorAgent as the first step that deterministically extracts and writes the ticker to state before any specialist runs.
LLM unpredictability in structured pipelines — when the orchestrator was an LlmAgent, Gemini would sometimes output "The ticker is MSFT" instead of just "MSFT", breaking downstream template injection. Replacing it with a Python tool made extraction 100% reliable.
What we learned
- Google ADK's
output_key+ session state is a powerful but opaque communication mechanism — understanding it is the key to making multi-agent pipelines actually work - Deterministic Python tools are more reliable than LLMs for structured extraction tasks in agent pipelines
- The difference between
SequentialAgent,ParallelAgent, andLoopAgentisn't just about speed — it's about the fundamental control flow of your system - Real financial data (yfinance) plugs directly into ADK tools with zero friction — no paid APIs needed for a compelling demo
What's next
- Parallel execution — upgrade to
ParallelAgentfor 5x speed on paid API tier - Portfolio analysis — analyse multiple stocks and generate a comparative portfolio memo
- Real-time alerts — loop agent monitors a watchlist and triggers memos when significant news breaks
- Web interface — replace ADK dev UI with a custom React frontend for a polished user experience
- More data sources — SEC filings, earnings call transcripts, options flow data
Built With
- google-adk-(agent-development-kit)
- google-cloud-shell
- google-gemini-2.5-flash
- llmagent
- loopagent
- newsapi
- parallelagent
- python-3.12
- sequentialagent
- uv-package-manager
- yfinance
Log in or sign up for Devpost to join the conversation.