Implied Future & Discount From Option PricesΒΆ

This notebook computes the implied underlying future from option prices of a single expiry.

  • Computes an **implied future ** \(F\) and a discount range \(D\) that are jointly consistent with the quoted calls & puts.

  • Identifies and excludes the fewest possible strikes whose quotes prevent any consistent solution (likely stale/misquoted lines).

  • Visualizes per-strike implied futures.

%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams["figure.dpi"] = 120

from volkit import estimate_future_from_option_prices
from volkit.datasets import spxw

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)

df = spxw(min_volume=1, D=7)
# Compute mid prices
C_mid = (df['C_bid'] + df['C_ask']) / 2
P_mid = (df['P_bid'] + df['P_ask']) / 2

res, valid_mask = estimate_future_from_option_prices(
   df['K'], 
   C_mid, 
   P_mid,
   plot=True
)

res
F2918.894392
F_bid2918.894392
F_ask2918.894392
D0.999803
D_min0.99900000
D_max1.00000000
../_images/860ef982f435d9c581c58c40fae621c08ae82e70f03653126dec2c27d53ce32d.png