DEV Community

Igor Ganapolsky
Igor Ganapolsky

Posted on

Engineering Log: LL-298: Invalid Option Strikes Causing C (+2 more)

Building an autonomous AI trading system means things break. Here's what we discovered, fixed, and learned today.

LL-298: Invalid Option Strikes Causing CALL Legs to Fail

The Problem: See full details in lesson ll_298_invalid_strikes_call_legs_fail_jan23

What We Did: - Added round_to_5() function to calculate_strikes() - All strikes now rounded to nearest $5 multiple - Commit: 8b3e411 (PR pending merge) 1. Always round SPY strikes to $5 increments 2. Verify ALL 4 legs fill before considering trade complete 3. Add validation that option symbols exist before submitting orders 4. Log when any leg fails to fill - LL-297: Incomplete iron condor crisis (PUT-only positions) - LL-281: CALL leg pricing fallback iron_condor, options, strikes, call_legs, validati

The Takeaway: Risk reduced and system resilience improved

The Problem: id: LL-298 title: $22.61 Loss from SPY Share Churning - Crisis Workflow Failure date: 2026-01-23

What We Did: severity: CRITICAL category: trading Lost $22.61 on January 23, 2026 from 49 SPY share trades instead of iron condor execution.

The Takeaway: 1. Crisis workflows traded SPY SHARES (not options) 2. Iron condor failed due to:

Code Changes

These commits shipped today (view on GitHub):

Commit Description
d44782c7 chore(ralph): CI iteration ✅
b9575a88 docs(ralph): Auto-publish discovery blog post
2321af0b docs(ralph): Auto-publish discovery blog post
7b2c75f3 docs(ralph): Auto-publish discovery blog post
700ed4fe docs(ralph): Auto-publish discovery blog post

Why We Share This

Every bug is a lesson. Every fix makes the system stronger. We're building in public because:

  1. Transparency builds trust - See exactly how an autonomous trading system evolves
  2. Failures teach more than successes - Our mistakes help others avoid the same pitfalls
  3. Documentation prevents regression - Writing it down means we won't repeat it

This is part of our journey building an AI-powered iron condor trading system targeting financial independence.

Resources:

Top comments (0)