Expand description
Polymarket-derived Volatility Oracle for pre-IPO assets (e.g., SPCX).
Polls Polymarketโs Gamma API for digital-option-style probability markets (e.g., โSpaceX IPO closing market cap above $2T?โ), converts market cap thresholds to per-share strike prices, and inverts Black-Scholes digital call pricing to extract an implied volatility smile.
Structsยง
- Gamma
Event ๐ - Gamma
Market ๐ - Polymarket
Surface ๐State - Polymarket
VolOracle - Polymarket
VolOracle Config
Constantsยง
- GAMMA_
API_ ๐BASE
Functionsยง
- bs_
digital_ ๐call_ price - Price of a digital (binary) call: pays $1 if S_T > K.
- estimate_
spot_ ๐from_ cdf - Estimate spot price from the CDF by finding where P(above) โ 0.50.
- norm_
cdf ๐ - parse_
market_ ๐cap_ from_ question - Parse a market cap dollar amount from a Polymarket question. E.g., โSpaceX IPO closing market cap above $2T?โ โ 2_000_000_000_000.0
- parse_
yes_ ๐probability - Parse the โYesโ probability from a Polymarket outcomePrices JSON string.
The field is double-encoded:
"[\"0.705\",\"0.295\"]". - solve_
digital_ ๐iv - Solve for the Black-Scholes implied volatility of a digital call option given its market probability. Returns None if the inversion fails.