Building an AI that analyzes stocks like Warren Buffett

Dev.to / 4/4/2026

💬 OpinionDeveloper Stack & InfrastructureIdeas & Deep AnalysisTools & Practical Usage

Key Points

  • Wallstreet-AI is an open-source, LLM-powered financial analysis agent that turns natural-language questions into structured investment reports using a reasoning pipeline rather than raw data alone.
  • The system supports persona-driven investment philosophies (e.g., Warren Buffett-style moat/intrinsic value reasoning vs. Ray Dalio macro-cycle focus vs. Charlie Munger risk-avoidance framing) to produce different interpretations from the same inputs.
  • Its agent workflow includes intent parsing, tool routing, multi-source data collection via APIs, news enrichment via RSS scraping, LLM synthesis, streaming output (SSE), and structured logging for reproducibility.
  • Users can query the system with examples like “What would Warren Buffett think about Apple in a high interest rate environment?” and it automatically detects tickers, gathers market data, and generates a structured response.
  • A live demo is available via HuggingFace Spaces and a Google Colab link, making it immediately testable for prototyping and experimentation.

Most financial tools give you data.

But investors don't make decisions using raw numbers alone — they interpret them through a framework.

Warren Buffett thinks about moat and intrinsic value.

Ray Dalio thinks about macro cycles.

Charlie Munger thinks about avoiding mistakes.

So I asked a simple question:

What if an AI could apply these investment philosophies automatically?

That idea became Wallstreet-AI, an open-source agentic financial analysis system that combines structured data pipelines with LLM reasoning.

GitHub:
https://github.com/davidkim205/wallstreet-ai

What is Wallstreet-AI?

Wallstreet-AI is an LLM-powered financial analysis assistant that converts natural language questions into structured investment reports.

Instead of manually gathering:

  • financial statements
  • technical indicators
  • earnings summaries
  • market news

you simply ask:

"What would Warren Buffett think about Apple in a high interest rate environment?"

The system builds a full reasoning pipeline and generates a structured report.

Key Idea: Persona-driven financial reasoning

Different investors interpret the same data differently.

Example:

Buffett focuses on:

  • business quality
  • durable moat
  • long-term cash flow

Dalio focuses on:

  • macro regime changes
  • interest rate cycles
  • portfolio diversification

Wallstreet-AI lets the same dataset produce multiple interpretations depending on the persona applied.

System Architecture

The project is designed as an agent workflow:

  1. Natural language intent parsing
  2. Tool routing based on analysis type
  3. Data collection via APIs
  4. News enrichment using RSS scraping
  5. LLM synthesis
  6. Streaming output via SSE
  7. Structured logging for reproducibility

Pipeline:

User Query

→ Intent Parser

→ Tool Router

→ Data Collection

→ LLM Generation

→ Structured Report

Example Question

"What would Warren Buffett think about Microsoft today?"

The pipeline automatically:

  • detects ticker
  • determines analysis type
  • gathers market data
  • generates structured reasoning
  • streams the output in real time

Live Demo

You can try it instantly:

HuggingFace Spaces:
https://huggingface.co/spaces/davidkim205/wallstreet-ai

Google Colab:
https://colab.research.google.com/drive/13rWqKpAgJMytsztSt_spsws4HPWQZPnc

Future ideas

Possible extensions:

  • portfolio optimization personas
  • backtesting integration
  • vector database memory
  • evaluation benchmarks for financial reasoning
  • multi-agent debate between investor personas

Feedback welcome

I would appreciate feedback on:

  • agent architecture design
  • persona prompting approaches
  • evaluation methodology for financial reasoning
  • additional financial datasets

GitHub:
https://github.com/davidkim205/wallstreet-ai

Contributions are welcome.