Back to Projects

ZIG

CreatorPaper TradingApr 2026 – Present

Autonomous AI options-trading platform, paper-traded on live market data.

5
Strategies
18
Agent Tools
26
DB Tables
1,600+
Automated Tests

The Problem

Running an options-income strategy like the Wheel by hand means watching dozens of positions, expiries and risk limits every day. I wanted an AI system that proposes and manages trades on its own, without ever being able to take risks it shouldn't.

How It Works

A Python FastAPI engine runs on a schedule and hands market context to an LLM agent. The agent calls typed tools (quotes, option chains, positions, risk checks, order proposals) through one tool-calling loop that works with Gemini, Claude and OpenAI. If one provider returns a 5xx or rate-limit error, it fails over to the next.

Each strategy (Wheel, volatility-targeted core, trend-following, RSI and Williams %R mean-reversion) has its own allowlist of tools. Every order passes pre-trade rules: sector and per-name caps, liquidity and fundamentals filters, spread checks and a trend gate. Larger live orders need human approval over Telegram.

Execution is broker-agnostic, over Interactive Brokers (via IB Gateway) and Alpaca. A single reconciler, fed by broker events, is the only code allowed to write order and trade state. Stale orders are cancelled automatically, and a sync check compares the database against the broker.

In November 2026 the platform was redesigned into a headless 'arena': several strategy lanes, each with its own paper ledger, scored against QQQ total return and controlled through a Telegram Mini App.

Key Challenges

Letting an LLM trade without letting it take unbounded risk

Layered controls: per-strategy tool allowlists, deterministic pre-trade rules the model can't override, per-strategy kill switches, and human approval for large live orders.

Order state drifting between the database and the broker

One event-driven reconciler is the only writer of order and trade state. Everything else reads, and a scheduled sync check flags any mismatch.

Knowing whether a strategy is any good before deploying it

vectorbt backtests with walk-forward analysis over daily data back to 1999, and live paper results benchmarked against simply holding QQQ.

Reducing attack surface

The web dashboard was retired in favour of a Telegram Mini App that verifies Telegram's signed initData on every request; in production every service listens only on localhost behind a Cloudflare tunnel.

Tech Stack

Engine

Python 3.12 + FastAPI + async SQLAlchemyAsync engine with APScheduler jobs and typed models
PostgreSQL 16 + Alembic26 tables with versioned migrations
vectorbt + pandasBacktesting and walk-forward analysis

AI & Brokers

Gemini / Claude / OpenAIMulti-provider tool-calling with automatic failover
Interactive Brokers + AlpacaBroker-agnostic execution and market data
MCP server (read-only)Lets AI clients analyse trading activity with no path to execution

Infrastructure

Docker Compose + Cloudflare tunnelSelf-hosted on Hetzner; services bound to localhost
Prometheus / Grafana / Loki + LangfuseMetrics, logs and LLM call tracing
GitHub ActionsLint, test against Postgres, then deploy