Options Overlay
Prediction markets are binary options. They have implied volatility, Greeks, and a term structure. Horizon’s options overlay extracts these from market prices and builds synthetic spread strategies. All math is in Rust.Overview
Options Chain
hz.build_options_chain() computes IV, delta, gamma, theta, and vega from binary prices.Vol Surface
hz.vol_surface() maps implied vol across strikes and expiries.Term Structure
hz.term_structure() extracts the IV term structure.Spread Strategies
Butterfly, straddle, and calendar spread construction.
Core Functions
hz.build_options_chain
Build a synthetic options chain with Greeks from prediction market prices.| Parameter | Type | Description |
|---|---|---|
market_ids | list[str] | Market identifiers |
prices | list[float] | Current binary prices |
expiry_days | list[float] | Days to expiry |
SyntheticOption objects with fields: market_id, price, implied_vol, delta, gamma, theta, vega.
hz.vol_surface
Build a volatility surface across strikes and expiries.hz.term_structure
Extract the IV term structure for a single strike across different expiries.Spread Strategies
Pipeline Functions
hz.options_chain
Build and track the options chain each cycle.| Parameter | Type | Default | Description |
|---|---|---|---|
market_feeds | dict[str, str] | required | market_id -> feed_name mapping |
expiry_days | dict[str, float] | None | Per-market expiry overrides |
default_expiry | float | 30.0 | Default days to expiry |
hz.delta_hedge_continuous
Continuous delta hedging. Flags when delta drift exceeds a threshold.hz.vol_surface_monitor
Track the vol surface and detect IV changes.Examples
Options-Aware Trading
Mathematical Background
Binary Option Implied Volatility
Binary Option Implied Volatility
For a binary option paying 1 if the event occurs:price = N(d2) where d2 = -sigma * sqrt(T) / 2IV is extracted by inverting this relationship via bisection. Prices near 0.5 have the highest vega (most sensitive to vol changes).
Binary Greeks
Binary Greeks
- Delta: dP/dS, sensitivity to underlying. For binaries, delta peaks at-the-money.
- Gamma: d2P/dS2, rate of delta change.
- Theta: dP/dT, time decay. Binaries gain theta as they move away from 0.5.
- Vega: dP/dsigma, sensitivity to implied vol.