{ "cells": [ { "cell_type": "markdown", "id": "8e5c727b", "metadata": {}, "source": [ "# Implied Future & Discount From Option Prices\n", "\n", "This notebook computes the implied underlying future from option prices of a *single expiry*.\n", "\n", "* Computes an **implied future ** $F$ and a **discount range** $D$ that are **jointly consistent** with the quoted calls & puts.\n", "* Identifies and **excludes the fewest possible strikes** whose quotes prevent any consistent solution (likely stale/misquoted lines).\n", "* Visualizes per-strike **implied futures**." ] }, { "cell_type": "code", "execution_count": null, "id": "a7950be2", "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "plt.rcParams[\"figure.dpi\"] = 120\n", "\n", "from volkit import estimate_future_from_option_prices\n", "from volkit.datasets import spxw" ] }, { "cell_type": "markdown", "id": "c7191e82", "metadata": {}, "source": [ "Read a set op example option quotes. Weekly S&P options with 7 days to expiry. Use only quotes that have been trades at least once (min_vol=1)" ] }, { "cell_type": "code", "execution_count": 2, "id": "3ecb31a6", "metadata": {}, "outputs": [], "source": [ "df = spxw(min_volume=1, D=7)" ] }, { "cell_type": "code", "execution_count": null, "id": "535154b7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| F | 2918.894392 |
|---|---|
| F_bid | 2918.846423 |
| F_ask | 2918.939470 |
| D | 0.999803 |
| D_min | 0.99900000 |
| D_max | 1.00000000 |