CoolFace
Apppublic

deeraw/options-pricing-api

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

Options Pricing Lab — API

European option pricing under Black-Scholes and Heston (stochastic vol), full Greeks, implied-vol solver via Brent, and a vol-surface builder with butterfly and calendar arbitrage diagnostics.

Endpoints

  • POST /price/black-scholes — closed-form price + Δ Γ Θ V ρ
  • POST /price/heston — Lewis-style Gauss-Legendre integration, Feller condition reported
  • POST /iv — Brent root-finder on BS price, returns IV + Greeks
  • POST /surface — build IV surface from a list of (K, T, price) quotes; flags no-arb violations
  • POST /greeks/strip — Greeks across a 41-point strike strip for visualisation

Run

bash
pip install -r requirements.txt
uvicorn main:app --reload

Deploy

Push to GitHub, connect on Render. render.yaml is auto-detected.