Skip to main content
Premade resolvers for option structures. Each function returns a NamedTuple with one attribute per leg.

StructureDegeneracyError

Bases: ValueError Two or more legs of a structure resolved to the same contract. Delta targets snap to the listed strike ladder, so two deltas that differ on paper can land on one strike: a grid carrying 69.0 for everything from 0.45 to 0.50 delta collapses a butterfly onto three identical contracts. Every width derived from that gap is then 0, and the position is worth nothing while still paying entry and exit fees on every leg. Nothing downstream can detect it, so the resolvers refuse to build it.

Option

Bases: NamedTuple A single option leg, returned by option_by_delta.

Option.option

instance-attribute
Resolved via delta.

Spread

Bases: NamedTuple Two legs of one instrument type at different strikes on one expiry. Returned by spread_by_delta.

Spread.long_option

instance-attribute
Resolved via long_delta.

Spread.short_option

instance-attribute
Resolved via short_delta.

Straddle

Bases: NamedTuple A call and a put on one expiry, returned by straddle_by_delta.

Straddle.call

instance-attribute
ATM call. Resolved via delta.

Straddle.put

instance-attribute
ATM put. Same strike as call.

Strangle

Bases: NamedTuple An out-of-the-money put and call at different strikes, returned by strangle_by_delta.

Strangle.put

instance-attribute
Resolved via put_delta.

Strangle.call

instance-attribute
Resolved via call_delta.

Butterfly

Bases: NamedTuple Three legs of one instrument type: a body and two wings, on one expiry. Returned by butterfly_by_delta and broken_wing_butterfly_by_delta.

Butterfly.lower_wing

instance-attribute
Resolved via wing_delta (or lower_wing_delta).

Butterfly.body

instance-attribute
Resolved via body_delta.

Butterfly.upper_wing

instance-attribute
Equidistant from body (or resolved via upper_wing_delta).

Ladder

Bases: NamedTuple Three legs of one instrument type on one expiry. Returned by ladder_by_delta and broken_ladder_by_delta.

Ladder.near

instance-attribute
Resolved via near_delta.

Ladder.mid

instance-attribute
Resolved via mid_delta.

Ladder.far

instance-attribute
Equidistant from mid (or resolved via far_delta).

JadeLizard

Bases: NamedTuple A put plus a call spread on one expiry, returned by jade_lizard_by_delta.

JadeLizard.put

instance-attribute
Resolved via put_delta.

JadeLizard.short_call

instance-attribute
Resolved via short_call_delta.

JadeLizard.long_call

instance-attribute
Resolved via long_call_delta.

Condor

Bases: NamedTuple Four legs of one instrument type on one expiry, in ascending strike order for calls and puts. Returned by condor_by_delta, broken_condor_by_delta, albatross_by_delta and pterodactyl_by_delta. Which legs are delta-resolved and which are placed by arithmetic differs per producer and per instrument type: see the producing function’s own Returns.

Condor.lower_wing

instance-attribute
Resolved via outer_delta (or delta_1).

Condor.lower_body

instance-attribute
Resolved via inner_delta (or delta_2). Equidistant anchor for upper side.

Condor.upper_body

instance-attribute
Equidistant from lower_body (or resolved via delta_3).

Condor.upper_wing

instance-attribute
Equidistant from upper_body (or resolved via delta_4).

IronCondor

Bases: NamedTuple A put spread below the money and a call spread above it, on one expiry. Returned by iron_condor_by_delta, broken_iron_condor_by_delta, iron_pterodactyl_by_delta and iron_albatross_by_delta.

IronCondor.long_put

instance-attribute
Equidistant below short_put (or resolved via long_put_delta).

IronCondor.short_put

instance-attribute
Resolved via short_put_delta.

IronCondor.short_call

instance-attribute
Resolved via short_call_delta.

IronCondor.long_call

instance-attribute
Equidistant above short_call (or resolved via long_call_delta).

IronButterfly

Bases: NamedTuple A put spread and a call spread on one expiry, sharing one ATM body strike. Returned by iron_butterfly_by_delta and broken_iron_butterfly_by_delta. Both resolve the body strike on the call surface and give the short put that same strike.

IronButterfly.long_put

instance-attribute
Resolved via wing_delta (or long_put_delta).

IronButterfly.short_put

instance-attribute
ATM body. Resolved via body_delta. Same strike as short_call.

IronButterfly.short_call

instance-attribute
ATM body. Resolved via body_delta. Same strike as short_put.

IronButterfly.long_call

instance-attribute
Equidistant above body (or resolved via long_call_delta).

CalendarSpread

Bases: NamedTuple Two legs of one instrument type on a near and a far expiry. Returned by calendar_spread_by_delta.

CalendarSpread.near_option

instance-attribute
Near expiry. Strike resolved via delta.

CalendarSpread.far_option

instance-attribute
Far expiry. The near strike, snapped to the closest one the far expiry lists.

DiagonalSpread

Bases: NamedTuple Two legs of one instrument type on a near and a far expiry, each strike resolved by its own delta. Returned by diagonal_spread_by_delta.

DiagonalSpread.near_option

instance-attribute
Near expiry. Strike resolved via delta.

DiagonalSpread.far_option

instance-attribute
Far expiry. Strike resolved via far_delta on that expiry.

Structure

Bases: StrEnum Name of a premade structure, accepted by get_structure_resolver and resolve_structure.

option_by_delta

Resolve a single option strike by delta on a monthly expiry. Parameters Returns

spread_by_delta

Resolve two option strikes by delta on the same monthly expiry. Parameters Returns

straddle_by_delta

Resolve ATM call and put at the same strike on a monthly expiry. Covers straddle, strip, and strap (contract quantities are strategy-level). Parameters Returns

strangle_by_delta

Resolve OTM call and put at different strikes on a monthly expiry. Covers strangle and risk_reversal. Parameters Returns

butterfly_by_delta

Resolve an equidistant butterfly on a monthly expiry (K2-K1 = K3-K2). Covers call_butterfly and put_butterfly. Parameters Returns

broken_wing_butterfly_by_delta

Resolve a broken-wing butterfly on a monthly expiry (wings not equidistant). Covers broken_wing_call_butterfly and broken_wing_put_butterfly. Parameters Returns Raises

ladder_by_delta

Resolve an equidistant ladder on a monthly expiry (K2-K1 = K3-K2). Covers call_ladder and put_ladder. Parameters Returns

broken_ladder_by_delta

Resolve a broken ladder on a monthly expiry (strikes not equidistant). Covers broken_call_ladder and broken_put_ladder. Parameters Returns

jade_lizard_by_delta

Resolve a jade lizard (short put, short call spread) on a monthly expiry. Parameters Returns

condor_by_delta

Resolve an equidistant single-type condor on a monthly expiry (K2-K1 = K3-K2 = K4-K3). Covers call_condor and put_condor: all four legs share one instrument type, which is what separates this from iron_condor_by_delta and its put/put/call/call legs. Parameters Returns

broken_condor_by_delta

Resolve a broken single-type condor on a monthly expiry (strikes not equidistant). Covers broken_call_condor and broken_put_condor. Parameters Returns

albatross_by_delta

Resolve an albatross on a monthly expiry (K2-K1 = K4-K3, K3-K2 = 2xwing_width). Covers call_albatross and put_albatross. Parameters Returns

pterodactyl_by_delta

Resolve a pterodactyl on a monthly expiry (K2-K1 = K4-K3, body gap free). Covers call_pterodactyl and put_pterodactyl. Parameters Returns

iron_condor_by_delta

Resolve an equidistant iron condor on a monthly expiry (wing widths equal the body gap). Covers iron_condor. Parameters Returns

broken_iron_condor_by_delta

Resolve a broken iron condor on a monthly expiry (all 4 strikes resolved independently). Covers broken_iron_condor. Parameters Returns

iron_butterfly_by_delta

Resolve an iron butterfly on a monthly expiry (ATM body, equal wing widths). Covers iron_butterfly. Parameters Returns

broken_iron_butterfly_by_delta

Resolve a broken iron butterfly on a monthly expiry (ATM body, asymmetric wings). Covers broken_iron_butterfly. Parameters Returns

iron_pterodactyl_by_delta

Resolve an iron pterodactyl on a monthly expiry (K2-K1 = K4-K3, body gap free). Covers iron_pterodactyl. Parameters Returns

iron_albatross_by_delta

Resolve an iron albatross on a monthly expiry (wing widths = half the body gap). Covers iron_albatross. Parameters Returns

calendar_spread_by_delta

Resolve a calendar spread across two monthly expiries (one strike, different expiries). Covers calendar_call_spread and calendar_put_spread. The far leg reuses the near strike through the absolute resolver, which returns the closest strike that expiry actually lists, so on a sparse far expiry the result is the nearest available strike rather than an error. Parameters Returns

diagonal_spread_by_delta

Resolve a diagonal spread across two monthly expiries (different strike, different expiry). Covers diagonal_call_spread and diagonal_put_spread. Each leg is resolved by delta on its own expiry, which is what makes it a diagonal: pass the same value for both deltas and you have asked for a calendar, so use calendar_spread_by_delta instead. Parameters Returns

get_structure_resolver

Return the resolver function for the given structure. Parameters Returns

resolve_structure

Resolve an option structure by name, dispatching to the appropriate resolver function. Parameters Returns
Last modified on November 4, 2026