{"slug":"how-many-puts-to-hedge-a-portfolio","qid":"rounding_residual","label":"rounding_residual","post_title":"how-many-puts-to-hedge-a-portfolio","post_url":"/blog/how-many-puts-to-hedge-a-portfolio#q-rounding_residual","columns":["portfolio_size","exact_contracts","contracts_rounded_down","unhedged_usd_thousands","unhedged_pct","overhedge_pct"],"rows":[{"portfolio_size":"$60k","exact_contracts":0.82,"contracts_rounded_down":0,"unhedged_usd_thousands":63,"unhedged_pct":105,"overhedge_pct":22.94},{"portfolio_size":"$120k","exact_contracts":1.64,"contracts_rounded_down":1,"unhedged_usd_thousands":49.2,"unhedged_pct":41.03,"overhedge_pct":22.94},{"portfolio_size":"$180k","exact_contracts":2.46,"contracts_rounded_down":2,"unhedged_usd_thousands":35.5,"unhedged_pct":19.71,"overhedge_pct":22.94},{"portfolio_size":"$300k","exact_contracts":4.1,"contracts_rounded_down":4,"unhedged_usd_thousands":7.9,"unhedged_pct":2.65,"overhedge_pct":22.94},{"portfolio_size":"$500k","exact_contracts":6.84,"contracts_rounded_down":6,"unhedged_usd_thousands":64.4,"unhedged_pct":12.88,"overhedge_pct":2.47},{"portfolio_size":"$700k","exact_contracts":9.57,"contracts_rounded_down":9,"unhedged_usd_thousands":44.1,"unhedged_pct":6.3,"overhedge_pct":4.66},{"portfolio_size":"$900k","exact_contracts":12.31,"contracts_rounded_down":12,"unhedged_usd_thousands":23.8,"unhedged_pct":2.65,"overhedge_pct":5.88}],"shape":"table","sql":"SELECT\n    portfolio_size,\n    round(exact_raw, 2)                                                                AS exact_contracts,\n    toUInt16(floor(exact_raw))                                                         AS contracts_rounded_down,\n    round((beta_notional - floor(exact_raw) * contract_notional) / 1000, 1)             AS unhedged_usd_thousands,\n    round(100 * (beta_notional - floor(exact_raw) * contract_notional) / portfolio, 2)  AS unhedged_pct,\n    round(100 * (ceil(exact_raw) * contract_notional - beta_notional) / portfolio, 2)   AS overhedge_pct\nFROM\n(\n    SELECT\n        v.portfolio                                          AS portfolio,\n        concat('$', toString(intDiv(v.portfolio, 1000)), 'k') AS portfolio_size,\n        v.portfolio * 1.05                                   AS beta_notional,\n        s.px * 100                                           AS contract_notional,\n        v.portfolio * 1.05 / (s.px * 100)                    AS exact_raw\n    FROM\n    (\n        SELECT arrayJoin([60000, 120000, 180000, 300000, 500000, 700000, 900000]) AS portfolio\n    ) AS v\n    CROSS JOIN\n    (\n        SELECT argMax(toFloat64(close), date) AS px\n        FROM global_markets.stocks_daily_aggs\n        WHERE ticker = 'SPY'\n          AND date >= today() - 30\n    ) AS s\n)\nORDER BY exact_contracts","computed_at":"2026-09-28T15:14:56.316264+00:00","elapsed":0.027297102}