An autonomous options desk where the model is the least-trusted component.
Alpaca paper trading • account PA3Y88DE6VC4 • simulated funds, real market data
MarketDNA classifies the tape and emits permissions — never orders. Its only job is deciding what is legal right now.
Roll Desk builds the structure, then manages it to exit: take profit, defend, roll, flatten.
Between them sits a Risk Officer — the only component permitted to commit capital, and the one that trusts nothing it is handed.
Every stage is journalled. No ALLOW means no broker command is ever constructed.
The model receives already-validated candidates and returns exactly one thing. It cannot create a strike, an expiry, a size or a limit. It never sees equity, buying power, or the risk rules — it doesn't need them, so it isn't given them.
Fences stripped, shape checked, pick_id verified against the supplied set. Any failure — bad JSON, unknown id, timeout — falls back to the first legal candidate and is journalled. 35 adversarial tests cover that path.
Width, credit, maximum loss, DTE, structure type and every leg relationship are recalculated from OCC symbols and live quotes. A ticket claiming max_loss: 1.0 does not get to buy itself past the cap.
Pure: no network, no filesystem, no clock read. Every check runs — failures accumulate rather than short-circuit, so a refusal reports every reason at once.
Nobody stopped it. The Risk Officer did — and wrote down why. That journal is the deliverable, not a by-product.
72 tools discovered at runtime and mapped to seven internal capabilities. No tool name is hardcoded; a missing capability halts at startup, not at trading time.
order_class=mleg, always limit, always day. Flags transcribed from the installed binary's captured output, never from memory.
A test walks the source tree and fails the build if anything imports a broker SDK or shells out elsewhere. The --legs wire format is undocumented in the captured help, so submission stayed locked until --dry-run proved the encoding against the real binary.
Capability discovery matched get_open_orders to place_stock_order — "order" is a substring of both. Reading the order book would have placed an order.
The high-water mark was seeded from current equity, making drawdown zero by definition. An account down 6% looked healthy.
Alpaca stamps quotes on its own clock. Any future timestamp read as an anomaly — which would have blocked trading for the entire competition.
Each is now a named constant with a regression test that explains why it exists. None was found by unit tests; all three needed a live broker.
A systemd service on a VPS: starts on boot, restarts on failure, reconciles from the broker every pass rather than trusting what it remembers.
Paper trading only. Simulated funds, real market data. Paper-trading results are hypothetical and do not represent actual trading. Not investment advice.
Arrow keys or click to advance