AI Infrastructure

QuantForge

Developer-first financial terminal with AI analytics and CLI tools.

QuantForge brings programmatic financial data access to developers via a CLI terminal client and FastAPI backend, instrumented with Shadow Watch telemetry.

Overview

QuantForge is a terminal-native financial tool that enables developers to query data, write analysis scripts, and monitor portfolio changes programmatically.

Problem

  • Financial terminals are expensive or lack clean CLI integration for automated scripting.
  • It is difficult to track user behavioral queries silently for personalization or security.

Motivation

Built initially to support my own research data scraping, it evolved into the primary live playground for the Shadow Watch telemetry library.

Solution

Provide a versioned REST API backend with a Click CLI shell client, instrumenting every action with async behavior logging.

Implementation

FastAPI, PostgreSQL with Alembic migrations, click for CLI commands, and integrated Shadow Watch python package.

Engineering Decisions

Making the system CLI-first and structured (JSON) by default so developers can easily pipe outputs.

Integrating async telemetry natively into the routing path rather than using a post-action middleware.

Challenges & Lessons

Detecting and formatting output based on varying terminal window sizes across different shells.

Terminal Architecture

Prototype system

Click CLI Client
  ↓ (HTTP Requests / CLI Commands)
FastAPI Backend
  ↓ (SQLAlchemy Async / shadowwatch)
PostgreSQL Database
  ↓
External Data Sources (Yahoo, AlphaVantage)

CLI outputs default to clean JSON.

Actions are tracked asynchronously.

Components

Functional building blocks

The flagship documentation uses the same component taxonomy across every system.

Click CLI

Commands for scraping, querying, and analyzing.

FastAPI Backend

Exposes REST endpoints.

Shadow Watch

Passive telemetry layer.

Features

Core capabilities

These are product features in the engineering sense, not marketing copy.

CLI data interface

PostgreSQL + Alembic migrations

Shadow Watch instrumentation

CLI Command

Fetch price history.

python -m quantforge.cli get-price AAPL

Example output

A governed action should return enough evidence to review without reconstructing the entire runtime path.

Fetching AAPL...
Price: $178.50
Log: Event tracked by Shadow Watch

Documentation

  • CLI command guide
  • API layout

Papers & Consultation Briefs

    Benchmarks

    • CLI load time: <200ms
    • Data aggregation latency: <120ms

    Roadmap

    The roadmap separates what is already shipped from the next layer of work so the public record stays explicit.

    Shipped

    Core CLI client · Yahoo Finance integration · Shadow Watch log sink

    Next

    WebSocket live streaming · Backtesting engine · Interactive prompt shell

    Related Systems

    Connected systems

    Systems in the ecosystem that depend on or complement this flagship project.