Stock Co-Pilot

An AI co-pilot, not an autopilot.

A trading workbench where the human decides and the model does the homework.

Stock Co-Pilot is an AI-native research tool built for active traders. Two client surfaces — a SwiftUI iOS app and a React PWA — sit on top of a single routing layer that turns natural-language questions into structured work, dispatches them to eight specialist services, and hands back validated, cache-aware answers. The model never touches the trade button.


01 — The problem

Most retail trading tools fall into two camps. On one side, there are brokerage apps that give you a big green button and a confetti animation. On the other, there are professional terminals that cost thousands a month and assume you already know what a Stochastic crossover is. Neither is built for the growing population of self-directed traders who are serious about learning but don’t have a Bloomberg terminal budget.

The AI wave made it worse before it made it better. Chatbots started offering stock tips with no attribution, no methodology, and no guardrails. A trader would ask a question and get a confident-sounding paragraph that they couldn’t verify, couldn’t trace back to data, and couldn’t act on safely.

I wanted to build the opposite: a tool where every answer is grounded in real data, every recommendation shows its reasoning, and the user stays in control of every decision. A co-pilot that does the analysis legwork, not an autopilot that pretends to know the future.


02 — The product

The web workbench is the primary surface — a React PWA with screening, charting, strategy bots, portfolio sync, and a persistent AI copilot sidebar. The iOS app focuses on daily briefings, watchlists, and push alerts for traders on the move.

What it does

  • Natural language stock screening — ask “show me oversold large-caps with rising volume” and get ranked results in seconds.
  • AI-powered daily briefings — a personalized audio market summary generated every evening from your watchlist.
  • Deep stock analysis — short-term sentiment, mid-term technicals, and long-term fundamentals scored and explained by AI.
  • Interactive charting — candlestick charts with Bollinger Bands, moving averages, RSI, MACD, and AI-generated support/resistance levels.
  • Strategy bots — define trading rules, backtest them on paper portfolios, and get alerted when signals fire.
  • Portfolio sync & attribution — connect your brokerage and see real-time P&L with AI-driven “why did my portfolio move?” breakdowns.
  • Curated discovery playlists — pre-built screens like “Bullish Reversals,” “High Sentiment,” and “Emerging Top 10” updated daily.
  • News sentiment pipeline — multi-source news aggregation with per-stock impact scoring and sentiment analysis.
  • Persistent AI copilot — a sidebar chat that knows what you’re looking at and can answer follow-up questions in context.
  • Push alerts — real-time notifications for price moves, strategy signals, and breaking news on your watchlist.
Stock Co-Pilot home dashboard
Home dashboard — portfolio overview, watchlist highlights, bot activity, and top news at a glance
Stock Co-Pilot stock details with sentiment analysis
Stock detail — AI-generated sentiment scores, key levels, and long-term prospects for any ticker
Stock Co-Pilot natural language search results
Natural language search — type a question, get ranked results with sentiment and technical scores
Stock Co-Pilot synced portfolio
Synced portfolio — real-time P&L with AI-powered attribution explaining why your portfolio moved
Stock Co-Pilot strategy bots
Strategy bots — automated screens with paper-traded performance tracking across 15+ strategies

03 — Architecture

The system is four layers deep: client surfaces ask questions, the AI router classifies intent and picks the right specialist, eight specialist services do the actual work, and the data layer keeps the system honest with live market feeds and durable storage.

Figure 1 — The full system: surfaces ask, the brain routes, specialists answer, the world keeps it honest.

AI Router

A single GPT-4o entry point classifies intent, hydrates context (stock, portfolio, page), and dispatches to the right specialist. Every response is schema-validated before leaving the server.

8 Specialists

From single-stock reads and chart pattern recognition to paper trading bots and a multi-source news pipeline. Each specialist owns its domain and its cache layer.

Five-Tier Cache

In-tab memory, client LRU, per-user storage, function-level 1–24h cache, and overnight batch jobs. Most analysis requests are pre-paid by the time the user taps “Analyse.”

Clean Perimeter

Every external dependency — TwelveData, SnapTrade, Stripe, OpenAI — sits behind a Cloud Function. No client ever holds an API key.

How a question becomes an answer

The ask
The client packages the message with what’s already on screen and posts it to one callable.
getAIResponse

The triage
A small classifier picks the right specialist. Auth and rate limits are checked at the door.
queryRouter

The search
The specialist parses criteria, resolves a universe, and scans pre-computed indicators.
parseCriteria

The ranking
Matches are scored against intent, enriched with prices and patterns, and sorted.
runWorkshopRoutine

The handoff
A schema-validated payload comes back. The chart panel hydrates, already cached.
{ results, feedback }


04 — Product decisions I’d defend

Natural language is the API.

A trader can ask anything in plain English and it flows through one router. Intent classification happens once and gets reused across every surface — chat, screener, briefing, bots.

The model never touches the user.

Every call to OpenAI happens server-side, behind auth and a rate limiter. Clients hold no keys. Schemas are validated on the way out, so a hallucinated shape never crosses the wire.

Cache is a first-class citizen.

Five tiers of caching sit between the user and the cost of fresh inference. By the time you tap “analyse,” there’s a good chance someone already paid for the answer.


05 — What’s next

The next iteration moves the workshop from screen-and-pick to screen-then-improvise — the same router, but with mid-run branching, so the co-pilot can change its mind alongside you when the tape turns.


Scroll to Top