QuantConnect

US Equity Option Universe

Introduction

The US Equity Option Chain Master dataset by QuantConnect lists the available US Equity Options contracts and the current Implied Volatility and Greeks. The data covers 4,000 Symbols, starts in January 2012, and is delivered on a daily update frequency. To create this dataset, we use our implementation of the forward tree pricing model, which accounts for the interest rate, dividend payments, and daily closing prices. The values in this dataset are the same values you can get from daily indicators with mirror Options.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes of the underlying security.

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

For more information about the US Equity 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 Equity Options dataset:

option = self.add_option("GOOG")
self.option_symbol = option.symbol
option.set_filter(lambda universe: universe.delta(0.4, 0.6))
var option = AddOption("GOOG");
_optionSymbol = option.Symbol;
option.SetFilter(universe => universe.delta(0.4m, 0.6m));

Data Summary

The following table describes the dataset properties:

Example Applications

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

  • Buying put Options to hedge against downward price movement in positive Equity positions
  • 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 Equity Options dataset provides OptionUniverse object.

OptionUniverse Attributes

OptionUniverse objects have the following attributes:

Supported Assets

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

Requesting Data

To add US Equity Options data to your algorithm, call the AddOptionadd_option method. Save a reference to the Equity Option Symbol so you can access the data later in your algorithm.

To set a contract filter, call the SetFilterset_filter method of the Option object.

class USEquityOptionsDataAlgorithm(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
        option = self.add_option("GOOG")
        self.option_symbol = option.symbol
        # Set our strike/expiry filter for this option chain
        option.set_filter(self._option_filter)

    def _option_filter(self, universe: OptionFilterUniverse) -> OptionFilterUniverse:
        # Contracts can be filtered by greeks, implied volatility, open interest:
        return universe \
            .delta(0.5, 1.5) \
            .gamma(0.0001, 0.0006) \
            .vega(0.01, 1.5) \
            .theta(-2.0, -0.5) \
            .rho(0.5, 3.0) \
            .implied_volatility(1, 3) \
            .open_interest(100,500)
namespace QuantConnect
{
    public class USEquityOptionsDataAlgorithm : QCAlgorithm
    {
        private Symbol _optionSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            // Requesting data
            var option = AddOption("GOOG");
            _optionSymbol = option.Symbol;
            // Set our strike/expiry filter for this option chain
            option.SetFilter(OptionFilter);
        }

        private virtual OptionFilterUniverse OptionFilter(OptionFilterUniverse universe)
        {
            // Contracts can be filtered by greeks, implied volatility, open interest:
            return universe
                .Delta(0.5m, 1.5m)
                .Gamma(0.0001m, 0.0006m)
                .Vega(0.01m, 1.5m)
                .Theta(-2.0m, -0.5m)
                .Rho(0.5m, 3.0m)
                .ImpliedVolatility(1.0m, 3.0m)
                .OpenInterest(100m, 500m);
        }
    }
}

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

For more information about creating US Equity Option subscriptions, see Requesting Data.

Accessing Data

For information about accessing US Equity Options data, see Handling Data.

Historical Data

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

Historical Data In Algorithms

To get historical US Index Options data in an algorithm, call the Historyhistory method with the Index Option chain Symbol. If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.option_symbol, 3, Resolution.MINUTE)
// TradeBar objects 
var history = History(option, 3, Resolution.Daily).ToList();

For more information about historical data in algorithms, see History Requests.

Historical Data In Research

To get historical US Index Options data in the Research Environment for an entire Option chain, call the OptionHistoryoption_history method with the canonical Option Symbol.

qb = QuantBook()
index_symbol = qb.add_index('VIX').symbol
option = qb.add_index_option(index_symbol) # or qb.add_index_option(index_symbol, "VIXW")
option.set_filter(-2, 2, 0, 90)
history = qb.option_history(option.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5))

all_history = history.get_all_data()
expiries = history.get_expiry_dates() 
strikes = history.get_strikes()
var qb = new QuantBook();
var indexSymbol = qb.AddIndex("VIX").Symbol;
var option = qb.AddIndexOption(indexSymbol); // or qb.AddIndexOption(indexSymbol, "VIXW");
option.SetFilter(-2, 2, 0, 90);
var history = qb.OptionHistory(option.Symbol, new DateTime(2020, 6, 1), new DateTime(2020, 6, 5));

var contracts = history.SelectMany(x => x.OptionChains.SelectMany(y => y.Value.Contracts.Keys)).Distinct().ToList();
var expiries = contracts.Select(x => x.ID.Date).Distinct().ToList();
var strikes = contracts.Select(x => x.ID.StrikePrice).Distinct().ToList();

To get historical data for a single US Index Option contract, call the Historyhistory method like you would in an algorithm but on the QuantBook object. For more information about historical data in the Research Environment, see Index Options.

Example Applications

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

  • Buying put Options to hedge against downward price movement in positive Equity positions
  • 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:
PropertyValue
Start DateJanuary 2012
Asset Coverage4,000 Symbols
Data DensityDense
ResolutionDaily
TimezoneNew York