calculate_option_price
Calculate option prices using volatility inputs to determine fair market value for trading decisions.
Instructions
Calculate option price from volatility.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| expiry | Yes | ||
| strike | Yes | ||
| right | Yes | ||
| volatility | Yes | ||
| underlying_price | Yes |
Implementation Reference
- src/ib_async_mcp/server.py:746-760 (handler)The handler function for 'calculate_option_price' which qualifies the contract and calls ib.calculateOptionPriceAsync.
if name == "calculate_option_price": contract = Option( args["symbol"], args["expiry"], args["strike"], args["right"], "SMART", ) await ib.qualifyContractsAsync(contract) result = await ib.calculateOptionPriceAsync( contract, args["volatility"], args["underlying_price"], ) return serialize_object(result) - src/ib_async_mcp/server.py:356-370 (registration)Registration of the 'calculate_option_price' tool, including its input schema definition.
Tool( name="calculate_option_price", description="Calculate option price from volatility.", inputSchema={ "type": "object", "properties": { "symbol": {"type": "string"}, "expiry": {"type": "string"}, "strike": {"type": "number"}, "right": {"type": "string"}, "volatility": {"type": "number"}, "underlying_price": {"type": "number"}, }, "required": ["symbol", "expiry", "strike", "right", "volatility", "underlying_price"], },