derivatives_barrier-option
Price knock-in and knock-out barrier options analytically. Provide spot, strike, barrier level, and standard parameters to receive option price, vanilla equivalent, and barrier adjustment factors.
Instructions
Barrier option pricing using analytical formulas.
Use when pricing knock-in or knock-out barrier options. Provide spot, strike, barrier level, barrier type, and standard option parameters. Returns: barrier option price, vanilla equivalent, and barrier adjustment factors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| H | Yes | Barrier level | |
| 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 |
| sigma | Yes | Volatility (annualized) | |
| rebate | No | Rebate paid if barrier is hit (for out) or not hit (for in) | |
| barrier_type | No | Barrier type: up/down + in/out | down-out |