{"slug":"probability-of-touch-vs-probability-of-itm","qid":"touch_vs_finish","label":"SPY: touched versus finished above, 21-session forward windows since 2011","post_title":"Probability of Touch vs Probability ITM","post_url":"/blog/probability-of-touch-vs-probability-of-itm#q-touch_vs_finish","columns":["strike_distance","touch_pct","finish_above_pct","touch_to_finish_ratio","windows"],"rows":[{"strike_distance":"1% above spot","touch_pct":83.8,"finish_above_pct":56.7,"touch_to_finish_ratio":1.48,"windows":3874},{"strike_distance":"2% above spot","touch_pct":66.6,"finish_above_pct":44,"touch_to_finish_ratio":1.52,"windows":3874},{"strike_distance":"3% above spot","touch_pct":48.5,"finish_above_pct":31.1,"touch_to_finish_ratio":1.56,"windows":3874},{"strike_distance":"5% above spot","touch_pct":19.6,"finish_above_pct":12.3,"touch_to_finish_ratio":1.6,"windows":3874}],"shape":"table","sql":"WITH\n    bars AS (\n        SELECT\n            date,\n            any(toFloat64(close)) AS c,\n            max(toFloat64(high))  AS h\n        FROM global_markets.stocks_daily_aggs\n        WHERE ticker = 'SPY'\n          AND date >= '2011-01-01'\n          AND date <  '2026-07-01'\n        GROUP BY date\n    ),\n    fwd AS (\n        SELECT\n            c AS spot,\n            max(h) OVER (ORDER BY date ROWS BETWEEN 1 FOLLOWING AND 21 FOLLOWING)      AS fwd_max_high,\n            leadInFrame(c, 21) OVER (ORDER BY date ROWS BETWEEN CURRENT ROW AND 21 FOLLOWING) AS close_fwd_21\n        FROM bars\n    ),\n    trials AS (\n        SELECT\n            arrayJoin([1, 2, 3, 5])     AS pct_away,\n            spot * (1 + pct_away / 100) AS level,\n            fwd_max_high >= level       AS touched,\n            close_fwd_21 >= level       AS finished_above\n        FROM fwd\n        WHERE close_fwd_21 > 0\n    )\nSELECT\n    concat(toString(pct_away), '% above spot')   AS strike_distance,\n    round(100 * avg(touched), 1)                 AS touch_pct,\n    round(100 * avg(finished_above), 1)          AS finish_above_pct,\n    round(avg(touched) / avg(finished_above), 2) AS touch_to_finish_ratio,\n    count()                                      AS windows\nFROM trials\nGROUP BY pct_away\nORDER BY pct_away","computed_at":"2026-08-07T16:05:46.093442+00:00","elapsed":0.05151533}