Futures Options
Universes
Create Subscriptions
Follow these steps to subscribe to a Futures Options universe:
- Create a
QuantBook
. - Add the underlying Future.
qb = QuantBook()
future = qb.add_future(Futures.Indices.SP_500_E_MINI)
To view the available underlying Futures in the US Future Options dataset, see Supported Assets.
Price History
The contract filter determines which Future Option contracts are in your universe each trading day. The default filter selects the contracts with the following characteristics:
- Standard type (weeklies and non-standard contracts are not available)
- Within 1 strike price of the underlying asset price
- Expire within 35 days
To get the prices and volumes for all of the Future Option contracts that pass your filter during a specific period of time, get the underlying Future contract and then call the option_history
method with the Future contract's Symbol
object, a start datetime
, and an end datetime
.
start_date = datetime(2024, 1, 1) # Select an underlying Futures contract. For example, get the front-month contract. chain = list(qb.history[FutureUniverse](future.symbol, start_date, start_date+timedelta(2)))[0] futures_contract = list(chain)[0].symbol # Get the Options data for the selected Futures contract. option_history = qb.option_history( futures_contract, start_date, futures_contract.id.date, Resolution.HOUR, fill_forward=False, extended_market_hours=False )
To convert the OptionHistory
object to a DataFrame
that contains the trade and quote information of each contract and the underlying, use the data_frame
property.
option_history.data_frame
askclose | askhigh | asklow | askopen | asksize | bidclose | bidhigh | bidlow | bidopen | bidsize | close | high | low | open | volume | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
expiry | strike | type | symbol | time | |||||||||||||||
2024-03-15 | 4575.0 | 0 | ES YGT6I1W1ONB8|ES YGT6HGVF2SQP | 2024-01-02 10:00:00 | 262.0 | 316.50 | 248.75 | 256.0 | 1.0 | 247.25 | 257.25 | 187.25 | 253.50 | 1.0 | 254.625 | 286.875 | 218.000 | 254.750 | NaN |
2024-01-02 11:00:00 | 250.5 | 300.00 | 248.25 | 262.0 | 2.0 | 248.50 | 256.50 | 215.00 | 247.25 | 2.0 | 249.500 | 278.250 | 231.625 | 254.625 | NaN | ||||
2024-01-02 12:00:00 | 261.0 | 300.00 | 250.00 | 250.5 | 1.0 | 259.25 | 259.75 | 216.25 | 248.50 | 1.0 | 260.125 | 279.875 | 233.125 | 249.500 | NaN | ||||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | |
5215.0 | 1 | ES 32FX6NKT3COAS|ES YGT6HGVF2SQP | 2024-03-14 15:00:00 | 70.5 | 92.25 | 58.00 | 64.5 | 2.0 | 69.75 | 70.25 | 36.75 | 52.00 | 1.0 | 70.125 | 81.250 | 47.375 | 58.250 | NaN | |
2024-03-14 16:00:00 | 75.0 | 183.50 | 63.25 | 70.5 | 10.0 | 44.75 | 89.75 | 2.10 | 69.75 | 10.0 | 67.750 | 67.750 | 67.750 | 67.750 | 1.0 | ||||
2024-03-14 17:00:00 | 63.5 | 84.00 | 58.00 | 75.0 | 1.0 | 58.50 | 61.50 | 35.50 | 44.75 | 1.0 | 61.000 | 72.750 | 46.750 | 59.875 | NaN |
To get the expiration dates of all the contracts in an OptionHistory
object, call the method.
option_history.get_expiry_dates()

To get the strike prices of all the contracts in an OptionHistory
object, call the method.
option_history.get_strikes()

Examples
The following examples demonstrate some common practices for applying the Future Options dataset.
Example 1: Implied Volatility Line Chart
The following example plots a line chart on the implied volatility curve of the cloest expiring calls.
# Instantiate a QuantBook instance. qb = QuantBook() # Set the date being studied. date = datetime(2024, 1, 4) # Subscribe to the underlying Future. future = qb.add_future(Futures.Indices.SP_500_E_MINI) # Select an underlying Futures contract. For example, get the front-month contract. chain = list(qb.history[FutureUniverse](future.symbol, date, date+timedelta(2)))[0] futures_contract = list(chain)[0].symbol # Get the Options data for the selected Futures contract. option_history = qb.option_history( futures_contract, date - timedelta(1), date, Resolution.DAILY, fill_forward=False, extended_market_hours=False ) chain = list(option_history)[-1].OptionChains.values()[0] # Study the closest expiring contracts. expiry = min(x.expiry for x in chain) # Filter for the closest expiring calls to study only. filter_contracts = [x for x in chain if x.expiry == expiry and x.right == OptionRight.CALL] # Obtain the strike and IV for plotting the IV curve. iv_by_strike = pd.Series({x.strike: x.implied_volatility for x in filter_contracts}) iv_by_strike.plot(title=f"IV Curve of {futures_contract}", ylabel="Implied Volatility", xlabel="Strike")