Logit-Space Pricing
Black-Scholes framework for prediction markets with Greeks and PnL decomposition
Prediction market prices are probabilities bounded to [0, 1]. The logit transform ln(p/(1-p)) maps them to unbounded real space where normal Black-Scholes math works. This gives you proper Greeks, boundary-aware spreads, and PnL attribution for binary contracts.
Core transforms
python
import horizon as hz
x = hz.logit(0.65) # 0.619
p = hz.sigmoid(0.619) # 0.65
Greeks for binary contracts
python
greeks = hz.logit_greeks(
prob=0.65,
belief_vol=0.15, # volatility in logit space
time_to_resolve=30.0, # days
)
print(f"Delta: {greeks.delta:.4f}") # price sensitivity to belief shift
print(f"Gamma: {greeks.gamma:.4f}") # convexity
print(f"Vega: {greeks.vega:.4f}") # sensitivity to belief-vol
print(f"Theta: {greeks.theta:.4f}") # time decay
PnL decomposition
python
pnl = hz.logit_pnl_decompose(
entry_prob=0.55,
exit_prob=0.65,
belief_vol=0.15,
dt=5.0, # days held
)
print(f"Delta PnL: {pnl.delta_pnl:.4f}")
print(f"Gamma PnL: {pnl.gamma_pnl:.4f}")
print(f"Theta PnL: {pnl.theta_pnl:.4f}")
print(f"Residual: {pnl.residual:.4f}")
Separates your P&L into directional (delta), convexity (gamma), time decay (theta), and unexplained components.
When to use
- Pricing and hedging binary contracts (prediction markets, binary options)
- Computing Greeks for risk management on probability-priced assets
- Decomposing P&L to understand what’s driving returns