Bruin Academy

Tutorial module

Stock Analyst 101

Go from zero to a working stock analyst that pulls FMP, Yahoo Finance, and FRED into DuckDB - then lets an AI agent answer real market questions. The AI agent is the coder - every step is a plain-English prompt.

What you'll build

What

  • Pull quarterly fundamentals (FMP), daily prices (Yahoo Finance), and US macro series (FRED) into a local DuckDB database
  • Build staging + reports layers so the AI agent has a clean, joined surface to query
  • Ask cross-source questions like "how did high-FCF companies perform when the yield curve was inverted?"

How

  • Bruin CLI scaffolds the pipeline; ingestr connectors handle the data pulls
  • Bruin MCP gives Claude Code, Cursor, or Codex direct query access to your database
  • Pipeline-scoped AGENTS.md + bruin ai enhance teach the agent your domain - no SQL or Python by hand

Learn the junior-stock-analyst toolkit in one sitting: pull company fundamentals, market prices, and US macro data into a local database, then ask an AI agent questions a Bloomberg terminal would charge you for. Everything runs on your laptop. The AI agent does the typing - you prompt it in plain English and approve what it does.

The stack you'll build

  • FMP - quarterly fundamentals (revenue, FCF, margins, ratios)
  • Yahoo Finance - daily stock prices (OHLCV)
  • FRED - US macro: Fed funds rate, CPI, unemployment, yield-curve spread, real GDP
  • DuckDB - local database, no cloud account needed
  • Bruin CLI + MCP - your AI agent's hands and eyes into the data

What you'll be able to do by the end

  • Pull four quarters of fundamentals for any ticker and compare them to peers
  • Overlay stock price performance against the macro regime (e.g. "how did high-FCF companies perform when the yield curve was inverted?")
  • Ask natural-language questions and get SQL-backed answers - with sources the agent can cite

Who this is for Anyone curious about investing who doesn't code. If you can install an app and sign up for an API key, you have the prerequisites.

Before you start

  • An AI coding tool - Claude Code, Cursor, or Codex (the agent does the typing)
  • Bruin CLI - the agent installs this for you in Step 1
  • Free API keys for FMP and FRED (both take 1 minute to sign up)
  1. 1Set Up Your Workspace8 min
  2. 2Scaffold Your Project5 min
  3. 3Ingest FMP, Yahoo Finance, and FRED12 min
  4. 4Build Staging + Report Layers12 min
  5. 5Teach the AI Your Domain10 min
  6. 6Ask the Real Analyst Question8 min

Get help & contribute