optionwright is an autonomous options-trading agent for Alpaca built on one rule: the LLM proposes, the code decides. Each cycle, deterministic code reads the SPY and QQQ option chains, filters for liquidity, and pre-builds two defined-risk credit spreads a bull put and a bear call with every number already computed. The LLM (Qwen 72B via Featherless, with a local-model fallback) sees this pre-digested context and returns only a direction: bullish, bearish, or abstain, with a confidence. It never does arithmetic and never sizes a trade. Code then picks the strikes, sizes the position, and runs it through seven ordered risk gates: a consecutive-loss breaker, an open-positions cap, a daily premium budget, a per-underlying cooldown, opening and macro blackouts, and a max-loss-per-position limit. The gates can only veto or shrink a trade, never enlarge it, so position size emerges from risk limits rather than from the model. Execution goes through the Alpaca CLI as a single multi-leg order. Because it only trades vertical credit spreads, the maximum loss of every position is fixed the moment it opens. The model is fail-closed: a timeout or malformed response collapses to abstain, never a fabricated trade. Every decision is persisted to Postgres and surfaced on a live dashboard, with Prometheus metrics and a Grafana view. Judges can run the whole stack with a single docker compose up. Paper trading only, on a dedicated account with a $100,000 start.
Category tags: