AlgoSeek
US Index Options
Introduction
The US Index Options dataset by AlgoSeek provides Option data, including prices, strikes, expires, and open interest. The data covers European Option contracts for 3 US Indices: SPX, VIX, and NDX. It starts from January 2012 and is delivered on minute resolution. This dataset is created by monitoring the 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.
The US Index Options dataset depends on the US Index Option Universe dataset because the US Index Options Universe dataset contains information on the available contracts, including their daily Greeks and implied volatility values.
For more information about the US Index Options dataset, including CLI commands and pricing, see the dataset listing.
About the Provider
AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com.
Getting Started
The following snippet demonstrates how to request data from the US Index Options dataset:
self.index_symbol = self.add_index('VIX').symbol option = self.add_index_option(self.index_symbol) option.set_filter(-2, 2, 0, 90) self.option_symbol = option.symbol
_indexSymbol = AddIndex("VIX").Symbol; var option = AddIndexOption(_indexSymbol); option.SetFilter(-2, 2, 0, 90); _optionSymbol = option.Symbol;
Data Summary
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 2012 |
Asset Coverage | 7 Index Options |
Data Density | Regular |
Resolution | Minute, Hourly, & Daily |
Timezone | New York |
Market Hours | Regular Only |
Specification Over Time
According to the SPX Options contract specification, some SPX contracts expire every month and SPXW contracts expires every day. Before 2021, you could only trade SPX contracts with the following expiration dates:
- Expires within the next 4 months
- Expires in September within the next 14 months
- Expires in January, March, or June within the next 2 years
- Expires in December within the next 3 years
During this time, SPXW didn't have 0DTE every day.
Sources:
- Cboe Options Exchange to List Three Long-Dated SPX Options Expirations, Beginning November 1, 2021
- S&P 500 Weekly Options Now Expire Five Days a Week
Example Applications
The US Index Options dataset enables you to accurately design strategies for Index Options. Examples include the following strategies:
- Buying VIX call Options to hedge against upcoming volatility
- Buying VIX put Options to capture the natural downward price movement in the VIX index
- Buying SPX put Options to protect against downward price movement in the S&P 500
For more example algorithms, see Examples.
Data Point Attributes
The US Index 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
The following table shows the available Index Options:
Underlying Index | Underlying Ticker | Target Ticker | Standard Contracts | Weekly Contracts | Tradable on Expiry Day |
---|---|---|---|---|---|
S&P500 | VIX | ||||
S&P500 | VIX | VIXW | |||
S&P500 | SPX | ||||
S&P500 | SPX | SPXW | |||
NASDAQ-100 | NDX | ||||
NASDAQ-100 | NDX | NDXP | |||
NASDAQ-100 | NDX | NQX |
For more information about each underlying Index, see Supported Indices.
Requesting Data
To add US Index Options data to your algorithm, call the AddIndexOptionadd_index_option method. Save a reference to the Index Option Symbol so you can access the data later in your algorithm.
class IndexOptionsDataAlgorithm(QCAlgorithm): def initialize(self) -> None: self.set_start_date(2021, 1, 1); self.set_end_date(2021, 6, 1); self.set_cash(1000000); self.universe_settings.asynchronous = True self.index_symbol = self.add_index('VIX').symbol standard_option = self.add_index_option(self.index_symbol) standard_option.set_filter(-2, 2, 0, 90) self.standard_option_symbol = standard_option.symbol weekly_option = self.add_index_option(self.index_symbol, "VIXW") weekly_option.set_filter(-2, 2, 0, 90) self.weekly_option_symbol = weekly_option.symbol
namespace QuantConnect { public class IndexOptionsDataAlgorithm : QCAlgorithm { private Symbol _indexSymbol, _standardOptionSymbol, _weeklyOptionSymbol; public override void Initialize() { SetStartDate(2021, 1, 1); SetEndDate(2021, 6, 1); SetCash(100000); UniverseSettings.Asynchronous = True; _indexSymbol = AddIndex("VIX").Symbol; var standardOption = AddIndexOption(_indexSymbol); standardOption.SetFilter(-2, 2, 0, 90); _standardOptionSymbol = standardOption.Symbol; var weeklyOption = AddIndexOption(_indexSymbol, "VIXW"); weeklyOption.SetFilter(-2, 2, 0, 90); _weeklyOptionSymbol = weeklyOption.Symbol; } } }
The Index resolution must be less than or equal to the Index Option resolution. For example, if you set the Index resolution to minute, then you must set the Index Option resolution to minute, hour, or daily.
For more information about creating US Index Option subscriptions, see Requesting Data or Index Options Universes.
Accessing Data
To get the current US Index Options data, index the OptionChainsoption_chains property of the current Slice with the canonical Index 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.
def on_data(self, slice: Slice) -> None: standard_chain = slice.option_chains.get(self.standard_option_symbol) if standard_chain: for contract in standard_chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}") weekly_chain = slice.option_chains.get(self.weekly_option_symbol) if weekly_chain: for contract in weekly_chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice) { if (slice.OptionChains.ContainsKey(_standardOptionSymbol)) { var standardChain = slice.OptionChains[_standardOptionSymbol]; foreach (var contract in standardChain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } if (slice.OptionChains.ContainsKey(_weeklyOptionSymbol)) { var weeklyChain = slice.OptionChains[_weeklyOptionSymbol]; foreach (var contract in weeklyChain) { 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: for canonical_symbol, chain in slice.option_chains.items(): for contract in chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice) { foreach (var kvp in slice.OptionChains) { var canonicalSymbol = kvp.Key; var chain = kvp.Value; foreach (var contract in chain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } }
For more information about accessing US Index 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 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 Index 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() 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)) history_df = history.data_frame 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 arbitrary US Index 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 Index Options, see the US Index Option Universe dataset.
Example Applications
The US Index Options dataset enables you to accurately design strategies for Index Options. Examples include the following strategies:
- Buying VIX call Options to hedge against upcoming volatility
- Buying VIX put Options to capture the natural downward price movement in the VIX index
- Buying SPX put Options to protect against downward price movement in the S&P 500
For more example algorithms, see Examples.