Skip to content

· #article · #trading · #senex

Building an automated options trading system

The first post in a series on building an automated options trading platform, from idea to production.

I recently spent some time building an automated options trading platform, and I kept detailed notes throughout the process. This blog series shares what I learned: the architecture decisions, the implementation challenges, the hard-won lessons, and the system that emerged.

A Bit About Me

I have an MBA in Corporate Finance and have always enjoyed learning how derivatives work, but for a long time I never dove into trading them myself. That changed when I read a few books specifically on the topic of trading options and decided that theta-positive options strategies were the route for me. I’m terrible at picking stocks, so I liked the idea of a strategy that profits from time passing rather than requiring me to pick winners. As a software engineer by trade, I naturally wanted to automate the workflows. Even something as simple as selling short put spreads any time the market conditions were appropriate, or on dips of consistent market performers.

Over the years I created many proof of concepts and accumulated a lot of documentation from learning more and more about derivatives. I’ve built an extensive trade history with thousands of trades across various market conditions. This data has become invaluable, not just for tracking performance, but as a learning dataset for understanding what works and what doesn’t.

I’ve experimented with numerous strategies: covered calls, cash-secured puts, iron condors, vertical spreads, straddles, and more. Some worked beautifully in certain market regimes, others failed spectacularly. The real education came from understanding why. Why did a strategy that printed money in a low-volatility environment blow up when volatility spiked? Why did a directional bet that seemed obvious in hindsight look like a coin flip in the moment? This hands-on experience with both success and failure shaped the strategy selection logic that now drives the automated system.

What Made This Possible

For years I’ve had a simple idea: an automated trading application that executes options strategies without me watching the screen all day. The vision was clear, but two things always held me back as a retail trader: time, and access to a decent broker API. Market data is expensive, and good APIs are hard to come by.

Then two things changed. First, the community came together and reverse engineered TastyTrade’s API and created a Python SDK. Now that the TastyTrade API is fully public for customers, it has only improved. I finally had a broker with a real API that retail traders could actually use.

Second, along came agentic coding. This solved my biggest remaining problem of not having enough time. I now had a way to write the bulk of the boilerplate code with AI assistance, accelerating development.

With these two pieces in place, I was ready to build something real. And that’s exactly what I’ve been doing.


What This Series Will Cover

This series will walk through the complete process of building an automated options trading system, from initial vision to production deployment. Here are the topics I plan to cover:

  • Vision and Technology Choices: Why I built this, the tech stack (Python, Django, Celery, Redis), and how agentic coding accelerated development
  • Broker Integration: Connecting to TastyTrade’s API, authentication, session management, and real-time market data streaming
  • Options Strategy Engine: Implementing multiple strategies from simple vertical spreads to complex multi-leg positions, plus market analysis for intelligent strategy selection
  • Order Execution and Position Management: The pipeline from strategy signal to filled order, and tracking positions through their complete lifecycle
  • Risk Monitoring: Real-time Greeks calculations, portfolio health scoring, and guardrails to prevent excessive exposure
  • Automation: Scheduled daily trading with Celery Beat, position reconciliation, and keeping local state in sync with the broker
  • Quality and Security: Testing financial software, code quality tooling, encrypted credential storage, and security best practices
  • Operations: Development environment setup, production deployment with Ansible, and monitoring a live trading system
  • Advanced Topics: Backtesting frameworks and using machine learning to analyze trade history for strategy optimization

Who This Is For

Whether you’re a developer curious about financial systems, a trader wanting to understand automation, or someone considering building your own trading platform, I hope this series provides both practical guidance and hard-won lessons.


This project is still very much in progress. Some parts are running in production, others are still being built. Look for a new post from me every week as I work through this journey. I’ll be learning and building right alongside you.