black_scholes
Calculate the price of call or put options using the Black-Scholes model by inputting asset price, strike price, time to expiration, risk-free rate, and volatility.
Instructions
Calculate Black-Scholes option price
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| K | Yes | Strike price of the option | |
| S | Yes | Current price of the asset | |
| T | Yes | Time to expiration in years | |
| optionType | No | Option type: "call" or "put" | call |
| r | Yes | Risk-free interest rate | |
| sigma | Yes | Volatility of the asset |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"properties": {
"K": {
"description": "Strike price of the option",
"type": "number"
},
"S": {
"description": "Current price of the asset",
"type": "number"
},
"T": {
"description": "Time to expiration in years",
"type": "number"
},
"optionType": {
"default": "call",
"description": "Option type: \"call\" or \"put\"",
"enum": [
"call",
"put"
],
"type": "string"
},
"r": {
"description": "Risk-free interest rate",
"type": "number"
},
"sigma": {
"description": "Volatility of the asset",
"type": "number"
}
},
"required": [
"S",
"K",
"T",
"r",
"sigma"
],
"type": "object"
}