AlgoSeek

US Index Options

Introduction

The US Index Options dataset by AlgoSeek covers European Option contracts for 3 US Indexes: SPX, VIX, and NDX. The dataset starts from June 2010 and is delivered on minute resolution. 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.

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.AddIndex('VIX').Symbol
option = self.AddIndexOption(self.index_symbol)
option.SetFilter(-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:

PropertyValue
Start DateJune 2010
Asset Coverage3 Index Options
Data DensityRegular
ResolutionMinute, Hourly, & Daily
TimezoneNew York

Supported Assets

To view the list of supported indices in the US Index Options dataset, see US Cash Indices.

Data Point Properties

The US Index Options dataset provides TradeBar and QuoteBar objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Requesting Data

To add US Index Options data to your algorithm, call the AddIndexOption 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.SetStartDate(2021, 1, 1);
        self.SetEndDate(2021, 6, 1);
        self.SetCash(1000000);
        
        self.index_symbol = self.AddIndex('VIX').Symbol
        option = self.AddIndexOption(self.index_symbol)
        option.SetFilter(-2, 2, 0, 90)
        self.option_symbol = option.Symbol
namespace QuantConnect
{
    public class IndexOptionsDataAlgorithm : QCAlgorithm
    {
    	private Symbol _indexSymbol;
    	private Symbol _optionSymbol;

        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            
            _indexSymbol = AddIndex("VIX").Symbol;
            var option = AddIndexOption(_indexSymbol);
            option.SetFilter(-2, 2, 0, 90);
            _optionSymbol = option.Symbol;
        }
    }
}

The Index resolution must be less than or equal to the Index Option resolution. Index Options only have minute resolution available, so the Index must have tick, second, or minute resolution.

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 OptionChains 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 OnData(self, slice: Slice) -> None:
    chain = slice.OptionChains.get(self.option_symbol)
    if chain:
        for contract in chain:
            self.Log(f"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}")
public override void OnData(Slice slice)
{
    if (slice.OptionChains.ContainsKey(_optionSymbol))
    {
        var chain = slice.OptionChains[_optionSymbol];
        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 OnData(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.OptionChains.items():
        for contract in chain:
            self.Log(f"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}")
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 History method with the Index Option contract Symbol. If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.History(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)
// TradeBar objects 
var historyTradeBars = History(contract.Symbol, 100, Resolution.Minute);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(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 for an entire Option chain, call the GetOptionHistory method with the canonical Option Symbol.

qb = QuantBook()
index_symbol = qb.AddIndex('VIX').Symbol
option = qb.AddIndexOption(index_symbol)
option.SetFilter(-2, 2, 0, 90)
history = qb.GetOptionHistory(option.Symbol, datetime(2020, 6, 1), datetime(2020, 6, 5))

all_history = history.GetAllData()
expiries = history.GetExpiryDates() 
strikes = history.GetStrikes()
// The GetOptionHistory method isn't currently available for C#
// To track the feature progress, subscribe to https://github.com/QuantConnect/Lean/issues/6489

To get historical data for a single US Index Option contract, call the History 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.

Data Point Attributes

The US Index Options dataset provides TradeBar and QuoteBar objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

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

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: