What I Built (In Plain English)
Options trading is notoriously complex because contracts lose value every day (theta decay) and change prices based on volatility, not just stock movement.
I built an automated options engine called Tesserat. It scans multi-timeframe charts for key support and resistance levels, calculates the exact risk and probability curves, constructs multi-leg option spreads (like iron condors and vertical credit spreads), and executes them directly through Interactive Brokers without manual human clicking.

⚠️ Tech Ahead: The sections below explore the pure domain hexagonal architecture, volatility surface calculus, Greek exposure limits, and the IBKR Gateway socket bridge.
Pure Domain Architecture
Tesserat enforces strict separation between business logic and broker I/O:
[Market Data Feed] ──► [Multi-Timeframe S/R Engine]
│
▼
[Core Pure Domain Layer]
• Volatility Surface Modeling
• Greeks & Margin Calculus
• Multi-Leg Synthetic Builder
│
▼
[Broker Adapter Interface]
├── Backtest Replay Simulator
└── Live IBKR Gateway Socket
Strategy & Risk Invariants
- Deterministic Greek Limits:
- Portfolio Delta ($\Delta$) is continuously hedged within predefined bounds.
- Gamma ($\Gamma$) risk is capped to avoid sudden tail-risk blowouts.
- Theta ($\Theta$) decay is monetized systematically with dynamic take-profit targets.
- Automated Spread Construction:
- High implied volatility: Deploys credit vertical spreads and neutral iron condors to capture volatility crush.
- Low implied volatility: Deploys risk-defined debit diagonals and synthetic structures.
- Execution Safety:
- Pre-trade margin checks evaluate exchange-specific margin requirements before dispatching multi-leg combo orders.
- Automated kill-switches trigger on daily drawdown breaches.
Tooling & Runtime Specs
- Runtime: Python 3.12 managed with
uv(Rust-based deterministic dependency resolver). - Type Safety: 100% strict typing verified with
mypy --strict. - Testing: Deterministic backtesting suite with parameterized slippage models.
- Broker Interface: Asynchronous socket client communicating directly with Interactive Brokers (IBKR Gateway / TWS API).