calculate_futures_price
Calculate the fair futures price using the cost-of-carry model by entering spot price, interest rate, time to maturity, and optional dividend yield.
Instructions
Fair value of a futures/forward contract using cost-of-carry. Use when a user asks 'what should the futures/forward price be', about carry, contango/backwardation, or arbitrage-free pricing of index/stock futures. F = Spot × e^((r-q)×t). Set dividend_yield for stocks/indices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | Yes | ||
| spot_price | Yes | ||
| annual_rate | Yes | ||
| compounding | No | continuous | |
| dividend_yield | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |