Option and warrant pricing
calculate_optionOption-pricing engine. Price European and American options and warrants (Black-Scholes, Black-76, CRR binomial, Garman-Kohlhagen FX, digital, range, share-based) and their greeks. Use this for a single contingent claim or warrant on one underlying; it does NOT price listed structured payoffs such as CBBCs, inline/derivative warrants or autocallables (use calculate_structured_product). Methods: black_scholes: spot, strike, maturity, risk_free, volatility, option_type; black76: forward, strike, maturity, risk_free, volatility, option_type; binomial_american: spot, strike, maturity, risk_free, volatility, option_type, steps; garman_kohlhagen: spot, strike, maturity, domestic_rate, foreign_rate, volatility, option_type; barrier_first_passage: spot, strike, maturity, risk_free, volatility, option_type, barrier, barrier_type; asian_average: spot, strike, maturity, risk_free, volatility, option_type, average_type; digital: spot, strike, maturity, risk_free, volatility, cash_payout; range: spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout; share_based: share_price, exercise_price, expected_life, volatility, risk_free, dividend_yield. Supply exactly one method with its declared inputs (no defaults). An unknown method, a missing input, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spot | No | Spot price of the underlying (or FX rate for garman_kohlhagen). | |
| steps | No | Lattice steps for binomial_american (>=50). | |
| method | Yes | Formula to apply; the tool description lists the exact inputs each value requires. | |
| payout | No | Fixed payout when the range condition is met. | |
| strike | No | Strike or exercise price in the same currency as spot. | |
| barrier | No | Knock level for barrier_first_passage. | |
| forward | No | Forward/futures price of the underlying. | |
| maturity | No | Time to expiry in years (0.5 = six months); > 0. | |
| risk_free | No | Continuously-compounded risk-free rate (decimal). | |
| volatility | No | Annualized volatility (decimal, 0.30 = 30%); > 0. | |
| cash_payout | No | Fixed cash amount paid when the digital condition is met. | |
| option_type | No | Option right. | |
| share_price | No | Grant-date share price (IFRS 2). | |
| average_type | No | Averaging convention. | |
| barrier_type | No | Barrier direction. | |
| foreign_rate | No | Foreign continuously-compounded rate (decimal). | |
| lower_strike | No | Lower strike of the range. | |
| upper_strike | No | Upper strike of the range. | |
| domestic_rate | No | Domestic continuously-compounded rate (decimal). | |
| expected_life | No | Expected life of the award in years (IFRS 2). | |
| dividend_yield | No | Continuous dividend yield (decimal). | |
| exercise_price | No | Exercise price of the award (IFRS 2). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error detail, present only when status='error'. | |
| steps | No | Ordered computation steps, when the method reports them. | |
| value | No | Primary result: a number for scalar methods, an object for valuation methods. | |
| method | No | Method or tool name that produced the result. | |
| status | Yes | 'ok' on success, 'error' on failure. | |
| ticker | No | Ticker the result pertains to, when applicable. | |
| assumptions | No | Inputs and assumptions used, echoed for traceability. | |
| formula_ref | No | Formula or standards reference for the method. | |
| data_timestamp | No | ISO-8601 UTC timestamp of the underlying data, when fetched. |