Terminal
↑↓ to select, press enter to go, use esc to exit
  • Pricing
  • Strategy Explorer Strategies Strategies
  • Research Research Research
  • Data
  • Documentation Docs Docs
  • Algorithm Lab Lab Lab
  • Sign In

Terminal

    Platform

  • Pricing
  • Strategy Explorer
  • Research
  • Datasets
  • Documentation
  • Algorithm Lab

    SIGN IN

  • Sign in
  • Don't have an account? Join QuantConnect Today

  • Sign up for Free

Welcome to
Algorithm Lab

We are dedicated to providing investors with a cutting-edge platform for rapidly creating quant investment strategies. Founded in 2012, we've empowered more than 250,000 quants and engineers to create and trade their ideas.

Terminal image Terminal image
Your Quantitative Foundation

Learning Center

Quickly and easily started with our API to build your strategy. The learning center lessons are interactive, step-by-step guides to make you productive as fast as possible.

BootCamp BootCamp
Explore Free and Paid Datasets

Vast Datasets

Focus your efforts on driving alpha, not parsing CSV files. Our cloud offers hundreds of terabytes of traditional and alternative data preformatted, cleaned, and instantly accessible by our API.

Datasets Datasets
Collaborate with Your Team

Organizations

Coordinate teamwork, control access permissions, and your shared cloud resources. Grow your trading organization safely and efficiently on top of our cloud architecture.

Organizations
Jumpstart Your Algorithm Development

Strategy Explorer

A selection of streaming live-trading strategies written by QuantConnect, and top highlights from the community available to follow and clone. Peer into detailed real-time positions to gain insight for your own trading.

Strategy Explorer Strategy Explorer


Loading Algorithm Lab v3.0...
  • my-projects my-projects
    my-projects my-projects
    Projects
  • my-projects my-projects
    my-projects my-projects
    Organization
  • my-projects my-projects
    my-projects my-projects
    Learning Center
  • my-projects my-projects
    my-projects my-projects
    Datasets
  • Strategy Explorer Strategy Explorer
    Strategy Explorer Strategy Explorer
    Strategies
  • my-projects my-projects
    my-projects my-projects
    Support
  •  
close lesson close lesson
search icon search icon
  • Learning Center Home Learning Center Home All Courses
  • My courses in progress My courses in progress In Progress
  • My courses Completed My courses Completed Completed
  • My Wish List My Wish List Wish List
  • My Wish List My Wish List Articles

What is Boot Camp?

Boot Camp is a great way to improve your skills and learn the QuantConnect API in easily digestible portions.

Learning Center

Your Quantitative Foundation

A collection of courses from independent educators to improve your quant skill base and create better strategies.

Available Courses

Solidify and expand your quant skill base with courses at QuantConnect

Boot Camp 101 / US Equities

Learn algorithmic trading with python for US Equities. Guided strategy development in easily digestible portions.

Author: QuantConnect

Free  |  97,049 People Enrolled

Boot Camp 102 / FOREX

Learn algorithmic trading with python for FX. Guided strategy development in easily digestible portions.

Author: QuantConnect

Free  |  20,757 People Enrolled

Boot Camp 103 / Futures

Learn algorithmic trading with python for Futures. Guided strategy development in easily digestible portions.

Author: QuantConnect

Free  |  7,594 People Enrolled

Algorithmic Trading A-Z | The Complete Course

In this algorithmic trading tutorial series you will learn everything you need to know to start writing your own trading bots using Python and the QuantConnect quantitative trading platform.

Author: Louis

Free  |  29,425 People Enrolled

Complete Algorithmic Trading Course

Master algorithmic trading on QuantConnect; backtest and live trade Stocks, Options, Futures, Forex, and Crypto.

Author: Cheng Li

Paid  |  Enroll on Udemy

Python for Finance and Algorithmic Trading with QuantConnect

Learn to use Python, Pandas, Matplotlib, and the QuantConnect Lean Engine to perform financial analysis and trading.

Author: Jose Portilla, Pierian Training

Paid  |  Enroll on Udemy

Crypto Trading with QuantConnect (C#)

Learn to write programs that algorithmically trade cryptocurrencies using QuantConnect (C#).

Author: Eric Summers

Paid  |  Enroll on Udemy

List Your Course List Your Course

List Your Course

Choose a Template
Close Menu Close Menu

Basic

  • Use Default Template

Use Strategy Explorer Template

Profile Image

Quant Developer

FREE UPGRADE

Start

  • create new algorithm create new algorithm New Algorithm
  • open project open project Open Project
  • open project open project Explore Strategies

Resources

Notes icons

Organization Notes

start icon

Get Started with Algorithm Lab

Close Widget Close Widget
  • Signed Up
  • Create a Project Complete Task Complete Task
  • Backtest Your Project Complete Task Complete Task
  • Live Deploy Your Project Complete Task Complete Task
research icon

New Research

Portfolio Construction Using Topological Data Analysis

Harnessing topological techniques to diversify SPY constituents by clustering top constituents to reduce correlation risk and drawdown....

Read

News & Releases

announce icon

New Announcement

Quant League Q1 2025 Results: Triton Quantitative Trading Takes the 1st Place!

Read
roadmap icon

Upcoming Roadmap

  • UPVOTE

76 Walk Forward Optimization

View All
Online Members
+ Add Members
Quick Links
Research Community Quant League Documentation Learn

Begin Your QuantConnect Journey

Algorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.

Sign Up for Free

Already have an account Log In.

Your Account

Summary

PROJECTS

BACKTESTS

LIVE VOLUME

PUBLIC ALGORITHMS

LIVE DEPLOYMENTS

LINES OF CODE

Account Settings

What is your preferred language?
What is your preferred color theme?
Subscriptions
Manage Email Subscriptions

Terminal Settings

Security

Change Password Deactivate 2FA Authentication

This account is protected by two-factor authentication.

Request Token Information Reset My Token
Active Sessions
Created Last Time Used Agent  

No entries found

Do you really want to cancel the subscription ?
Please, first downgrade to free all your organizations.
Ok
Do you really want to delete your account ?

To continue please enter your email:

Set up Google Authenticator

(No google account required)

First Install the Required Application

  1. 1. On your phone go to Google Play Store (Android) or Apple Store (iPhone)
  2. 2. Search for Google Authenticator
  3. 3. Download and install the application

Now open the Google Authenticator Application

  1. 4.- In the application, touch 'Begin Setup'
  2. 5.- Select 'Scan barcode'
  3. 6.- Using your phone camera scan this barcode

Final Verification

To verify that everything goes well please enter the 6 digit verification code generated by the authenticator application

Begin Your QuantConnect Journey

Algorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.

Sign Up for Free

Already have an account Log In.

data Manager View
Requesting coding environment...

No Coding Session Available No Coding Session Available Retry


Please stop one of the following coding sessions, or upgrade your account.

NAME ORGANIZATION

Upgrade Coding Environment

QuantConnect Datasets

Datasets

  • all datasets all datasets All Datasets 0
  • list datasets list datasets List Dataset
  • list datasets list datasets Data Issues +99
  • status status Data Status
  • sales report sales report Sales Report
  • All
  • Geospatial Data
  • Commerce Data
  • Financial Market Data
  • Consumer Data
  • B2B Data
  • Transport and Logistics Data
  • Environmental Data
  • Credit Rating Data
  • Real Estate Data
  • Web Data
  • Legal Data
  • Healthcare Data
  • Entertainment Data
  • Energy Data
  • Industry Data
  • Political Data
  • News and Events

Datasets > US Equity Options

Datasets

Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.

select icon select icon
select icon select icon
select icon select icon
 
List Dataset

New

US Equity Security Master

Corporate action data source for splits, dividends, mergers, acquisitions, IPOs, and delistings.

  • 27,500 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

US Futures Security Master

Rolling reference data for popular CME Futures contracts.

  • 162 Future Contracts
  • May 2009
  • Free in Cloud
Learn More
New

US Equity Coarse Universe

Universe of all US Equities with closing price and volume for Coarse Universe Selection.

  • 30,000 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

US ETF Constituents

Equity constituent components and weightings for US ETF listings. This data is ideal for universe selection without selection bias.

  • 2,650 US ETF Listings
  • June 2009
  • Free in Cloud
Learn More
New

International Future Universe

FESX, HSI, and NKD Futures universe for fast future contract selection with prices, expiration dates and open interests

  • 3 contracts
  • July 1998
  • Free in Cloud
Learn More
New

US Future Option Universe

Future Options universe for fast option contract selection.

  • 16 Monthly Future Contracts
  • January 2012
  • Free in Cloud
Learn More
New

US Future Universe

Futures universe for fast future contract selection with prices, expiration dates and open interests

  • 162 Most Liquid Futures
  • May 2009
  • Free in Cloud
Learn More
New

US Equity Option Universe

Precalculated daily greeks for fast option-contract selection.

  • 4,000 Equity Options
  • January 2012
  • Free in Cloud
Learn More
New

US Index Option Universe

Precalculated Daily Greeks for Fast Option Selection

  • 7 Index Options
  • January 2012
  • Free in Cloud
Learn More
New

US Equities Short Availability

Available shares for open short positions in the US Equity market.

  • 10,500 US Equities
  • January 2018
  • Free in Cloud
Learn More
New

US Fundamental Data

Corporate Fundamental data for fine universe selection based on industry classification and underlying company performance indicators.

  • 8,000 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

US Equities

Market data for all US listed and delisted Equities, ETFs, ETNs, ADRs, and Warrants.

  • 27,500 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

US Equity Options

Trade and quote data for US Equity Options contracts.

  • 4,000 Equity Options
  • January 2012
  • Free in Cloud
Learn More
New

US Futures

Trade and quote data for the most liquid US Futures across the CME, CBOT, NYMEX, and COMEX markets.

  • 162 Most Liquid Futures
  • May 2009
  • Free in Cloud
Learn More
New

US Future Options

Future Options data for the most liquid US CME Future commodity contracts.

  • 16 Monthly Future Contracts
  • January 2012
  • Free in Cloud
Learn More
New

US Index Options

European Option contract data for 3 US Indices: SPX, VIX, and NDX.

  • 7 Index Options
  • January 2012
  • Free in Cloud
Learn More
New

International Futures

Trade and quote data for FESX, HSI, and NKD Future Contracts.

  • 3 Contracts
  • July 1998
  • Free in Cloud
Learn More
New

Benzinga News Feed

Financial articles and news publications condensed into a news feed with titles and article bodies for sentiment analysis

  • 1,250 Posts/Day, 8,000 Stocks
  • 1st January 2016
  • From $120/mo
Learn More
New

Tiingo News Feed

News releases from 120 different news providers for sentiment analysis.

  • 10,000 US Equities
  • January 2014
  • Free in Cloud
Learn More
New

Upcoming Earnings

Alert for upcoming earnings report of US Equities with report date, report time, and earnings estimation.

  • 27,500 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

Upcoming IPOs

Alert for upcoming IPO events of primary US Equities with IPO start/filing/amended date, IPO deal type. IPO prices, and number of shares.

  • US Equities
  • February 2013
  • Free in Cloud
Learn More
New

Upcoming Splits

Alert for upcoming split and reverse split events of primary US Equities common shares with split date, and split factor.

  • 27,500 US Equities
  • January 2010
  • Free in Cloud
Learn More
New

Economic Events

Alert for upcoming economic events globally, including the date and estimates of macroeconomic indicator annoucement, special dates, etc.

  • 115 Countries
  • January 2019
  • Free in Cloud
Learn More
New

US Congress Trading

Trading activity of Congresspeople for potential insider trading signals based on early access to regulation changes.

  • 1,800 US Equities
  • January 2016
  • From $5/User/mo
Learn More
New

WallStreetBets

Mentions of US Equities on the r/wallstreetbets subreddit.

  • 6,000 US Equities
  • August 2018
  • From $5/User/mo
Learn More
New

Corporate Buybacks

US Equity buyback announcements and transactions scraped from SEC reports and secondary sources.

  • 3,000 US Equities
  • May 2015
  • From $20/User/mo
Learn More
New

US Regulatory Alerts - Financial Sector

RegAlytics is the leading provider of daily regulatory updates. They source data from over 5,000 regulators.

  • 400,000 Alerts
  • January 2020
  • From $10/mo
Learn More
New

Brain Sentiment Indicator

Proprietary sentiment analysis algorithm for US Equities.

  • 4,500 US Equities
  • August 2016
  • From $10/mo
Learn More
New

Brain ML Stock Ranking

Proprietary machine learning ranking algorithm for US Equities.

  • 1,000 US Equities
  • January 2010
  • From $10/mo
Learn More
New

Brain Language Metrics on Company Filings

Proprietary NLP algorithm that monitors several language metrics on company reports.

  • 3,000 US Equities
  • January 2010
  • From $10/mo
Learn More
New

Estimize

Estimates of company financials including EPS, revenues, and macroeconomic indicators based on 100,000+ crowdsourced predictions.

  • 2,800 US Equities
  • January 2011
  • $75/mo
Learn More
New

True Beats

Predictions of EPS and Revenues for US Equities based on expert opinions, peer opinions, and historical performance.

  • Over 5,000 US Equities
  • January 2000
  • $75/mo
Learn More
New

Tactical

Likelihood score of short-term price movements driven by technical indicators.

  • Over 5,000 US Equities
  • January 2000
  • $75/mo
Learn More
New

Cross Asset Model

Scoring algorithm based on put-call spread of Equity Options, volatility skewness, and volume.

  • Over 3,000 US Equities
  • July 2005
  • $75/mo
Learn More
New

Composite Factor Bundle

Daily proprietary signals for quality, value, momentum, growth, and low volatility factors, which are used by the leading quant funds.

  • 8,000 US Equities
  • January 2003
  • From $39/mo
Learn More
New

CNBC Trading

CNBC Trading tracks the recommendations made by media personalities on CNBC.

  • 1,515 US Equities
  • December 2020
  • From $5/User/mo
Learn More
New

US Government Contracts

Use the USASpending.gov API to track government contracts granted to publicly traded companies.

  • 748 US Equities
  • October 2019
  • From $5/User/mo
Learn More
New

Corporate Lobbying

Lobbying activities of companies to political or legislative figures, including clients, issues concerned, and amount paid.

  • 1,418 US Equities
  • January 1999
  • From $5/User/mo
Learn More
New

Insider Trading

Insider Trading tracks trades made by the own company executives, implying if they were bullish or bearish on their own companies.

  • 4994 US Equities
  • 25 April 2014
  • From $5/User/mo
Learn More
New

US SEC Filings

Semi-parsed Quarterly Financial Reports (10-Q) and Annual Financial Report (8-K) filings of companies for US Equities.

  • 15,000 US Equities
  • January 1998
  • Free in Cloud
Learn More
New

US Federal Reserve (FRED)

Collection of thousands of economic datasets maintained by the US Government.

  • 560 Datasets
  • January 1999
  • Free
Learn More
New

Data Link

Nasdaq Data Link, previously known as Quandl, is a premier marketplace for financial, economic, and alternative data sets.

  • More than 20 million datasets
  • Various
  • Free in Cloud
Learn More
New

Bybit Crypto Price Data

Trade and quote data for the Bybit Crypto exchange, collected by CoinAPI.

  • 721 Currency Pairs
  • April 2022
  • Price Update II
Learn More
New

Bybit Crypto Future Price Data

Trade and quote data for the Bybit Crypto Future exchanges, collected by CoinAPI.

  • 433 Crypto Future Pairs
  • October 2019
  • Free in Cloud
Learn More
New

Bybit Crypto Future Margin Rate Data

Margin interest rate data for the Bybit Crypto Future exchanges, collected by QuantConnect.

  • 433 Crypto Future Pairs
  • August 2020
  • Price CTA
Learn More
New

FOREX Data

Quote data for Forex pairs.

  • 71 Currency Pairs
  • January 2007
  • Free in Cloud
Learn More
New

CFD Data

Quote data for Contracts for Difference (CFD).

  • 51 Contracts
  • May 2002
  • Free in Cloud
Learn More
New

Coinbase Crypto Price Data

Trade and quote data for the Coinbase Pro Crypto exchange, collected by CoinAPI.

  • 860 Currency Pairs
  • January 2015
  • Free in Cloud
Learn More
New

Bitfinex Crypto Price Data

Trade and quote data for the Bitfinex Crypto exchange, collected by CoinAPI.

  • 383 Currency Pairs
  • January 2013
  • Free in Cloud
Learn More
New

Binance Crypto Price Data

Trade and quote data for the Binance Crypto exchange, collected by CoinAPI.

  • 2,684 Currency Pairs
  • July 2017
  • Free in Cloud
Learn More
New

Kraken Crypto Price Data

Trade and quote data for the Kraken Crypto exchange, collected by CoinAPI.

  • 710 Currency Pairs
  • October 2013
  • Free in Cloud
Learn More
New

Binance US Crypto Price Data

Trade and quote data for the Binance US Crypto exchange, collected by CoinAPI.

  • 541 Cryptocurrency pairs
  • October 2019
  • Free in Cloud
Learn More
New

Binance Crypto Future Price Data

Trade and quote data for the Binance Crypto Future exchanges, collected by CoinAPI.

  • 421 Crypto Future Pairs
  • August 2020
  • Free in Cloud
Learn More
New

Binance Crypto Future Margin Rate Data

Margin interest rate data for the Binance Crypto Future exchanges, collected by QuantConnect.

  • 421 Crypto Future Pairs
  • August 2020
  • Free in Cloud
Learn More
New

US Interest Rate

Primary credit rate from the Federal Open Market Committee (FOMC)

  • 1 Country: US
  • January 2003
  • Price CTA
Learn More
New

Macroeconomics Indicators

39 Macroeconomic Indicators data for 249 countries/regions, including the date, value, and frequency.

  • 39 Indicators, 249 Countries/Regions
  • January 1998
  • Free in Cloud
Learn More
New

Upcoming Dividends

Alert for upcoming dividend events of primary US Equities common shares with dividend important dates, and dividend per share.

  • 27,500 US Equities
  • January 2015
  • Free in Cloud
Learn More
New

US Energy Information Administration (EIA)

Supply and demand information for US Crude Products.

  • 190 Datasets
  • January 1991
  • Free
Learn More
New

US Treasury Yield Curve

Yield curve rates for US Government bonds over all common maturity dates. The data is scraped from the US Treasury website.

  • US Daily Treasury Yield Rates
  • January 1990
  • Free
Learn More
New

VIX Central Contango

Contango rates over time for the VIX Contract. The data is provided by VIXCentral and cached by QuantConnect.

  • 1 Dataset
  • June 2010
  • Free
Learn More
New

VIX Daily Price

Daily export of OHLC daily price for VIX-related products. The data is supplied by the CBOE and cached by QuantConnect.

  • 18 Datasets
  • January 1990
  • Free
Learn More
New

Cash Indices

Price data for 125 US Cash indices and 2 international indices (HSI and SX5E). This data provides the underlying price for Index Options of NDX, SPX, RUT, and VIX.

  • 125 US indices and 3 International indices
  • January 1998
  • Free in Cloud
Learn More
New

Bitcoin Metadata

Bitcoin processing fundamental data such as hash rate, miner revenue, and number of transactions.

  • Bitcoin blockchain
  • Jan 2009
  • Free in Cloud
Learn More
New

Crypto Market Cap

Cryptocurrencies market cap data is provided by CoinGecko and cached by QuantConnect.

  • 620 cryptocurrencies
  • 28 April 2013
  • Free Research
Learn More
 
resources-icon
Datasets Browse Available Datasets

Datasets >

Dashboard

Data Sale Reports

  • 2025 - May
  • 2025 - April
  • 2025 - March
  • 2025 - February
  • 2025 - January
  • 2024 - December
  • 2024 - November
  • 2024 - October
  • 2024 - September
  • 2024 - August
  • 2024 - July
  • 2024 - June
  • 2024 - May
  • 2024 - April
  • 2024 - March
  • 2024 - February
  • 2024 - January
  • 2023 - December
  • 2023 - November
  • 2023 - October
  • 2023 - September
  • 2023 - August
  • 2023 - July
  • 2023 - June
  • 2023 - May

Datasets Manual Subscriptions

 

 



Data Issues

A transparent, community reporting system. Report suspected issues with our cloud data to be investigated by the QuantConnect Team.

search icon search icon
  • Issues
  • Issue
  • Report Issue

Issue List

Loading...

  • Page of 1

Data Explorer Issues are a way to report and track data problems. They give the QuantConnect community a way to discuss potential solutions and be notified when they are resolved. If you think you have found a data problem please check the existing open and closed issues first; often another user may have already reported your problem.

Issue Type

Does your issue match any of the already listed issues?

Thank you for your contribution! Our team is currently working on resolving these issues, please subscribe to them to receive updates.










Datasets >

US Equity Options

dataset-logo
dataset-logo

US Equity Options

Dataset by AlgoSeek

  • About
  • Documentation
  • Research
  • Examples
  • Licenses
  • CLI
  • Pricing

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 following datasets:

  • US Equity Security Master - data on splits, dividends, and symbol changes for the underlying Equities.
  • US Equity Option Universe - data on the available contracts and their daily Greeks and implied volatility values.
  • US Equities - trade and quote data on the underlying Equities.

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:

Select Language:
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 deviates 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:

TradeBar
    Volume:
  • volume: decimal
  • Opening price of the bar: Defined as the price at the start of the time period.
  • open: decimal
  • High price of the TradeBar during the time period.
  • high: decimal
  • Low price of the TradeBar during the time period.
  • low: decimal
  • Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
  • close: decimal
  • The closing time of this bar, computed via the Time and Period
  • end_time: DateTime
  • The period of this trade bar, (second, minute, daily, ect...)
  • period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal
    Volume:
  • Volume: decimal
  • Opening price of the bar: Defined as the price at the start of the time period.
  • Open: decimal
  • High price of the TradeBar during the time period.
  • High: decimal
  • Low price of the TradeBar during the time period.
  • Low: decimal
  • Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
  • Close: decimal
  • The closing time of this bar, computed via the Time and Period
  • EndTime: DateTime
  • The period of this trade bar, (second, minute, daily, ect...)
  • Period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • DataType: MarketDataType
  • True if this is a fill forward piece of data
  • IsFillForward: bool
  • Current time marker of this data packet.
  • Time: DateTime
  • Symbol representation for underlying Security
  • Symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • Value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • Price: decimal

QuoteBar Attributes

QuoteBar objects have the following attributes:

QuoteBar
    Average bid size
  • last_bid_size: decimal
  • Average ask size
  • last_ask_size: decimal
  • Bid OHLC
  • bid: Bar
  • Ask OHLC
  • ask: Bar
  • Opening price of the bar: Defined as the price at the start of the time period.
  • open: decimal
  • High price of the QuoteBar during the time period.
  • high: decimal
  • Low price of the QuoteBar during the time period.
  • low: decimal
  • Closing price of the QuoteBar. Defined as the price at Start Time + TimeSpan.
  • close: decimal
  • The closing time of this bar, computed via the Time and Period
  • end_time: DateTime
  • The period of this quote bar, (second, minute, daily, ect...)
  • period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal
    Average bid size
  • LastBidSize: decimal
  • Average ask size
  • LastAskSize: decimal
  • Bid OHLC
  • Bid: Bar
  • Ask OHLC
  • Ask: Bar
  • Opening price of the bar: Defined as the price at the start of the time period.
  • Open: decimal
  • High price of the QuoteBar during the time period.
  • High: decimal
  • Low price of the QuoteBar during the time period.
  • Low: decimal
  • Closing price of the QuoteBar. Defined as the price at Start Time + TimeSpan.
  • Close: decimal
  • The closing time of this bar, computed via the Time and Period
  • EndTime: DateTime
  • The period of this quote bar, (second, minute, daily, ect...)
  • Period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • DataType: MarketDataType
  • True if this is a fill forward piece of data
  • IsFillForward: bool
  • Current time marker of this data packet.
  • Time: DateTime
  • Symbol representation for underlying Security
  • Symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • Value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • Price: decimal

OpenInterest Attributes

OpenInterest objects have the following attributes:

OpenInterest
    Type of the Tick: Trade or Quote.
  • tick_type: TickType
  • Quantity exchanged in a trade.
  • quantity: decimal
  • Exchange code this tick came from QuantConnect.Exchanges
  • exchange_code: string
  • Exchange name this tick came from QuantConnect.Exchanges
  • exchange: string
  • Sale condition for the tick.
  • sale_condition: string
  • For performance parsed sale condition for the tick.
  • parsed_sale_condition: UInt32
  • Bool whether this is a suspicious tick
  • suspicious: bool
  • Bid Price for Tick
  • bid_price: decimal
  • Asking price for the Tick quote.
  • ask_price: decimal
  • Alias for "Value" - the last sale for this asset.
  • last_price: decimal
  • Size of bid quote.
  • bid_size: decimal
  • Size of ask quote.
  • ask_size: decimal
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • The end time of this data. Some data covers spans (trade bars) and as such we want to know the entire time span covered
  • end_time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal

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.

Select Language:
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.

Select Language:
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.

Select Language:
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.

Select Language:
# 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.

Select Language:
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.

Data Point Attributes

The US Equity Options dataset provides TradeBar, QuoteBar, and OpenInterest objects.

TradeBar Attributes

TradeBar objects have the following attributes:

TradeBar
    Volume:
  • volume: decimal
  • Opening price of the bar: Defined as the price at the start of the time period.
  • open: decimal
  • High price of the TradeBar during the time period.
  • high: decimal
  • Low price of the TradeBar during the time period.
  • low: decimal
  • Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
  • close: decimal
  • The closing time of this bar, computed via the Time and Period
  • end_time: DateTime
  • The period of this trade bar, (second, minute, daily, ect...)
  • period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal
    Volume:
  • Volume: decimal
  • Opening price of the bar: Defined as the price at the start of the time period.
  • Open: decimal
  • High price of the TradeBar during the time period.
  • High: decimal
  • Low price of the TradeBar during the time period.
  • Low: decimal
  • Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
  • Close: decimal
  • The closing time of this bar, computed via the Time and Period
  • EndTime: DateTime
  • The period of this trade bar, (second, minute, daily, ect...)
  • Period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • DataType: MarketDataType
  • True if this is a fill forward piece of data
  • IsFillForward: bool
  • Current time marker of this data packet.
  • Time: DateTime
  • Symbol representation for underlying Security
  • Symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • Value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • Price: decimal

QuoteBar Attributes

QuoteBar objects have the following attributes:

QuoteBar
    Average bid size
  • last_bid_size: decimal
  • Average ask size
  • last_ask_size: decimal
  • Bid OHLC
  • bid: Bar
  • Ask OHLC
  • ask: Bar
  • Opening price of the bar: Defined as the price at the start of the time period.
  • open: decimal
  • High price of the QuoteBar during the time period.
  • high: decimal
  • Low price of the QuoteBar during the time period.
  • low: decimal
  • Closing price of the QuoteBar. Defined as the price at Start Time + TimeSpan.
  • close: decimal
  • The closing time of this bar, computed via the Time and Period
  • end_time: DateTime
  • The period of this quote bar, (second, minute, daily, ect...)
  • period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal
    Average bid size
  • LastBidSize: decimal
  • Average ask size
  • LastAskSize: decimal
  • Bid OHLC
  • Bid: Bar
  • Ask OHLC
  • Ask: Bar
  • Opening price of the bar: Defined as the price at the start of the time period.
  • Open: decimal
  • High price of the QuoteBar during the time period.
  • High: decimal
  • Low price of the QuoteBar during the time period.
  • Low: decimal
  • Closing price of the QuoteBar. Defined as the price at Start Time + TimeSpan.
  • Close: decimal
  • The closing time of this bar, computed via the Time and Period
  • EndTime: DateTime
  • The period of this quote bar, (second, minute, daily, ect...)
  • Period: TimeSpan
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • DataType: MarketDataType
  • True if this is a fill forward piece of data
  • IsFillForward: bool
  • Current time marker of this data packet.
  • Time: DateTime
  • Symbol representation for underlying Security
  • Symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • Value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • Price: decimal

OpenInterest Attributes

OpenInterest objects have the following attributes:

OpenInterest
    Type of the Tick: Trade or Quote.
  • tick_type: TickType
  • Quantity exchanged in a trade.
  • quantity: decimal
  • Exchange code this tick came from QuantConnect.Exchanges
  • exchange_code: string
  • Exchange name this tick came from QuantConnect.Exchanges
  • exchange: string
  • Sale condition for the tick.
  • sale_condition: string
  • For performance parsed sale condition for the tick.
  • parsed_sale_condition: UInt32
  • Bool whether this is a suspicious tick
  • suspicious: bool
  • Bid Price for Tick
  • bid_price: decimal
  • Asking price for the Tick quote.
  • ask_price: decimal
  • Alias for "Value" - the last sale for this asset.
  • last_price: decimal
  • Size of bid quote.
  • bid_size: decimal
  • Size of ask quote.
  • ask_size: decimal
  • Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
  • data_type: MarketDataType
  • True if this is a fill forward piece of data
  • is_fill_forward: bool
  • Current time marker of this data packet.
  • time: DateTime
  • The end time of this data. Some data covers spans (trade bars) and as such we want to know the entire time span covered
  • end_time: DateTime
  • Symbol representation for underlying Security
  • symbol: Symbol
  • Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
  • value: decimal
  • As this is a backtesting platform we'll provide an alias of value as price.
  • price: decimal

 


Classic Algorithm Example

The following example algorithm subscribes to Google Options that fall within two strikes of the underlying stock price and expire within seven days. Within this Option chain, the algorithm buys the call Option contract that has the furthest expiry and has its strike price closest to the underlying stock price. When the contract expires, the algorithm rolls over to the next contract that meets this criteria.

Select Language:
from AlgorithmImports import *
from QuantConnect.DataSource import *

class USEquityOptionsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2020, 8, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        # Requesting data
        self.underlying = self.add_equity("GOOG").symbol
        option = self.add_option("GOOG")
        self.option_symbol = option.symbol
        # To speculate trade the underlying with a low cost, filter for the ATM calls that expiring in the current week
        # -2/+2 strike buffer is given for small price change
        option.set_filter(lambda u: u.include_weeklys().calls_only().strikes(-2, +2).expiration(0, 6))
        
        self.contract = None

    def on_data(self, slice: Slice) -> None:
        # Close the underlying position if the option contract is exercised
        if self.portfolio[self.underlying].invested:
            self.liquidate(self.underlying)

        # Select with the lastest option chain data only
        chain = slice.option_chains.get(self.option_symbol)
        if self.contract and not self.portfolio[self.contract.symbol].invested and chain:
            # Select the call contracts with the furthest expiration (week end)
            furthest_expiry = sorted(calls, key = lambda x: x.expiry, reverse=True)[0].expiry
            furthest_expiry_calls = [contract for contract in calls if contract.expiry == furthest_expiry]
            
            # Get the ATM call for speculate trade with low cost and limited loss
            self.contract = sorted(furthest_expiry_calls, key = lambda x: abs(chain.underlying.price - x.strike))[0]
            self.market_order(self.contract.symbol, 1)
                
                
    def on_securities_changed(self, changes: SecurityChanges) -> None:
        
        for security in changes.added_securities:
            # Historical data
            history = self.history(security.symbol, 10, Resolution.MINUTE)
            self.debug(f"We got {len(history)} from our history request for {security.symbol}")
using QuantConnect.DataSource;

namespace QuantConnect
{
    public class USEquityOptionsDataAlgorithm : QCAlgorithm
    {
        private Symbol _underlying;
        private Symbol _optionSymbol;
        private OptionContract? _contract = null;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2020, 8, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            // Requesting data
            _underlying = AddEquity("GOOG").Symbol;
            var option = AddOption("GOOG");
            _optionSymbol = option.Symbol;
            // To speculate trade the underlying with a low cost, filter for the ATM calls that expiring in the current week
            // -2/+2 strike buffer is given for small price change
            option.SetFilter((u) => u.IncludeWeeklys().CallsOnly().Strikes(-2, +2).Expiration(0, 7));
        }

        public override void OnData(Slice slice)
        {
            // Close the underlying position if the option contract is exercised
            if (Portfolio[_underlying].Invested)
            {
                Liquidate(_underlying);
            }
            
            // Select with the lastest option chain data only
            if (_contract != null && !Portfolio[_contract.Symbol].Invested && 
                slice.OptionChains.TryGetValue(_optionSymbol, out var chain))
            {
                // Select the call contracts with the furthest expiration (week end)
                var furthestExpiry = calls.OrderByDescending(x => x.Expiry).First().Expiry;
                var furthestExpiryCalls = calls.Where(x => x.Expiry == furthestExpiry).ToList();
                
                // Get the ATM call for speculate trade with low cost and limited loss
                var contract = furthestExpiryCalls.OrderByDescending(x => Math.Abs(chain.Underlying.Price - x.Strike)).Last();
                _contract = contract;
                MarketOrder(contract.Symbol, 1);
            }
        }
        
        public override void OnSecuritiesChanged(SecurityChanges changes)
        {
            foreach (var security in changes.AddedSecurities)
            {
                // Historical data
                var history = History(security.Symbol, 100, Resolution.Minute);
                Debug($"We got {history.Count()} from our history request for {security.Symbol}");
            }
        }
    }
}

Framework Algorithm Example

The following example algorithm buys a call Option contract for Google that falls within one strike of the underlying stock price and expires within seven days. When the contract expires, the algorithm rolls over to the next contract that meets this criteria.

Select Language:
from AlgorithmImports import *
from QuantConnect.DataSource import *
from Selection.OptionUniverseSelectionModel import OptionUniverseSelectionModel

class USEquityOptionsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2020, 8, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        # Requesting data
        self.set_universe_selection(EarliestExpiringWeeklyAtTheMoneyCallOptionUniverseSelectionModel())
        
        self.set_alpha(ConstantOptionsAlphaModel())

        self.set_portfolio_construction(SingleSharePortfolioConstructionModel())
        
        
class EarliestExpiringWeeklyAtTheMoneyCallOptionUniverseSelectionModel(OptionUniverseSelectionModel):

    def __init__(self) -> None:
        # Daily update with the select_option_chain_symbols function
        super().__init__(timedelta(1), self.select_option_chain_symbols)

    def select_option_chain_symbols(self, utcTime: datetime) -> List[Symbol]:
        # Always select only GOOG options as our focus
        return [ Symbol.create("GOOG", SecurityType.OPTION, Market.USA) ]

    def filter(self, filter: OptionFilterUniverse) -> OptionFilterUniverse:
        # To speculate trade the underlying with a low cost, filter for the ATM calls that expiring in the current week
        # -1/+1 strike buffer is given for small price change
        return (filter.weeklys_only()
                      .calls_only()
                      .strikes(-1, -1)
                      .expiration(0, 7))  
        

class ConstantOptionsAlphaModel(AlphaModel):

    underlying = None
    contract = None

    def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
        
        insights = []
        
        # Liquidate the underlying if the option is being exercised/assigned
        if algorithm.portfolio[self.underlying].invested:
            insights.append(Insight.price(self.underlying, timedelta(days=7), InsightDirection.FLAT))

        if self.contract is not None and algorithm.portfolio[self.contract.symbol].invested:
            return insights

        # Get the ATM call for speculate trade with low cost and limited loss that expires at week end
        for kvp in slice.option_chains:
            chain = kvp.Value
            expiry = max(x.expiry for x in chain)
            self.contract = sorte([x for x in chain if x.expiry == expiry],
                                               key=lambda x: abs(x.strike - x.underlying_last_price))[0]
            insights.append(Insight.price(self.contract.symbol, self.contract.expiry + timedelta(days=1), InsightDirection.UP))
        
        return insights
        
    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            if security.type == SecurityType.EQUITY:
                self.underlying = security.symbol
            else:
                # Historical data
                history = algorithm.history(security.symbol, 10, Resolution.MINUTE)
                algorithm.debug(f"We got {len(history)} from our history request for {security.symbol}")


class SingleSharePortfolioConstructionModel(PortfolioConstructionModel):

    def create_targets(self, algorithm: QCAlgorithm, insights: List[Insight]) -> List[PortfolioTarget]:
        targets = []
        for insight in insights:
            if algorithm.securities[insight.symbol].is_tradable:
                targets.append(PortfolioTarget(insight.symbol, insight.direction))
        return targets
using QuantConnect.DataSource;

namespace QuantConnect.Algorithm.CSharp
{
    public class USEquityOptionsDataAlgorithm : QCAlgorithm
    {        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2020, 8, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            // Requesting data
            SetUniverseSelection(new EarliestExpiringWeeklyAtTheMoneyCallOptionUniverseSelectionModel());
            
            SetAlpha(new ConstantOptionsAlphaModel());
            
            SetPortfolioConstruction(new SingleSharePortfolioConstructionModel());
        }
    }   
        
    class EarliestExpiringWeeklyAtTheMoneyCallOptionUniverseSelectionModel : OptionUniverseSelectionModel
    {
        // Daily update with the SelectOptionChainSymbols function
        public EarliestExpiringWeeklyAtTheMoneyCallOptionUniverseSelectionModel()
                : base(TimeSpan.FromDays(1), SelectOptionChainSymbols) {}
        
        private static IEnumerable<Symbol> SelectOptionChainSymbols(DateTime utcTime)
        {
            // Select only GOOG options as our focus
            return new[] {QuantConnect.Symbol.Create("GOOG", SecurityType.Option, Market.USA)};
        }

        protected override OptionFilterUniverse Filter(OptionFilterUniverse filter)
        {
            // To speculate trade the underlying with a low cost, filter for the ATM calls that expiring in the current week
            // -2/+2 strike buffer is given for small price change
            return filter
                .Strikes(-1, -1)
                .Expiration(0, 7)
                .WeeklysOnly()
                .CallsOnly();
        }
    }
        
    class ConstantOptionsAlphaModel : AlphaModel
    { 
        private Symbol? _underlying = null;
        private OptionContract? _contract = null;
        
        public override IEnumerable<Insight> Update(QCAlgorithm algorithm, Slice slice)
        {
            var insights = new List<Insight>();
            
            // Liquidate the underlying if the option is being exercised/assigned
            if (algorithm.Portfolio[_underlying].Invested)
            {
                insights.Add(Insight.Price(_underlying, TimeSpan.FromDays(7), InsightDirection.Flat));
            }
                
            if (_contract != null && algorithm.Portfolio[_contract.Symbol].Invested)
            {
                return insights;
            }
            
            // Get the ATM call for speculate trade with low cost and limited loss that expires at week end
            foreach (var kvp in slice.OptionChains)
            {
                var chain = kvp.Value;
                var expiry = chain.Max(x => x.Expiry);
                _contract = chain.Where(x => x.Expiry == expiry)
                    .OrderBy(x => Math.Abs(x.Strike - x.UnderlyingLastPrice))
                    .First();
                insights.Add(Insight.Price(_contract.Symbol, _contract.Expiry + TimeSpan.FromDays(1), InsightDirection.Up));
            }    
            return insights;
        }
    
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            foreach (var security in changes.AddedSecurities)
            {
                if (security.Type == SecurityType.Equity)
                {
                    _underlying = security.Symbol;
                }
                else {
                    // Historical data
                    var history = algorithm.History(security.Symbol, 100, Resolution.Minute);
                    algorithm.Debug($"We got {history.Count()} from our history request for {security.Symbol}");    
                }
            }
        }
    }
        
        
    class SingleSharePortfolioConstructionModel : PortfolioConstructionModel
    {
        public override IEnumerable<PortfolioTarget> CreateTargets(QCAlgorithm algorithm, Insight[] insights)
        {
            var targets = new List<PortfolioTarget>();
            foreach (var insight in insights)
            {
                if (algorithm.Securities[insight.Symbol].IsTradable)
                {
                    targets.Add(new PortfolioTarget(insight.Symbol, (int) insight.Direction));
                }
            }
            return targets;
        }
    }
}

 


Licensing Available

Cloud Usage

Cloud Usage

US Equity Options is allowed to be used in the cloud for personal and commercial projects for free. The data is permissioned for use within the licensed organization only

Free | Documentation

Live trading license available

LEAN CLI Downloads Usage

US Equity Options can be downloaded on premise with the LEAN CLI, for a charge per file downloaded. This download is for the licensed organization's internal LEAN use only and cannot be redistributed or converted in any format.

Starting at 15 QCC/file | Learn More


About Lean CLI

LEAN CLI is a cross-platform wrapper on the QuantConnect algorithmic trading engine called LEAN. The CLI makes using LEAN incredibly easy, reducing most of the pain points of developing and managing an algorithmic trading strategy to a few lines of bash.

Using the CLI you can download the same data QuantConnect hosts in the cloud for a small fee. These fees are per file downloaded, and are paid for in QuantConnect-Credits (QCC). We recommend purchasing credits to enable downloading.

CLI Command Generator

The CLI command generator is a helpful tool to generate a copy-paste command to download this dataset from the form below.

Select OS:
lean data download \
	--dataset "US Equity Options" \
	--data-type "trade" \
	--option-style "american" \
	--ticker "AAPL, MSFT" \
	--resolution "minute" \
	--start "20240510" \
	--end "20250510" 
lean data download `
	--dataset "US Equity Options" `
	--data-type "trade" `
	--option-style "american" `
	--ticker "AAPL, MSFT" `
	--resolution "minute" `
	--start "20240510" `
	--end "20250510" 

Pricing | Provider offers 10 licensing options edit edit

The QuantConnect-AlgoSeek partnership provides free access to US Equities market data in QuantConnect Cloud and paid access for downloads. Downloads are distributed in LEAN format and priced according to file resolution as below. This dataset depends on the US Security Master dataset because the US Security Master dataset contains information on splits, dividends, and symbol changes of the underlying security.

Pending

Cloud Access edit edit

edit edit

Freely harness terabytes of US Equity Options data in the QuantConnect Cloud for your backtesting and live trading purposes.

  • Curated, clean data
  • Updated nightly at 4am
  • American Standard and Weekly Equity Options
  • Option Margin Modeling Supported

PRICE

Free

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Minute Download edit edit

edit edit

US Equity Options Minute resolution archives in LEAN format for on premise backtesting and research. One file per ticker/day (include all contracts).

  • Ownership of the data
  • Data in LEAN format
  • American Standard and Weekly Equity Options
  • Local compute resources

PRICE

15 QCC/file

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Hour Download edit edit

edit edit

US Equity Options Hour resolution archives in LEAN format for on premise backtesting and research. One file per ticker/year (include all contracts).

  • Ownership of the data
  • Data in LEAN format
  • American Standard and Weekly Equity Options
  • Local compute resources

PRICE

900 QCC/file

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Daily Download edit edit

edit edit

US Equity Options Daily resolution archives in LEAN format for on premise backtesting and research. One file per ticker/year (include all contracts).

  • Ownership of the data
  • Data in LEAN format
  • American Standard and Weekly Equity Options
  • Local compute resources

PRICE

300 QCC/file

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Daily Updates edit edit

edit edit

Bulk download daily data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$720/yr

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Minute Updates edit edit

edit edit

Bulk download minute data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$1,200/yr

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Hour Updates edit edit

edit edit

Bulk download hour data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$1,440/yr

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Daily Download edit edit

edit edit

Bulk download daily data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$12,000

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Hour Download edit edit

edit edit

Bulk download hour data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$14,400

Documentation Subscribe cli button LEAN CLI Contact Us
Pending

Bulk Minute Download edit edit

edit edit

Bulk download minute data

  • Download entire universe
  • Bulk price discount
  • CLI ready

PRICE

$30,000

Documentation Subscribe cli button LEAN CLI Contact Us

User Reviews

What people are saying about this

Mustapha

5
Edit

Apr 20, 2024

Can someone explain this:
“This dataset depends on the US Security Master dataset because the US Security Master dataset contains information on splits, dividends, and symbol changes of the underlying security”

Do we need to purchase this as well for downloading the Hour Download for example?

Edit Your Review

Rate the Module:

Hover over the stars to rate the module

Cassidy Blonsky

5
Edit

Jul 23, 2022

I kinda like this over anything out there.I am not sure yet what result will be but I will follow up in awhile and see what happens 

.

Edit Your Review

Rate the Module:

Hover over the stars to rate the module

No Reviews Yet

This product has not received any reviews yet, be the first to post one!

Write a Review

Rate the Module:

Hover over the stars to rate the module
Paste the media URL in the input.





Please sign in to post a review

Pricing

Provider offers 10 licensing options

View Pricing


Starting Date edit edit

  • January 2012

Coverage edit edit

  • 4,000 Equity Options

Delivery Methods edit edit

  • Download
  • Cloud

About the Provider

  • Website edit edit
  • Contact the Provider

Data Status

Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.

search icon search icon

Dataset Status from to

No Runs

OK

Degraded

Failure

Admin

Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.

  • Add Dataset
  • Data Upload
  • Point Processor

Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum

Configuration Keys

Environment Variables

Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum

File Link

Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum

Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum

Upload Dataset

Upload a manually created tar or zip file to all cloud data systems.

Add a link and click the Sync Dataset button to upload the dataset

Upload Destinations

About Dataset Sync

The dataset synchronizer is an internal tool for the QuantConnect team to upload data to the cloud data storage environments. It supports TAR files which are extracted in the root directory of the cloud data environments.
Take extreme care to carefully structure your data TAR package with the same folders as the LEAN data folder. Ensure all folders and file names are lowercase as Linux is case-sensitive.

Support

Tickets and Seats

  • create new ticket create new ticket Create New Ticket
  • organization ticket organization ticket Organization Tickets 0
  • spport seat spport seat Support Seats

Support

Begin Your QuantConnect Journey

Algorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.

Sign Up for Free

Already have an account Log In.

close close

How would you rate your experience on QuantConnect?

â­‘

â­‘

â­‘

â­‘

â­‘

Hover and click over the stars to rate us.

It looks like you are not fully satisfied with your experience on QuantConnect, please take a moment to let us know how we can improve our services for you:

trustpilot trustpilot

We are glad you're enjoying QuantConnect!

If you have a minute to spare, please leave us a review on Trustpilot.
Stories like yours help others see the full potential of QuantConnect.

Rate us on Trustpilot

Loading User Profile...

Please select one purchase option

Session Expired

Your session has expired. Please log in again.

Log In

  close-icon
switch organization switch organization Switch Organization
Organization
Type
Owner
Members
Preferred
switch organization switch organizationCreate Organization
Organization Name

update billing address update billing address Update Billing Information

Upgrade to Team plan or higher to enable custom invoicing

select icon select icon


Changes will be applied to future invoices.

Close modal Close modal
invite sent invite sent

Invitations Sent

Users will be able to join by following the link in the invitation email.

You’ve been invited by Jared Broad to join his G-Force Organization.
Would you like to accept the invitation?

Assign Seat
Close Widget Close Widget

Rename Encryption Key

Close Widget Close Widget

Delete Encryption Key

Are you sure you want to delete the encryption key "undefined"?

warning Caution: We will not be able to decrypt encrypted projects without the original key.

Close Widget Close Widget

Add Encryption Key

upload file icon upload file icon

Drag & Drop or

Keys are added to the local storage in your web browser and not uploaded to QuantConnect. To use an encrypted project on another computer you will need to bring a copy of the key.

Close modal Close modal
Authorize Decryption Authorize Decryption

Authorize

This project is encrypted using the key .

Close modal Close modal
Authorize Decryption Authorize Decryption

Authorize

This project will be encrypted using the key .