options_implied-vol
Compute implied volatility from option market price using Newton-Raphson iteration. Requires spot, strike, time, and market price. Returns IV and Greeks.
Instructions
Newton-Raphson implied volatility solver. Converges in 5-8 iterations.
Use when you know the market price of an option and need to back out the implied volatility. Uses Newton-Raphson iteration. Provide spot, strike, time to expiry, risk-free rate, market price, and option type. Returns: implied volatility, convergence info, and Greeks at that IV.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| K | Yes | Strike price | |
| S | Yes | Spot price of the underlying asset | |
| T | Yes | Time to expiration in years | |
| q | No | Continuous dividend yield | |
| r | No | Risk-free interest rate (annualized) | |
| type | No | Option type | call |
| market_price | Yes | Observed market price of the option |