Pro Feature. Requires a Pro or Ultra subscription. Get started at api.mathematicalcompany.com
Logit-Space Pricing
Horizon implements the logit-space pricing framework from Dalen 2025 (“Toward Black-Scholes for Prediction Markets”). All math is in Rust; Python pipeline wrappers handle feed ingestion and context injection.Logit Transform
hz.logit() / hz.sigmoid() - the core transforms between probability and logit space.Logit Greeks
hz.logit_greeks() - delta, gamma, theta, belief-vega in the correct mathematical space.Logit Market Maker
hz.logit_market_maker() - full pipeline factory using logit reservation price and optimal spread.PnL Decomposition
hz.logit_pnl_decompose() - Taylor decomposition of PnL into directional, curvature, vega, and residual.Why Logit Space?
In probability space, market making near boundaries (p near 0 or 1) has three problems:- Spread compression: An optimal spread of 0.04 makes no sense at p=0.02
- Greek distortion: Delta and gamma behave differently near boundaries
- Non-Gaussian dynamics: Price changes aren’t normally distributed in probability space
x = ln(p/(1-p)) maps (0,1) to (-inf, +inf), where:
- Gaussian diffusion assumptions hold
- Spread scales naturally with
p(1-p)(sigmoid derivative) - Greeks have clean closed-form expressions
Core Functions
hz.logit / hz.sigmoid
The fundamental transforms.hz.sigmoid_prime / hz.sigmoid_double_prime
Derivatives of the sigmoid function. Used internally for Greeks computation.Logit Market Making
hz.logit_reservation_price
Compute the logit-space inventory-skewed fair value.hz.logit_optimal_spread
Compute the logit-space optimal bid-ask spread.hz.toxicity_adjusted_spread
Widen spread based on VPIN toxicity signal. Bridges the VPIN detector to spread adjustment.Logit Greeks
hz.logit_greeks
Compute prediction market Greeks in logit space.LogitGreeks Type
PnL Decomposition
hz.logit_pnl_decompose
Taylor decomposition of realized PnL into component contributions.LogitPnlAttribution Type
Pipeline Integration
hz.logit_market_maker
Full logit-space market maker forhz.run(). Drop-in replacement for hz.market_maker().
hz.logit_greeks_pipeline
Injects logit Greeks intoctx.params each cycle.