Skip to main content
You reach them through self.resolver, which holds a strike registry and an expiry registry.

Strike resolvers

self.resolver.strike exposes one resolver per axis. Each turns a target value on its axis into the closest available strike, by searching the smile for that expiry as of the timestamp. Every strike resolver has the same resolve(...) signature:
It returns a single float strike: the available strike whose value on that axis is closest to strike_value. The comparison is on absolute values, so a put is targeted with a positive delta (strike_value=0.25 picks the 25-delta put) exactly like a call.
Resolve the expiry firstA strike resolver needs an expiration_date to know which smile to search, so resolve the expiry before the strike. The premade structures do this in order for you.
Strike resolvers are options-onlydelta, moneyness, value and the rest only make sense for options and raise on a future. A future has no strike to resolve - reference it directly by its expiry.

Expiry resolver

self.resolver.expiry has two methods, both returning a list[datetime]; take [0] for the single matching expiry.

relative(...) - the nth expiry past a floor

The arguments compose to pin down one expiry: So nth=1, min_dte=30 on the default monthly cadence reads as “the first monthly expiry with at least 30 days left”. Bumping nth to 2 walks out to the next one; setting period_id=PeriodID.QUARTER1 restricts the candidates to first-quarter expiries.
min_dte filters, then nth countsmin_dte is applied first, so nth counts only among expiries that already clear the day floor. nth=1, min_dte=30 is not “the front month if it has 30 days” - it is “the first expiry that has 30 days”, which may be a later month when the front one is close to expiring.

closest_to_dte(...) - the nearest expiry to a target

Same period_type / period_id filters, but instead of a floor plus a count it takes a single dte target and returns the expiry nearest to it, above or below. Reach for it when you want “roughly 45 days out” rather than “at least 30 days out”.
Both raise when nothing matchesA min_dte no expiry clears, or a period_id with no expiries in the snapshot, raises LookupError naming the underlying and the timestamp. Near the end of a dataset the front months run out first, so a long min_dte on a run that reaches the last snapshots is the usual cause.

How the two fit together

Resolving a leg is always expiry then strike:
Option needs both, and Future needs an expiry too - neither has a “front contract” default, so a leg is always resolved before it is built. For multi-leg trades, the premade structures wrap exactly this pattern so you skip the per-leg plumbing. Related: DataFeed and market data · Structures · Architecture and the pulse loop
Last modified on November 4, 2026