All projects
Personal project · 2025

Optionality

A lightweight tool designed to help amateur part-time traders to get timely information for low-frequency options trading.

PythonTradingWorkflow Automation
Source on GitHubLast updated November 2026

What it does

Selling option spreads on the S&P 500 index is slow, patient trading: a few positions across several expiries, each held for weeks. Most of the time nothing needs doing. Occasionally the market moves toward a short strike, and that's when you need to know, even at work or asleep.

Optionality watches those positions through the US session and messages your phone when something crosses a line you set. It never places orders: its broker clients have no way to send one, and a check fails the build if an order call appears.

What it looks like

SPX 6,480.25VIX 16.4210Y 4.21%
Needs you:dec-19-put is ringing · dec-12-condor is due to manage
  • jan-put-spread
    52 DTE · −P6150 +P6100
    calm
    +$310
    46%
    |Δ| ≥ 0.30 −0.184 ↑0.116330 pts · 0.90σ
  • jan-call-spread
    52 DTE · −C6800 +C6850
    at target
    +$108
    51%
    |Δ| ≥ 0.30 0.176 ↑0.124320 pts · 0.87σ
  • dec-19-put
    24 DTE · −P6380 +P6330
    ringing
    −$275
    -106%
    |Δ| ≥ 0.30 −0.334 ▲ past 0.034100 pts · 0.40σ
  • P6250 watch
    24 DTE · P6250
    calm
    2.15
    |value| ≥ 4.50 2.15 ↑2.35
  • dec-12-condor
    17 DTE · −P6280 +P6230 −C6700 +C6750
    manage now
    +$125
    30%
    close ≥ 8.40 2.95 ↑5.45200 pts · 0.95σ

Example data: invented positions, not real holdings and not advice.

Each row is one structure you hold or watch: what closing it would cost now, how much of the credit you've kept, how close it is to its short strike and how far the nearest alarm is.

How an alert works

|Δ| of the short putrule: |Δ| ≥ 0.30
through the session →
  1. 1Breached

    The first sweep past the line sends a message.

    Optionality
    ⚠️ dec-19-put: |Δ| crossed ≥ 0.30 — −0.312 ▲ past 0.012
  2. 2Reminder

    While it stays past the line, a reminder goes out on a set cadence.

    Optionality
    ⚠️ dec-19-put: |Δ| still ≥ 0.30 — −0.334 ▲ past 0.034 (reminder)
  3. 3Recovered

    When it comes back, one message says so.

    Optionality
    ✅ dec-19-put: |Δ| back below 0.30 — −0.268 ↑0.032

A cooldown between a rule’s messages stops a reading that hovers at the line from flooding the phone.

How it fits together

Data sources
  • moomoo OpenD
    default quote provider
  • IB Gateway
    quotes and the account page
  • Yahoo
    reference indicators only
Alert engine
One batched quote call per sweep, then every rule is checked, with cooldowns and reminders
Database
SQLite: rules, holdings, daily samples
Output channels
  • Telegram bot
    alerts out, commands in
  • Dashboard
    React, via the typed HTTP API
  • MCP server
    AI agents read the book; writes are opt-in and announced

Every sweep prices all watched contracts in one batched call, which keeps it inside the broker's limit of 60 requests every 30 seconds, shared with the dashboard and any agent.

Optionality is a personal tool, shared as code. Nothing on this page is financial advice.

🎵 My AI-generated music [AI in 2026] is playing. Toggle it on/off in the header.