AlgoSeek
US Equity Options
Introduction
The US Equity Options data by AlgoSeek provides Option data, including prices, strikes, expires, and open interest. The data covers 4,000 Symbols, starts in January 2012, and is delivered on a minute frequency. This dataset is created by monitoring Options Price Reporting Authority (OPRA) data feed, which consolidates last sale and quotation information originating from the national securities exchanges that have been approved by the Securities and Exchange Commission.
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. The US Equity Options dataset also depends on the US Equity Option Universe dataset because the US Equity Options Universe dataset contains information on the available contracts and their daily Greeks and implied volatility values.
For more information about the US Equity Options dataset, including CLI commands and pricing, see the dataset listing.
About the Provider
AlgoSeek was in 2014 with the goal of providing the highest quality, most accurate, ready-to-use data in the financial data industry. AlgoSeek provides access to Equities, ETFs, ETNs, Equity Indices, Equity Options, Futures, and Future Options for quantitative firms and traders.
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(-2, +2, 0, 180)
var option = AddOption("GOOG"); _optionSymbol = option.Symbol; option.SetFilter(-2, +2, 0, 180);
Data Summary
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 2012* |
Asset Coverage | 4,000 Symbols |
Data Density | Dense |
Resolution | Minute, Hourly, & Daily |
Timezone | New York |
Market Hours | Regular Only |
* Some data is available before this date. In 2012, AlgoSeek started to fetch data from 48 OPRA channels instead of 24, increasing the quality of the data.
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 TradeBar, QuoteBar, and OpenInterest objects.
TradeBar Attributes
TradeBar objects have the following attributes:
QuoteBar Attributes
QuoteBar objects have the following attributes:
OpenInterest Attributes
OpenInterest 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.
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 # Request GOOG option data option = self.add_option("GOOG") self.option_symbol = option.symbol # Set our strike/expiry filter for this option chain option.set_filter(-2, +2, 0, 180)
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; // Request GOOG option data var option = AddOption("GOOG"); _optionSymbol = option.Symbol; // Set our strike/expiry filter for this option chain option.SetFilter(-2, +2, 0, 180); } } }
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 or Equity Options Universes.
Accessing Data
To get the current US Equity Options data, index the OptionChainsoption_chains property of the current Slice with the canonical Equity Option Symbol. Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Index Option at every time step. To avoid issues, call the Getget method.
def on_data(self, slice: Slice) -> None: # Get the wanted option chain with the canonical symbol chain = slice.option_chains.get(self.option_symbol) if chain: # Iterate the option contracts in chain for contract in chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice) { // Get the wanted option chain with the canonical symbol if (slice.OptionChains.TryGetValue(_optionSymbol, out var chain)) { // Iterate the option contracts in chain foreach (var contract in chain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } }
You can also iterate through all of the OptionChain objects in the current Slice.
def on_data(self, slice: Slice) -> None: # Iterate all option chains of all symbols for canonical_symbol, chain in slice.option_chains.items(): # Iterate the option contracts in chain for contract in chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice) { // Iterate all option chains of all symbols foreach (var kvp in slice.OptionChains) { var canonicalSymbol = kvp.Key; var chain = kvp.Value; // Iterate the option contracts in chain foreach (var contract in chain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } }
For more information about accessing US Equity Options data, see Handling Data.
Historical Data
You can get historical US Equity Options data in an algorithm and the Research Environment.
Historical Data In Algorithms
To get historical US Equity Options data in an algorithm, call the Historyhistory method with the Equity Option contract Symbol. If there is no data in the period you request, the history result is empty.
# DataFrame of trade and quote data history_df = self.history(contract.symbol, 100, Resolution.MINUTE) # DataFrame of open interest data history_oi_df = self.history(OpenInterest, contract.symbol, 100, Resolution.MINUTE) # TradeBar objects history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE) # QuoteBar objects history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE) # OpenInterest objects history_oi = self.history[OpenInterest](contract.symbol, 100, Resolution.MINUTE)
// TradeBar objects var historyTradeBars = History(contract.Symbol, 100, Resolution.Minute); // QuoteBar objects var historyQuoteBars = History<QuoteBar>(contract.Symbol, 100, Resolution.Minute); // OpenInterest objects var historyOpenInterest = History<OpenInterest>(contract.Symbol, 100, Resolution.Minute);
For more information about historical data in algorithms, see History Requests.
Historical Data In Research
To get historical US Equity Options data in the Research Environment, call the Historyhistory or OptionHistoryoption_history method. The Historyhistory method returns the price, volume, and open interest history for some given Option contract(s). The OptionHistoryoption_history method returns the price and volume history for the contracts that pass your daily universe filter.
qb = QuantBook() option = qb.add_option("GOOG") option.set_filter(-2, 2, 0, 90) history = qb.option_history(option.symbol.underlying, datetime(2020, 6, 1), datetime(2020, 6, 5)) history_df = history.data_frame expiries = history.get_expiry_dates() strikes = history.get_strikes()
var qb = new QuantBook(); var option = qb.AddOption("GOOG"); 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 arbitrary US Equity Option contracts instead of just the that pass your universe filter, 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 Key Concepts.
Historical Greeks and IV Data
To get historical data for the Greeks and implied volatility of Equity Options, see the US Equity Option Universe dataset.
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.