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
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
Spread.short_option
instance-attribute
Straddle
Bases: NamedTuple
A call and a put on one expiry, returned by straddle_by_delta.
Straddle.call
instance-attribute
Straddle.put
instance-attribute
Strangle
Bases: NamedTuple
An out-of-the-money put and call at different strikes, returned by strangle_by_delta.
Strangle.put
instance-attribute
Strangle.call
instance-attribute
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
Butterfly.body
instance-attribute
Butterfly.upper_wing
instance-attribute
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
Ladder.mid
instance-attribute
Ladder.far
instance-attribute
JadeLizard
Bases: NamedTuple
A put plus a call spread on one expiry, returned by jade_lizard_by_delta.
JadeLizard.put
instance-attribute
JadeLizard.short_call
instance-attribute
JadeLizard.long_call
instance-attribute
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
Condor.lower_body
instance-attribute
Condor.upper_body
instance-attribute
Condor.upper_wing
instance-attribute
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
IronCondor.short_put
instance-attribute
IronCondor.short_call
instance-attribute
IronCondor.long_call
instance-attribute
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
IronButterfly.short_put
instance-attribute
IronButterfly.short_call
instance-attribute
IronButterfly.long_call
instance-attribute
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
CalendarSpread.far_option
instance-attribute
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
DiagonalSpread.far_option
instance-attribute
Structure
Bases: StrEnum
Name of a premade structure, accepted by get_structure_resolver and resolve_structure.
option_by_delta
Returns
spread_by_delta
Returns
straddle_by_delta
Returns
strangle_by_delta
Returns
butterfly_by_delta
Returns
broken_wing_butterfly_by_delta
Returns
Raises
ladder_by_delta
Returns
broken_ladder_by_delta
Returns
jade_lizard_by_delta
Returns
condor_by_delta
iron_condor_by_delta and its put/put/call/call legs.
Parameters
Returns
broken_condor_by_delta
Returns
albatross_by_delta
Returns
pterodactyl_by_delta
Returns
iron_condor_by_delta
Returns
broken_iron_condor_by_delta
Returns
iron_butterfly_by_delta
Returns
broken_iron_butterfly_by_delta
Returns
iron_pterodactyl_by_delta
Returns
iron_albatross_by_delta
Returns
calendar_spread_by_delta
Returns
diagonal_spread_by_delta
calendar_spread_by_delta instead.
Parameters
Returns
get_structure_resolver
Returns
resolve_structure
Returns

