Frog Wizard

Run an iron condor book with two slash commands

I sell iron condors on SPX out of a small repo, iron-condor-workflow, built on the split from put the math in code, the judgment in the spec: Python computes the numbers, Claude skills apply the judgment, two CSVs hold the state. The whole day-to-day is two slash commands and a close command.

Open: /iron-condor

The skill first pulls the market regime:

python -m ic.cli regime --json

That returns trend, realized vol at 21/63/126 days, ATM IV, the IV-vs-RV premium, and the 1-SD expected move. Claude maps those facts to parameters using rules written in the skill file. Premium sets how greedy the short strikes are: rich justifies ~0.16 delta, thin means 0.10 to 0.12, cheap means pass. Vol regime sets wing width and DTE. Trend sets the skew: in an uptrend the put short sits closer (~0.16 delta) and the call short farther (~0.10), giving more room on the side price is drifting toward. A downtrend mirrors it, neutral is symmetric.

It then generates candidates with those flags:

python -m ic.cli recommend --no-fetch --json --put-delta 0.16 --call-delta 0.10 --wing-width 50

and picks one by bid/ask spread (yfinance under-reports index open interest, so spread is the liquidity signal). The output is the four legs, credit, max loss, breakevens, cushion versus the expected move, a caveat if FOMC or CPI lands inside the window, and a ready-to-run add command.

There is no broker API. I fill the trade manually, then record it:

python -m ic.cli add --ticker SPX --expiration 2026-07-31 --contracts 1 \
  --put-long 6845 --put-short 6895 --call-short 7840 --call-long 7890 --credit 8.35

Manage: /analyze-positions

Once a day. Python refetches the chain, recomputes live deltas, unrealized P&L, and cost to close for every open position, and fires deterministic triggers: DELTA_BREACH when a short strike's |delta| reaches 0.30, STRIKE_TOUCHED when price reaches a short strike, GAMMA_RISK under 21 DTE, PROFIT_TARGET at half the credit captured. Claude turns the fired triggers into an action per position, roll the untested side, roll out the tested side, close, or hold, with the rationale and the exact command.

Close and track

python -m ic.cli close --id 1 --debit 3.00

positions.csv holds each position's current legs. transactions.csv is an append-only ledger of every cash event, credit-positive: open credit, rolls, fees, close debit. Realized P&L is the running sum of that column, so rolls and fees are never dropped from the total. python -m ic.cli ledger prints the history with running P&L.

The same rule holds everywhere: the model never invents a number. Every price, delta, and IV comes from the CLI's JSON. Claude only decides what the numbers mean.

#agents #ai #claude #finance #investing #options #python