I got tired of checking five apps before making a portfolio decision, so I built a system that does it for me
Two LangGraph pipelines handle different sides of portfolio management. The Analysis Pipeline runs 9 agents in a 3-tier architecture — scanning macro conditions, tracking congressional trades, analyzing fundamentals, and scouting new securities. The Allocation Builder runs 7 agents that take a target allocation model and recommend specific stocks and ETFs to construct a portfolio from scratch, with side-by-side scenario comparison. Haiku-powered context routers build targeted intelligence briefings between tiers in both pipelines. I can ask Siri "Portfolio Check" for a spoken answer, or pull up the full React dashboard. The backend runs on FastAPI and BigQuery on GCP, deployed to Railway.
| Ticker | Shares | Price | Value | P&L | Return |
|---|---|---|---|---|---|
| NVDA | 25 | $892.45 | $22,311 | +$4,621 | +26.1% |
| 📋 3 lots Short-term: +$1,840 Long-term: +$2,781 | |||||
| 2022-03-15 | 10 | $242.18 | $8,925 | +$6,500 | LT +268% |
| 2023-08-22 | 8 | $456.30 | $3,650 | +$3,490 | LT +95.6% |
| 2025-11-04 | 7 | $629.55 | $4,407 | +$1,840 | ST +41.8% |
| AAPL | 45 | $198.42 | $8,929 | +$1,240 | +16.1% |
| MSFT | 30 | $432.18 | $12,965 | +$2,184 | +20.3% |
| GOOGL | 20 | $178.56 | $3,571 | -$284 | -7.4% |
| JPM | 40 | $198.32 | $7,933 | +$586 | +8.0% |
| V | 35 | $278.91 | $9,762 | +$743 | +8.2% |
| UNH | 12 | $524.67 | $6,296 | -$228 | -3.5% |
| Member | Ticker | Type | Amount | Date |
|---|---|---|---|---|
| Rep. Johnson | MSFT | BUY | $50K–$100K | Mar 2026 |
| Sen. Chen | AAPL | SELL | $10K–$50K | Feb 2026 |
| Rep. Williams | NVDA | BUY | $100K–$250K | Mar 2026 |
| Sen. Davis | JPM | BUY | $50K–$100K | Feb 2026 |
| Rep. Patel | V | BUY | $25K–$50K | Mar 2026 |
| Sen. Martinez | GOOGL | SELL | $100K–$250K | Jan 2026 |
| Date | Type | Ticker | Shares | Price | Total |
|---|---|---|---|---|---|
| Mar 28 | BUY | AAPL | 15 | $192.50 | $2,887.50 |
| Mar 25 | DIV | JPM | 40 | $0.95 | $38.00 |
| Mar 22 | SELL | GOOGL | 5 | $179.20 | $896.00 |
| Mar 18 | CONTRIB | — | — | — | $5,000.00 |
| Mar 15 | BUY | NVDA | 8 | $891.30 | $7,130.40 |
| Mar 10 | DIV | V | 35 | $1.54 | $53.90 |
| Ticker | Unrealized Loss | Holding Period | Est. Tax Savings | Wash Sale |
|---|---|---|---|---|
| GOOGL | -$2,840 | Long-term | $568 | Clear |
| UNH | -$1,920 | Short-term | $461 | Clear |
| AMZN | -$1,250 | Short-term | $300 | ⚠️ 12-day window |
Every agent has a specific role, a backstory that shapes its reasoning, configurable skills with tunable parameters, and structured output formats. LangGraph orchestrates them in a tiered pipeline — Tier 1 scouts the landscape, an LLM-powered context router builds targeted briefings for each downstream consumer, Tier 2 does holdings-level analysis, Tier 3 goes deep on fundamentals and new securities, and the Synthesizer pulls it all together. Each agent reads upstream intelligence tailored to its needs, not the raw firehose.
Runs five tools across every holding: Sharpe ratio and volatility, concentration risk (HHI, sector limits), drift vs. my target allocations, performer ranking with percentiles, and pairwise correlation analysis — because three tech ETFs might look diversified until you see they move in lockstep.
Pulls congressional stock trades from STOCK Act disclosures, cross-references them against my holdings, and layers in Form 13F institutional ownership data. Which members are buying or selling, which institutions hold multiple positions in my portfolio — the kind of signals that institutional investors pay attention to.
Scans broad news for macro events — Fed moves, GDP, employment data, geopolitical shifts, trade policy — and runs each story through three sentiment scoring systems plus the CNN Fear & Greed Index. The interesting part: when the signals disagree (alarming headline, reassuring details), that's flagged as the story worth reading first.
Same multi-signal scoring as the Macro Scanner, but zoomed in on each individual holding. Per-ticker sentiment (60% VADER NLP, 40% keyword rules), Alpha Vantage AI relevance scores, and material event detection — earnings surprises, splits, regulatory actions. If something's happening with a stock I own, this agent catches it.
Combines market events (earnings dates, ex-dividends, Fed meetings) with personal financial events (big expenses, bonus timing, tax deadlines). The goal: answer the question "what's coming up in the next few weeks that I should be thinking about?" — because a great trade idea doesn't help if rent is due.
Watches unrealized gains and losses for tax-loss harvesting opportunities — cost basis math, short-term vs. long-term classification, 30-day wash sale tracking, and harvest candidates ranked by actual tax savings. Runs weekly, but cranks up the frequency in Q4 when every dollar of tax savings counts.
Looks at where the portfolio is underweight vs. targets and goes hunting for securities to fill the gap. Three tools: allocation gap detection, a server-side stock screener powered by Financial Modeling Prep, and a fundamentals deep-dive that pulls ratios and key metrics. If I'm light on international exposure, Stock Scout finds the ETFs worth considering — not just any ETF, but ones that fit my risk profile.
Reads financial statements the way a CFA reads game film. Pulls income statements, balance sheets, cash flows, and owner earnings for every holding, then computes derived metrics — gross/operating/net margins, revenue growth YoY, debt-to-assets, current ratio, and EV/revenue. Flags concentration risk from revenue segmentation and grades financial health using Piotroski and Altman Z-scores.
Takes everything the other eight agents found and connects the dots. Receives LIVE upstream context from the current pipeline run — not stale reports — so every recommendation reflects the latest data. Factors tax implications into timing, weighs calendar events against trade ideas, folds in fundamentals and Stock Scout recommendations, and produces prioritized readouts with confidence scores. Also generates podcast-style audio briefings so I can listen to my portfolio update while walking the dog.
Two LangGraph pipelines handle different questions. The Analysis Pipeline answers "how is my portfolio doing?" — nine agents in three waves analyze holdings, market conditions, and opportunities. The Allocation Builder answers "what should I buy?" — seven agents take a target model and produce a concrete buy list. Both use Haiku-powered context routers between tiers, like mart tables in a data warehouse — each downstream agent gets exactly the upstream intelligence relevant to its job.
Most agent designs dump raw data into the LLM and hope for the best — expensive, slow, and token-hungry. This pipeline runs nine agents in three waves, each wave executing in parallel. LLM-powered context routers sit between each wave, distilling upstream intelligence into targeted briefings — like building mart tables in a data warehouse, each downstream consumer gets exactly the context relevant to its job. The Synthesizer at the end reads all nine upstream reports live, producing unified recommendations backed by multi-agent reasoning without redundant processing.
A second LangGraph pipeline for the other side of portfolio management — greenfield construction. Feed it a target allocation model and investment amount, and seven agents go shopping: finding candidates, vetting fundamentals, comparing ETF efficiency, optimizing for tax, and producing a concrete buy list. Run the same model with different parameters and compare scenarios side-by-side.
The Analysis Pipeline answers "how is my portfolio doing?" — monthly check-ins, drift detection, rebalancing suggestions. The Allocation Builder answers "what should I buy?" — greenfield construction for new accounts or strategy changes. They share the same agent config infrastructure, skill registry, and DataStore abstraction, but run independently with their own state schemas. Feed the Builder different allocation models and compare the resulting buy lists side-by-side — like A/B testing investment strategy before committing capital.
The whole point is to give me everything I need to make a decision without logging into five different apps. It's read-only by design — it analyzes and recommends, but never touches the brokerage account.
Treemap visualization sized by allocation, colored by performance. One glance shows where the portfolio is thriving or bleeding.
Replay historical crises (2008, COVID, dot-com) against current holdings to estimate portfolio vulnerability under extreme conditions.
Define target allocations, get alerted when market movements push the portfolio off-target, with specific rebalancing suggestions.
Describe your investor profile in plain English — "growth-focused, tech-heavy, some international" — and Claude generates a 6-dimension allocation model across sector, risk, geography, market cap, asset class, and income style. Fine-tune with sliders after.
Scan unrealized losses against realized gains and suggest tax-aware trades. Especially valuable near year-end.
AI-generated per-holding narratives covering performance, catalysts, sentiment, and portfolio context — not just raw data tables.
Model adding or removing positions without executing trades. See how hypothetical changes affect allocation, risk, and goals.
Set financial targets with projected trajectories based on current growth rate. Visual progress bars show if you're ahead or behind schedule.
Two charting modes: EOD historical with 6-month backfill showing equity and cash value layers (1W/1M/3M/6M/All toggles), and intraday 5-minute candles showing real-time portfolio value fluctuations. Star schema storage (daily holdings fact + daily summary aggregate), FMP → Finnhub → yfinance fallback chain, plus a 30-day sparkline widget on the Dashboard.
Morning and evening audio briefings generated by ElevenLabs with two AI host voices. A mobile-first audio player built into the app with play/pause, skip controls, seekable progress bar, collapsible transcript, and scrollable briefing history. Authenticated streaming via blob URLs so audio works with JWT auth. Designed for listening on walks with the dog.
Clear, actionable trade recommendations — ticker, action, quantity, rationale — formatted for quick manual entry in Fidelity. You decide what to act on.
Combine market events with personal financial milestones — tuition payments, bonus timing, property taxes — so recommendations factor in your real cash flow, not just the market.
A two-tier screening system. Tier 1: FMP-powered screener with 13 filters — sector, industry (cascading dropdown), market cap range, price range, volume, beta, dividend, exchange, and country. Tier 2: automatic deep metric enrichment for top results — P/E, PEG, Price/Book, EV/EBITDA, ROE, ROA, margins, debt-to-equity, Piotroski F-Score, Altman Z-Score, and RSI — with client-side filtering across 14 fundamental and technical dimensions. Plus AI natural language search and the Stock Scout agent for allocation gap detection.
Interactive 3-tier pipeline visualization showing all 9 agents, Haiku context routers, and the Synthesizer. A Run Full Pipeline button executes all tiers with real-time status dots on every node. Skill toggles, parameter tuning, immutable versioning, A/B config comparison — all from the UI. Plus a Siri integration status card and context routing display.
An Apple Shortcut wired to the Portfolio Intelligence API. Say "Hey Siri, Portfolio Check" followed by any question — "how's tech doing?" or "any tax harvesting opportunities?" — and Siri speaks back a concise, conversational answer powered by Claude. The shortcut hits a Railway-hosted endpoint authenticated with an API key, and Claude crafts responses optimized for spoken delivery — no markdown, no jargon, under 150 words.
A separate LangGraph pipeline purpose-built for greenfield portfolio construction. Feed it a target allocation model and investment amount, and 7 agents go to work: a Gap Analyst maps what to fill, Stock Scout and an ETF Strategist hunt for candidates, Fundamentals vets them, a Tax Optimizer picks the right vehicle per slot, and a Portfolio Constructor produces a concrete buy list. Run multiple scenarios with different allocation models and compare results side-by-side — A/B testing investment strategy before committing capital.
All API keys and secrets stored in macOS Keychain, encrypted by the OS and protected by your login password or Touch ID. No plaintext .env files — even a compromised dependency can't read your credentials.
Pairwise correlation matrix across all holdings reveals hidden concentration risk. Three tech ETFs might look diversified by name but move in lockstep — this tool catches that.
Full trade history from Fidelity via SnapTrade — buys, sells, dividends, contributions, withdrawals, fees. Summary cards, date/type/ticker filters, sortable table with type-colored badges.
Global account switcher scopes all pages to a specific brokerage account. React Context architecture means every dashboard view becomes account-aware without per-page refactoring.
Four independent sentiment signals — keyword rules, VADER NLP, Alpha Vantage AI, CNN Fear & Greed — scored before the LLM sees any data. Signal disagreements are flagged as the most interesting insights.
Built in phases, each one adding a new layer. Click through to see how the architecture grows from a simple data fetch to a full system with eight AI agents, BigQuery on GCP, and a DataStore abstraction that lets me swap backends without touching a line of application code.
Coordinates multiple agents, manages task flow, passes context between them. Each agent gets tools that handle the math so Claude can focus on the reasoning.
The brain behind each agent. Claude Sonnet handles the analysis, classification, and narrative writing through the Anthropic Python SDK.
Async REST API handling all the agent triggers, data retrieval, and auth. JWT tokens, rate limiting, security headers. Deployed on Railway.
The frontend I can pull up on my phone or laptop. React Router, Tailwind, Recharts for portfolio charts, and TradingView's Lightweight Charts for candlesticks. Lives on Vercel.
Finnhub for live quotes, fundamentals, news, and congressional trades. SnapTrade for read-only Fidelity access. Financial Modeling Prep for the two-tier Stock Finder (screener + deep metric enrichment with Piotroski, Altman Z, RSI, SMA), historical EOD prices, and intraday 5-minute candles. FMP→Finnhub→yfinance fallback chain for complete ticker coverage. TTL caching across all sources.
Four independent reads on every article before Claude even sees it: VADER NLP (7,500-word lexicon), Alpha Vantage AI (per-ticker relevance), CNN Fear & Greed Index, and 54 custom keyword rules. When the signals disagree, that's where it gets interesting.
Production data lives in BigQuery on GCP. I built a DataStore abstraction layer (Strategy pattern with factory routing) so I can swap between BigQuery and SQLite with an environment variable — no code changes needed.
JWT auth, macOS Keychain for secrets (no plaintext .env files), Fernet encryption at rest, audit logging, rate limiting, and security headers. Because a portfolio tool without proper security isn't a tool — it's a liability.
Two-voice text-to-speech API that converts agent analysis into morning and evening podcast-style audio briefings. Two AI hosts discuss portfolio moves, market context, and trade recommendations in a conversational format. Played through a mobile-first in-app audio player with authenticated blob URL streaming, seekable progress, collapsible transcripts, and full briefing history.