Alpaca Trading System
Algorithmic dip and options trading — full-stack, with a custom risk model
A full-stack algorithmic trading platform built across two strategy types — dip-buying mean-reversion and automated options execution. Not a library wrapper: a complete system with its own risk model, order lifecycle, backtester, and operator dashboard. The stack spans a Rust backend (Axum, Tokio, sqlx), a React 19 frontend, TimescaleDB for time-series position data, Redis for low-latency state, a Black-Scholes backtester, a Telegram chatbot as the primary operator interface, and a locally-hosted LLM advisory layer — each layer built for its role rather than borrowed from a SaaS.
The core challenge wasn't execution — it was building enough trust in the system to put real money behind it, and then progressively extending that trust as each layer proved itself. That meant per-symbol exposure caps, per-strategy quantity limits, a daily-loss circuit breaker requiring explicit operator re-arm, and a typed confirmation gate on every live-mode submission endpoint. The system has run with live capital and has been deliberately designed to reduce the human input required over time as confidence in each component compounds.
Telegram is where the system lives day-to-day: status queries, position summaries, manual overrides, and alert acknowledgment all flow through the bot, keeping the feedback loop tight without needing the dashboard open. The LLM advisory layer sits alongside it — a locally-hosted Qwen2.5-7B model with per-strategy LoRA adapters switched at inference time, producing schema-constrained output that's valid on the first call. It surfaces context and flags conditions worth reviewing.
Private repository. Happy to discuss architecture and approach.
