Pro Feature. Requires a Pro or Ultra subscription. Get started at api.mathematicalcompany.com
Breeden-Litzenberger
Horizon implements the Breeden-Litzenberger theorem to extract risk-neutral probability densities from options chains, then maps these to prediction market edge signals. All computation runs in Rust.Density Extraction
risk_neutral_density() - extract the full probability distribution from options prices via finite differences.Probability Queries
implied_probability_above(), below(), between() - integrate the density over arbitrary ranges.Edge Detection
cross_asset_edge() - compare options-implied probability against prediction market price.Risk Premium
risk_premium_adjustment() - blend options and market probabilities to account for risk premium differences.How It Works
Given a set of call option prices C(K) across strikes K:- Compute density:
f(K) = e^{rT} * d²C/dK²(Breeden-Litzenberger theorem) - Normalize: Scale so the density integrates to 1.0 via trapezoidal rule
- Integrate: CDF = cumulative integral; probability queries integrate over ranges
- Compare: If options say P(BTC > 100K) = 0.70 but the prediction market prices it at 0.55, that’s a +0.15 edge
Core Functions
hz.risk_neutral_density
Extract the full risk-neutral probability density from an options chain.RiskNeutralDensity Type
Probability Queries
hz.implied_probability_above
Probability that the underlying exceeds a threshold.hz.implied_probability_below
Probability that the underlying is below a threshold.hz.implied_probability_between
Probability that the underlying falls within a range.Edge Detection
hz.cross_asset_edge
Compare an options-implied probability against a prediction market price.CrossAssetEdge Type
Risk Premium Adjustment
hz.risk_premium_adjustment
Options prices contain a risk premium that prediction markets don’t. This function blends the two probability estimates using a historical calibration ratio.Pipeline Integration
hz.cross_asset_signal
Pipeline factory that reads options chain data fromctx.params and computes edge signals.
ctx.params["options_chain"] to be:
ctx.params: