The expiration optimizer scores every available expiry for a ticker on five dimensions of up to 20 points each: how close the days to expiry sit to the 30-45 day band with a peak at 37, the implied volatility level, the shape of the term structure at that expiry, gamma risk measured as expected delta drift on a one-standard-deviation day, and decay per unit of volatility risk. Three of the five invert by side: sellers score rich volatility, a front-month peak and high decay highest, buyers score the opposite. A standard monthly within a small margin of the top weekly is promoted, and earnings inside the window adjust the score by side.
How these pages were written: from the engine source as deployed in September 2026, with thresholds quoted as the code holds them. Thresholds change with releases and the changelog records each change. This is a description of arithmetic, not advice about what to trade.
Source module: options/expiry_optimizer.py.
Each expiry earns up to 20 points on each of five dimensions, for a 0-100 total:
The total depends only on expiry-level quantities. It does not depend on which strikes the screener later chooses, so the optimizer answers one question, which expiry best fits the setup, and the spread screener answers the strike question separately.
Not because 37 days carries the most premium. Per unit of risk, compensation rises as days to expiry fall, because the variance premium concentrates at the front of the curve. What justifies the 30-45 day band for a seller who cannot hedge continuously is gamma: the expected delta drift on an ordinary day is roughly twice as large at 21 days as at 45 and roughly five times as large at 7 days, and shorter cycles carry five to seven times the transaction-cost load. The peak is a gamma-and-frictions optimum, and the platform's copy is not permitted to describe it as "most premium".
As the expected delta drift on a one-standard-deviation daily move: gamma times spot times implied volatility divided by the square root of 365. That figure is invariant to the stock's price level and volatility level, which a raw gamma is not, while still reading the chain's real gamma rather than a model value. The sweet spot is 0.20 to 0.80; an earlier normalization that cancelled gamma's time dependence had left this dimension scoring zero on every realistic chain, which is recorded in the changelog and is the kind of error the literature reviews were run to find.
A catalyst-clearance adjustment reads dated events inside the planner's window and scores them by side, because the same calendar geometry is a trap for one side and an edge for the other. For a buyer, an expiry that lands in the seven days before an earnings date loses 10 points: the trade pays for the run-up in implied volatility into the print and expires before the event can resolve the thesis. An expiry that lands 7 to 21 days after the event gains 4 points, a nudge for the event resolving inside the trade's life, not a claim about post-earnings drift, which this engine removed and does not reassert. For a seller the signs reverse.
Two further rules shape the ranking. If the top-scored expiry is a weekly and a standard monthly sits within a small margin of it, the monthly moves to the front, because monthlies carry the open interest that makes rolls and condors buildable. And a chain-liquidity score of up to 10 points, from aggregate open interest on a logarithmic scale and the at-the-money bid-ask width as a fraction of mid, replaced an earlier flat bonus for monthlies: a liquid weekly on a large name is deeper than an illiquid monthly on a thin one, and the calendar could not tell them apart.
Distance from the 30-45 day band with a peak at 37 days, the implied volatility level, the shape of the term structure at that expiry, gamma risk measured as expected delta drift on a one-standard-deviation day, and theta-to-vega. Each carries up to 20 points, and three of the five invert between sellers and buyers.
Because the band is a gamma-and-frictions optimum, not a premium optimum. Expected delta drift on an ordinary day is roughly twice as large at 21 days as at 45 and five times as large at 7, and shorter cycles carry five to seven times the transaction-cost load.
By side. For a buyer, an expiry in the seven days before the print loses 10 points and one 7 to 21 days after it gains 4; for a seller the signs reverse. The adjustment is a nudge about calendar geometry, not a claim about post-earnings drift.
More in Methodology: how the engine computes: How Tape Fit Scores a Strike Against the Chart · How the Paper Trading Agent Decides: the Gate · How Exit Rules Are Applied to Open Positions