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
| F | 2918.894392 |
|---|---|
| F_bid | 2918.894392 |
| F_ask | 2918.894392 |
| D | 0.999803 |
| D_min | 0.99900000 |
| D_max | 1.00000000 |