AI Agent · Fintechlablab.ai × Alpaca hackathon
Guardrail
An autonomous options-trading agent that structurally cannot reach the broker except through a deterministic risk layer. An LLM produces trading opinions (bullish, bearish, or skip) while a rules engine holds veto power over every order, making risk management structural instead of a matter of trusting the prompt.
Highlights
- Separated the agent (opinions only) from a deterministic engine that evaluates six configurable risk gates with no network calls or hallucination exposure.
- Enforced drawdown halts, symbol allowlists, expiry windows, contract and position limits, and a market-close cutoff before any order reaches the broker.
- Selected contracts deterministically (always ATM, 7+ days to expiry, one contract, limit orders only) to avoid thin options books.
- Logged every decision and order to SQLite for a full audit trail, surfaced through a live dashboard.
- Backed the engine with 22 unit tests, treating the control layer (not trading alpha) as the core innovation.
Stack
PythonOpenAIAlpaca APIFastAPISQLiteNetlify