-
-
Multi-agent Architecture Design
-
Login Page
-
Home Page
-
Add Tracking Investor
-
Berkshire Hathaway Holdings
-
Holding Changes - Berkshire Hathaway
-
Reasoning Agent 1 - Fundamental Analysis
-
Reasoning Agent 2 - News & Sentiment
-
Reasoning Agent 3 - Market Context
-
Reasoning Agent 4 - Technical Analysis
-
Reasoning Agent 5 - Investment debate & Verdict
-
Reasoning Agent 6 - Risk Assessment
WhyTheyBuy
Gemini 3 Global Hackathon 2026
Inspiration
WhyTheyBuy was inspired by a simple gap in modern markets: visibility is high, but understanding is low.
As investing becomes increasingly light-asset and information-driven, more retail investors can observe public disclosures, portfolio changes, and market moves. But the reasoning behind those decisions remains hard to interpret. While professional investors often rely on dedicated research workflows and expensive tooling, most individuals are left with fragmented information and little context.
This gap between visibility and comprehension motivates our project. WhyTheyBuy aims to democratize investment understanding: not by enabling copy-trading, but by turning portfolio changes into an educational, evidence-based reasoning experience that helps users build critical thinking rather than blindly following "smart money".
What it does
WhyTheyBuy is a reasoning-first application that explains why portfolio positions may have changed, rather than predicting what to buy or sell.
It leverages Google Gemini 3 for advanced reasoning, multimodal understanding, and low-latency inference within a constrained explanation workflow. Observed portfolio changes are transformed into a structured reasoning process grounded entirely in public information and explicit explanation rules.
Key Capabilities
Provide reasoning, not investment advice: Focuses on post-hoc explanations instead of predictions, signals, or investment advice.
Multimodal evidence selection & distillation: Filters and constrains reasoning to relevant public evidence to reduce noise and hallucinations. When available, incorporates multiple data modalities, such as earnings-call snippets, slides, charts, and documents, using Gemini 3’s vision capabilities to enrich contextual explanations.
Research-informed design: Adopts a role-based, multi-agent reasoning structure inspired by recent top-tier academic work (MIT & UCLA, "TradingAgents: Multi-Agents LLM Financial Trading Framework", arXiv:2412.20138), adapted for explanation and education rather than trading execution.
WhyTheyBuy is a cross-platform app (Web + iOS + Android) that:
Tracks Holdings Changes
Monitors and summarizes portfolio changes of famous investors like Warren Buffett, Cathie Wood (ARK), Renaissance Technologies, and more. Changes are categorized as:
- NEW: New positions initiated
- ADDED: Increased existing positions
- REDUCED: Decreased existing positions
- SOLD OUT: Completely exited positions
Multi-Agent Reasoning Design (6-PILLAR Framework)
Rather than producing a flat summary, WhyTheyBuy generates explanations through a structured, sequential reasoning process.
Each explanation is constructed step by step, where later perspectives must explicitly reference and build upon earlier findings. This enforces internal consistency and significantly reduces hallucination.
The reasoning follows a constrained, role-based workflow:
Fundamental Foundation: Starts from financial reality: valuation metrics, earnings, margins, balance-sheet strength, and historical comparisons based on public filings and earnings reports.
News & Sentiment Context: Incorporates recent news coverage and market sentiment, explicitly grounding interpretations in cited sources and identified themes.
Market Context: Analyzes sector performance, peer behavior, and macro conditions, referencing both fundamentals and news sentiment rather than treating them in isolation.
Technical Observation (Non-Predictive): Examines price action, volume, and technical indicators strictly as observational signals, explicitly linked back to fundamentals and news context, never as forward-looking advice.
Bull vs. Bear Synthesis: Presents balanced arguments on both sides, where each point must trace back to specific findings from prior steps, avoiding one-sided narratives.
Risk Assessment (Descriptive, Not Prescriptive): Concludes with a synthesized risk view that aggregates concerns across all perspectives, clearly stating uncertainty and avoiding any recommendation or action guidance.
This layered structure allows users to see how explanations are formed, not just the final conclusion, turning portfolio changes into an interpretable learning experience rather than a trading signal.
The goal is not to guide actions, but to make complex investment decisions interpretable, shifting users from reaction to understanding.
How we built it
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Flutter 3.16+ (cross-platform for Web, iOS, Android) |
| Backend | FastAPI (Python 3.11+) |
| Database | PostgreSQL 15+ • Redis 7+ (Cache/Queue) • Celery (Tasks) |
| AI Core | Gemini 3 API (primary) • GCP • Google SDK |
At the AI layer, we implement a sequential multi-agent prompting workflow (six role-based perspectives) to enforce structure, cross-reference consistency, and safety-aware reasoning constraints.
Gemini 3 Capabilities Used:
- Structured text generation for constraint-aware, uncertainty-bounded summaries
- Multimodal vision for chart/document analysis
- Multi-image comparison for portfolio before/after analysis
- Enhanced reasoning for holdings change analysis

Below we summarize key engineering and research-oriented challenges, framed as constraints, trade-offs, and reliability considerations.
Challenges we ran into
Guardrail-bounded AI Design
Financial regulations require extreme care. We had to engineer prompts that strictly adhere to compliance rules while maintaining utility:
- Forbidden Phrase Detection: Automatically rejecting advisory phrases and ensuring mandatory disclaimers.
- Hypothetical Framing: Enforcing language like "may" or "could" instead of definitive predictions.
- Confidence Capping: Never claiming "high" confidence to avoid misleading users.
- Mandatory Unknown Declarations: Explicitly stating when information is unavailable rather than hallucinating.
Fine-Tuning Reasoning Quality
Gemini 3's reasoning capability is solid, but achieving consistent, high-quality institutional analysis required significant effort:
- Hallucination Reduction: Using multi-agent cross-checks to validate findings against cited evidence.
- Structured Output: Constraining responses to the 6-PILLAR Framework for consistency.
- Traceability: Ensuring every claim is backed by clear, referenceable evidence from filings or charts.
- Balancing Detail: Tuning the model to provide depth without overwhelming the user.
Multi-Source Data Normalization
Integrating diverse financial data sources into a unified schema was a major engineering hurdle:
- Format Variety: Handling everything from daily CSVs (ARK) to quarterly XML filings (SEC 13F).
- Frequency Mismatch: Reconciling real-time logic with 45-day reporting delays.
- Entity Resolution: Solving CUSIP-to-ticker mapping challenges across different reporting standards.
GCP Deployment Complexity
Deploying a secure, scalable fintech app involved navigating complex cloud infrastructure:
- Secure Connections: Managing Cloud SQL Connector vs direct connection modes.
- Secret Management: Deeply integrating Secret Manager with local env var fallbacks.
- Network Isolation: Configuring VPC Connectors for private database access.
- Database Migrations: Handling dual database URLs (async for app, sync for Alembic).
Accomplishments that we're proud of
We built WhyTheyBuy intentionally within the Google ecosystem, using Gemini 3 as the core reasoning engine and grounding explanations in public, verifiable sources. Our goal is to reproduce the structure of top-tier institutional research workflows, turning portfolio-change observations into a transparent, evidence-linked reasoning process that helps users learn faster and with more context.
Beyond technical execution, we focused on product value: reducing the time-to-understanding for disclosed holdings changes while keeping explanations compliant, balanced, and explicit about uncertainty.
Key Achievements
Institutional-Grade Analysis, Democratized: By leveraging Gemini 3's advanced reasoning capabilities, we replicate the analytical workflows used by top-tier investment agencies and research firms. What traditionally required teams of analysts, expensive data terminals, and days of research can now be generated in seconds. This dramatically reduces analysis time and complexity while providing valuable, evidence-based insights that serve as a credible reference for individual investors and smaller institutions alike.
Full Gemini 3 Multimodal Integration: We leverage text generation, vision analysis, multi-image comparison, AND enhanced reasoning, demonstrating the full breadth of Gemini 3's capabilities in a production fintech application.
6-Pillar Institutional Reasoning Framework: Our AI analyzes investments like a professional analyst, covering fundamentals, news & sentiment, market context, technical observation, bull vs. bear synthesis, and risk assessment, mirroring the structured approach used by institutional research teams.
Generic Investor Framework: Our system supports ANY investor type (ETFs, hedge funds, family offices, pension funds, individuals) through a pluggable adapter architecture, making it scalable across diverse disclosure sources.
Cross-Platform Excellence: One Flutter codebase powers Web, iOS, and Android with a consistent, premium experience, ensuring accessibility across all devices.
What we learned
Professional reasoning is more structured than we assumed: Through this project, we learned that institutional-grade investment reasoning is not driven by expensive systems or opaque intuition alone, but by repeatable analytical steps. When these steps are made explicit and sequential, large language models can approximate parts of professional reasoning in a reproducible and inspectable way, without relying on private or inside information.
Constraint-bounded innovation: Constraints around financial advice forced us to build a more transparent, evidence-based AI system than we originally planned.
Gemini 3's vision capabilities are game-changing: Being able to analyze SEC filing screenshots and financial charts opens entirely new use cases in fintech.
Transparency builds trust: Users appreciate knowing why data might be limited rather than receiving overconfident predictions.
Multi-modal AI requires careful orchestration: Combining text, vision, and reasoning capabilities in a single user flow requires thoughtful architecture.
The 6-pillar framework is universally applicable: Breaking down investment analysis into structured dimensions makes AI outputs more understandable and verifiable.
Together, these lessons reinforced our original motivation: narrowing the gap between visibility and understanding requires not more information, but better-structured reasoning.
What's next for WhyTheyBuy
Vision
Our vision is to explore whether institutional-grade investment reasoning, traditionally associated with large teams, expensive infrastructure, and opaque expertise, can be decomposed into strict, sequential analytical workflows and approximated through multi-agent AI reasoning.
If successful, this suggests that professional investment reasoning is not inherently exclusive or mysterious, but structured, reproducible, and potentially scalable, without relying on private or inside information.
Near-Term (Months 1-3)
- Expanded investor coverage (100+ institutions)
- Better multi-language support
Medium-Term (Months 4-6)
- Custom alerts (position size thresholds)
- Social features (share reports, comments)
Long-Term Vision
- Community-driven research and discussions
- International market expansion (EU, Asia)
WhyTheyBuy: Transparently understand investor behavior, don't blindly copy trades.
Built With
- and-pulling-data-from-sec-edgar
- anthropic-claude
- ark-invest
- celery
- cloud-sql
- dart
- docker
- fastapi
- flutter
- google-cloud-run
- google-gemini
- integrating-google-gemini/openai/claude-for-ai-powered-investment-analysis
- openai
- postgresql
- pydantic
- python
- redis
- sec-edgar
- secret-manager
- sendgrid
- sqlalchemy
- stripe
- using-postgresql-(cloud-sql)-and-redis-for-data-storage
- yahoo-finance
Log in or sign up for Devpost to join the conversation.