Skip to content

Summary

Computes the net expected value of a vertical credit spread held to expiration, using real-world expiry probabilities and an explicit cost model, and reports it against the IV−RV and GARCH baselines required by the EV contract. Blessed code only; playbooks must not re-derive the arithmetic.

Computation

EV = Σᵢ P(S_T ∈ regionᵢ) · payoffᵢ − commissions − slippage, reported net of the baselines.

Pseudo-formula:

credit     = price(short_leg) − price(long_leg)              # py_vollib BSM
max_loss   = width − credit
P(win)     = P(short_strike < S_T) under real-world model    # GARCH/HAR, NOT IV
ev_gross   = P(win)·credit − (1−P(win))·max_loss
costs      = 2·fee_per_contract·n  +  slippage_pct·credit·100·n
ev_net     = ev_gross − costs / (100·n)
baseline_vrp   = iv − rv_window        # variance risk premium, annualized vols
baseline_ev_rv = SAME structure's EV under the RV distribution (rv_window)
edge_vs_rv     = ev_net − baseline_ev_rv

Parameters

Name Type Req Notes
spot number yes underlying price at evaluation
iv number yes short-strike IV, annualized decimal
dte integer yes days to expiration (both legs)
short_strike / long_strike number yes credit side and protective wing
option_type string no put (bull put) or call (bear call)
contracts integer no size, default 1
fee_per_contract number no per leg, per contract (USD)
slippage_pct number no fraction of credit, round-trip
rv_window number yes annualized real-world realized vol estimate (fail-closed)
garch_forecast number yes annualized GARCH-class real-world vol forecast (fail-closed)

What It Reports

ev_net, ev_gross, credit, max loss, breakeven, total_costs, baseline_vrp, baseline_ev_rv, edge_vs_rv, plus a receipt for the run-ev skill. Positive ev_net is not edge unless the IV−RV spread beats the regime baseline.

Limitations

The physical distribution is lognormal under the GARCH forecast (garch_forecast) with equity-premium drift (r + 4% equity risk premium; dividends do not enter the index-price drift for total-return-ignored index options); probabilities are exact lognormal CDF probabilities. Fat tails and skew are TODO(data-feed). Exit before expiry, early assignment, and pin risk are not modeled. See TOMIC strategies for setup context and spread mechanics.

References

  • Natenberg, Option Volatility and Pricing (McGraw-Hill, 1994) — probability and premium structure.
  • Chen & Sebastian, The Option Trader's Hedge Fund (Wiley, 2012) — credit-spread playbook.
  • py_vollib documentation — https://py_vollib.readthedocs.io/
  • Hull, Options, Futures and Other Derivatives, 8e (Pearson) — Black-Scholes-Merton pricing.

Links