book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

QuantConnect

US Future Option Universe

Introduction

The US Future Option Universe dataset by QuantConnect lists the available US Future Options contracts and the current open interest. The data covers 16 Monthly Future contracts, starting in January 2012, and is delivered on a daily update frequency. This dataset is created by monitoring the trading activity on the CME, CBOT, NYMEX, and COMEX markets.

This dataset does not contain market data. For market data, see US Future Options by AlgoSeek.

For more information about the US Future Option Universe dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

The following snippet demonstrates how to request data from the US Future Options Universe dataset:

Select Language:
future = self.add_future(Futures.Metals.GOLD, Resolution.MINUTE)
future.set_filter(0, 90)
self.add_future_option(future.symbol, lambda universe: universe.strikes(-1, 1))

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2012
Asset Coverage16 Monthly Future Contracts. Standard expires only*
Data DensityDense
ResolutionMinute, Hourly, & Daily
TimezoneNew York
Market HoursRegular and Extended
* No weeklies or 0DTE contracts.

Example Applications

The US Future Options dataset enables you to accurately design Future Option strategies. Examples include the following strategies:

  • Selling out of the money Future Option contracts to collect the premium that the Option buyer pays
  • Buying put Options to hedge against downward price movement in Future contracts you bought
  • Exploiting arbitrage opportunities that arise when the price of Option contracts deviate from their theoretical value

For more example algorithms, see Examples.

Data Point Attributes

The US Future Options Universe dataset provides OptionUniverse objects, which have the following attributes:

Supported Assets

To view the supported assets in the US Future Options Universe dataset, see the Data Explorer.

Requesting Data

To add US Future Options Universe data to your algorithm, call the add_future_option method. To define which contracts should be in your universe, specify the filter when requesting the FutureOption data.

The add_future_option method provides a daily stream of Option chain data. To get the most recent daily chain, call the option_chain method with the underlying Future Symbol. The option_chain method returns data on all the tradable contracts, not just the contracts that pass your universe filter.

Select Language:
class USFutureOptionsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        
        self.future = self.add_future(Futures.Metals.GOLD, Resolution.MINUTE)
        self.future.set_filter(0, 90)
        # Set our strike/expiry filter for this option chain
        self.add_future_option(self.future.symbol, self._option_filter)

    def on_data(self, slice: Slice) -> None:
        # Get the entire Option chain for the current day.
        symbol = Symbol.create_canonical_option(self.future.mapped)
        chain = self.option_chain(symbol, flatten=True).data_frame

    def _option_filter(self, universe: OptionFilterUniverse) -> OptionFilterUniverse:
        # Contracts can be filtered by strike, and expiration
        return universe.strikes(-1, 1)

The Future resolution must be less than or equal to the Future Option resolution. For example, if you set the Future resolution to minute, then you must set the Future Option resolution to minute, hour, or daily.

For more information about creating US Future Option Universes, see Future Options.

Accessing Data

For information about accessing US Future Options Universe data, see Future Options.

Historical Data

You can get historical US Future Options Universe data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Future Options Universe data in an algorithm, call the history method with the canonical mapped Future Option Symbol. This method returns data on all of the tradable contracts, not just the contracts that pass your universe filter. If there is no data in the period you request, the history result is empty.

Select Language:
self.future = self.add_future(Futures.Metals.GOLD, Resolution.MINUTE)
self.future.set_filter(0, 90)
self.add_future_option(self.future.symbol)

future_option_symbol = Symbol.create_canonical_option(self.future.mapped)
# DataFrame
history_df = self.history(future_option_symbol, timedelta(3), flatten=True)
# OptionUniverse objects
history = self.history[OptionUniverse](future_option_symbol, timedelta(3))

For more information about historical Equity Options Universe data in algorithms, see Historical Data.

Historical Data In Research

To get historical US Future Options Universe data in the Research Environment, call the history method with the canonical Option Symbol. This method returns data on all of the tradable contracts, not just the contracts that pass your universe filter.

Select Language:
qb = QuantBook()
future = qb.add_future(Futures.Metals.GOLD, Resolution.MINUTE)
future.set_filter(0, 90)
symbol = Symbol.create_canonical_option(future.mapped)
history = qb.history(symbol, datetime(2020, 6, 1), datetime(2020, 6, 5), flatten=True)

For more information about historical Future Options Universe data in the Research Environment, see Universes.

Example Applications

The US Future Options dataset enables you to accurately design Future Option strategies. Examples include the following strategies:

  • Selling out of the money Future Option contracts to collect the premium that the Option buyer pays
  • Buying put Options to hedge against downward price movement in Future contracts you bought
  • Exploiting arbitrage opportunities that arise when the price of Option contracts deviate from their theoretical value

For more example algorithms, see Examples.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: