calculate_implied_volatility
Calculate implied volatility from option price data using the Black-Scholes model. Input symbol, expiry, strike, option price, and underlying price to derive market-implied volatility for options trading analysis.
Instructions
Calculate implied volatility from option price.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| expiry | Yes | ||
| strike | Yes | ||
| right | Yes | ||
| option_price | Yes | ||
| underlying_price | Yes |
Implementation Reference
- src/ib_async_mcp/server.py:730-744 (handler)The handler logic for 'calculate_implied_volatility', which qualifies the contract and calls 'ib.calculateImpliedVolatilityAsync'.
if name == "calculate_implied_volatility": contract = Option( args["symbol"], args["expiry"], args["strike"], args["right"], "SMART", ) await ib.qualifyContractsAsync(contract) result = await ib.calculateImpliedVolatilityAsync( contract, args["option_price"], args["underlying_price"], ) return serialize_object(result) - src/ib_async_mcp/server.py:340-354 (schema)The MCP tool registration and input schema definition for 'calculate_implied_volatility'.
Tool( name="calculate_implied_volatility", description="Calculate implied volatility from option price.", inputSchema={ "type": "object", "properties": { "symbol": {"type": "string"}, "expiry": {"type": "string"}, "strike": {"type": "number"}, "right": {"type": "string"}, "option_price": {"type": "number"}, "underlying_price": {"type": "number"}, }, "required": ["symbol", "expiry", "strike", "right", "option_price", "underlying_price"], },