Quantitative finance · 2025

Stock Analyzer

The first-generation terminal — and the proof the product was real.

The terminal that established the pattern. A modular Python backend covering data, quant, backtesting, portfolio and execution, driven by a React interface packaged as a desktop application, with sentiment and reasoning models running locally so that position-level context never leaves the machine.

Status
Shipped
Domain
Trading systems · Local AI
Role
Full stack
Year
2025

Stack

  • Python
  • React
  • Vite
  • Electron
  • Ollama
  • FinBERT
  • Supabase
  • WebSockets

A desktop stock-analysis and algorithmic-trading terminal: Python backend, React front end wrapped for desktop, local language models for private analysis, and a broker integration for execution.

01

Local models for private context

Sentiment classification and general reasoning run against locally hosted models rather than a hosted API.

The reason is not cost — it is that a prompt containing a live portfolio is a document you do not want to hand to a third party. Where a frontier model genuinely helps, the interface assembles the context, places it on the clipboard and opens an existing browser session, so the capability is available without the application ever holding a key.

02

A backend split by concern

Data acquisition, quantitative analytics, strategy algorithms, backtesting, portfolio state and the API surface are separate modules with separate dependency sets — the machine-learning requirements install independently, so a contributor working on the API never compiles a deep-learning stack to run the tests.

03

What it proved, and what it did not

It proved the product: the pane layout, the local-AI posture, the broker loop and the research workflow all held up in daily use.

It also proved the ceiling. A web runtime wrapped for desktop cannot carry a live chart surface, an embedded terminal and a 3D view simultaneously without the frame budget collapsing — which is the finding that justified a full native rewrite rather than another round of optimisation. Publishing that plainly is more useful than presenting the successor as a natural evolution.

04

Secrets are an architectural concern

Broker credentials and service keys are synchronised out of the working tree into a vault rather than living in files beside the code, and the repository carries an explicit audit step before anything is committed.

Treating credential handling as part of the architecture — rather than as a gitignore entry and good intentions — is what makes a single-operator trading system safe to keep in version control at all.

Pipeline

Terminal loop

Stage Can reject

  1. 01

    Data

    Quotes + fundamentals

  2. 02

    Quant

    Indicators

  3. 03

    Local AI

    Sentiment

    Portfolio never leaves the machine

  4. 04

    Backtest

    Historical result

  5. 05

    Portfolio

    Positions

  6. 06

    Broker

    Execution

Skills exercised

What the build
actually demanded.

Against the corpus · 15 systems

  • Stack breadth 8
  • Design decisions 4
  • Pipeline stages 6
  • Decision gates 0

This system Corpus median

Applied AI

  • Local LLM serving for private financial context
  • Domain-specific sentiment classification
  • Clipboard-bridged frontier-model workflows without API keys
  • Retrieval over a personal research corpus

Platform

  • Modular Python backend with split dependency sets
  • WebSocket streaming to a React front end
  • Desktop packaging and distribution
  • Hosted Postgres with row-level scoping

Trading

  • Broker integration and order lifecycle
  • Portfolio state reconciliation
  • Backtesting over historical bars
  • Technical and quantitative indicator libraries

What it establishes

  • Local-first AI

    Portfolio context never leaves the machine

  • Modular backend

    Split dependency sets per concern

  • Live + historical

    Streaming quotes alongside an event backtester

  • Ceiling found and published

    The frame-budget failure that justified the rewrite