QuantConnect
US Equity Option Universe
Introduction
The US Equity Option Universe 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.
Example Applications
The US Equity Options Universe 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.
Supported Assets
To view the supported assets in the US Equity Options Universe dataset, see the Data Explorer.
Requesting Data
To add US Equity Options Universe data to your algorithm, call the add_option
method. Save a reference to the Equity Option Symbol
so you can access the data later in your algorithm. To define which contracts should be in your universe, call the set_filter
method of the Option object.
The add_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 Equity Symbol. The option_chain
method returns data on all the tradable contracts, not just the contracts that pass your universe filter.
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) # Get the entire Option chain for the current day. chain = self.option_chain(option.symbol.underlying, flatten=True).data_frame 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)
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 Universes, see Equity Options.
Accessing Data
For information about accessing US Equity Options Universe data, see Equity Options.
Historical Data
You can get historical US Equity Options Universe data in an algorithm and the Research Environment.
Historical Data In Algorithms
To get historical US Equity Options Universe data in an algorithm, call the history
method with the canonical Equity 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.
# DataFrame history_df = self.history(self.option_symbol, timedelta(3), flatten=True) # OptionUniverse objects history = self.history[OptionUniverse](self.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 Equity 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.
qb = QuantBook() option = qb.add_option("GOOG") history = qb.history(option.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5), flatten=True)
For more information about historical Equity Options Universe data in the Research Environment, see Universes.
Example Applications
The US Equity Options Universe 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.