{"slug":"what-is-an-implied-volatility-index","qid":"bracket_legs","label":"bracket_legs","post_title":"what-is-an-implied-volatility-index","post_url":"/blog/what-is-an-implied-volatility-index#q-bracket_legs","columns":["leg","expiry","dte","atm_iv_pct","contract_count","weight_pct","iv30_pct"],"rows":[{"leg":"near","expiry":"July 10, 2026","dte":25,"atm_iv_pct":21.77,"contract_count":6,"weight_pct":28.6,"iv30_pct":21.83},{"leg":"far","expiry":"July 17, 2026","dte":32,"atm_iv_pct":21.85,"contract_count":6,"weight_pct":71.4,"iv30_pct":21.83}],"shape":"table","sql":"SELECT\n    leg,\n    leg_expiry                                              AS expiry,\n    leg_dte                                                 AS dte,\n    round(leg_iv * 100, 2)                                  AS atm_iv_pct,\n    leg_contracts                                           AS contract_count,\n    round(leg_weight * 100, 1)                              AS weight_pct,\n    round(sqrt((near_iv * near_iv * near_dte * (far_dte - 30)\n              + far_iv * far_iv * far_dte * (30 - near_dte))\n              / (far_dte - near_dte) / 30) * 100, 2)        AS iv30_pct\nFROM\n(\n    SELECT\n        maxIf(days_to_expiry, days_to_expiry <= 30)                     AS near_dte,\n        minIf(days_to_expiry, days_to_expiry > 30)                      AS far_dte,\n        argMaxIf(atm_iv, days_to_expiry, days_to_expiry <= 30)          AS near_iv,\n        argMinIf(atm_iv, days_to_expiry, days_to_expiry > 30)           AS far_iv,\n        argMaxIf(expiry_label, days_to_expiry, days_to_expiry <= 30)    AS near_expiry,\n        argMinIf(expiry_label, days_to_expiry, days_to_expiry > 30)     AS far_expiry,\n        argMaxIf(contracts, days_to_expiry, days_to_expiry <= 30)       AS near_contracts,\n        argMinIf(contracts, days_to_expiry, days_to_expiry > 30)        AS far_contracts\n    FROM\n    (\n        SELECT\n            concat(monthName(expiration_date), ' ', toString(toDayOfMonth(expiration_date)), ', ', toString(toYear(expiration_date))) AS expiry_label,\n            days_to_expiry,\n            avg(toFloat64(implied_volatility))  AS atm_iv,\n            count()                             AS contracts\n        FROM global_markets.options_greeks\n        WHERE underlying_symbol = 'AAPL'\n          AND date = '2026-06-15'\n          AND iv_converged = 1\n          AND volume > 0\n          AND days_to_expiry BETWEEN 7 AND 90\n          AND abs(toFloat64(strike_price) / toFloat64(underlying_close) - 1) < 0.025\n        GROUP BY expiration_date, days_to_expiry\n        HAVING contracts >= 2\n    )\n)\nARRAY JOIN\n    ['near', 'far']                                     AS leg,\n    [near_expiry, far_expiry]                           AS leg_expiry,\n    [near_dte, far_dte]                                 AS leg_dte,\n    [near_iv, far_iv]                                   AS leg_iv,\n    [near_contracts, far_contracts]                     AS leg_contracts,\n    [(far_dte - 30) / (far_dte - near_dte),\n     (30 - near_dte) / (far_dte - near_dte)]            AS leg_weight\nORDER BY leg_dte","computed_at":"2026-09-12T01:31:10.842699+00:00","elapsed":0.005239837}