{"slug":"credit-spread-vs-debit-spread","qid":"payoff_grid","label":"Profit and loss at expiration: the debit structure against the credit structure","post_title":"Credit Spread vs Debit Spread: Same Trade?","post_url":"/blog/credit-spread-vs-debit-spread#q-payoff_grid","columns":["price_at_expiry","debit_structure_pl","credit_structure_pl","pl_gap"],"rows":[{"price_at_expiry":"$275","debit_structure_pl":-2.6,"credit_structure_pl":-2.09,"pl_gap":-0.51},{"price_at_expiry":"$280","debit_structure_pl":-2.6,"credit_structure_pl":-2.09,"pl_gap":-0.51},{"price_at_expiry":"$285","debit_structure_pl":-2.6,"credit_structure_pl":-2.09,"pl_gap":-0.51},{"price_at_expiry":"$290","debit_structure_pl":-2.6,"credit_structure_pl":-2.09,"pl_gap":-0.51},{"price_at_expiry":"$295","debit_structure_pl":2.4,"credit_structure_pl":2.91,"pl_gap":-0.51},{"price_at_expiry":"$300","debit_structure_pl":2.4,"credit_structure_pl":2.91,"pl_gap":-0.51},{"price_at_expiry":"$315","debit_structure_pl":2.4,"credit_structure_pl":2.91,"pl_gap":-0.51},{"price_at_expiry":"$320","debit_structure_pl":2.4,"credit_structure_pl":2.91,"pl_gap":-0.51}],"shape":"ranking","sql":"WITH chain AS\n(\n    SELECT\n        toFloat64(strike_price)                                                  AS strike,\n        any(toFloat64(underlying_close))                                         AS spot,\n        avgIf(toFloat64(option_close), lower(option_type) IN ('call', 'c'))      AS call_px,\n        avgIf(toFloat64(option_close), lower(option_type) IN ('put', 'p'))       AS put_px\n    FROM global_markets.options_greeks\n    WHERE underlying_symbol = 'AAPL'\n      AND date = '2026-06-12'\n      AND expiration_date = '2026-07-17'\n      AND volume >= 50\n      AND toFloat64(strike_price) = round(toFloat64(strike_price) / 5) * 5\n      AND abs(toFloat64(strike_price) / toFloat64(underlying_close) - 1) < 0.12\n    GROUP BY strike\n    HAVING countIf(lower(option_type) IN ('call', 'c')) > 0\n       AND countIf(lower(option_type) IN ('put', 'p')) > 0\n)\nSELECT\n    concat('$', toString(px.strike))                                             AS price_at_expiry,\n    round(least(greatest(px.strike - lo.strike, 0.0), hi.strike - lo.strike)\n        - (lo.call_px - hi.call_px), 2)                                          AS debit_structure_pl,\n    round((hi.put_px - lo.put_px)\n        - least(greatest(hi.strike - px.strike, 0.0), hi.strike - lo.strike), 2) AS credit_structure_pl,\n    round(least(greatest(px.strike - lo.strike, 0.0), hi.strike - lo.strike)\n        - (lo.call_px - hi.call_px)\n        - (hi.put_px - lo.put_px)\n        + least(greatest(hi.strike - px.strike, 0.0), hi.strike - lo.strike), 2) AS pl_gap\nFROM chain AS px\nINNER JOIN chain AS lo ON lo.strike = floor(px.spot / 5) * 5\nINNER JOIN chain AS hi ON hi.strike = lo.strike + 5\nORDER BY px.strike","computed_at":"2026-08-07T16:16:38.591810+00:00","elapsed":0.004585119}