We are very excited to announce the beta launch of options and futures trading on QuantConnect! Through the open-source platform LEAN, algorithmic trading has never been so accessible to investors.

The new asset classes tie into our existing offering of Equities, FOREX and CFD products bringing us to a total of five asset classes. We can now simultaneously trade multiple asset classes when used with a supporting brokerage. You write strategies in C#, Python and F#.

Options and futures are highly requested features from the community so we are happy to be shipping this feature. Like our other asset classes, all data is event driven manner to avoid look ahead bias.

Starting today you can also live trade your options and futures strategies on Interactive Brokers! (An accompanying options data subscription from Interactive Brokers required). If you’re an options/futures wizz get in touch!

Data and Period Available

Option data is available at minute resolution from January 2014-December 2016. Because of its sheer size we’re processing dates in reverse order backwards through time. When processing is complete the library will start January 2007. The data is survivorship bias free, and delivered as trades, quotes and open interest information. We cover all symbols in the OPRA feed. You can see a full example of an option algorithm in the BasicTemplateOptionsFilterUniverseAlgorithm.cs.

//Add Option Base 
var option = AddOption("SPY");

//Filter down to what we want.
option.SetFilter(universe => 
		from symbol in universe
		      .WeeklysOnly().Expiration(TimeSpan.Zero, TimeSpan.FromDays(10))
		where symbol.ID.OptionRight != OptionRight.Put
		select symbol);

// Search option chain:
if (slice.OptionChains.TryGetValue(OptionSymbol, out chain))
	// find the second call strike under market price expiring today
	var contract = (
		from optionContract in chain.OrderByDescending(x => x.Strike)
		where optionContract.Right == OptionRight.Call
		where optionContract.Expiry == Time.Date
		where optionContract.Strike < chain.Underlying.Price
		select optionContract

	if (contract != null)
		MarketOrder(contract.Symbol, 1);

Futures trading is available in tick, second and minute resolutions from January 2009 - December 2016. Our futures library covers all symbols from CME, NYMEX, CBOT and COMEX exchanges. You can see an example of a future algorithm in the BasicTemplateFutureAlgorithm.cs.

//Add Future Contract
var futureGold = AddFuture(Futures.Metals.Gold);

// What contracts do you want?
futureGold.SetFilter(TimeSpan.Zero, TimeSpan.FromDays(182)); 

// Search future chain for specific contracts to trade.
foreach(var chain in slice.FutureChains) 
	// find the front contract expiring no earlier than in 90 days
	var contract = (
		from futuresContract in chain.Value.OrderBy(x => x.Expiry)
		where futuresContract.Expiry > Time.Date.AddDays(90)
		select futuresContract

	// if found, trade it
	if (contract != null)
		MarketOrder(contract.Symbol, 1);

Options and futures trading also introduces the concept of QuoteBars to QuantConnect - a representation of the quote movements over time. QuoteBars have a Bid (OHLC) and Ask (OHLC) Bar. This allows us to better model spread for low volume assets such as option contracts. QuoteBars are limited to Options and Futures now, but will be extended to FX and CFD soon.

Data Provider

We'd like to give a special thank you to our data provider AlgoSeek. AlgoSeek shares the QuantConnect vision and has generously sponsored data for the QuantConnect community. You can download more data for LEAN from https://www.algoseek.com.

AlgoSeek is a leading provider of historical intraday US market data to banks, hedge funds, academia and individuals worldwide.


  1. Nik Milev says:

    Hey Jared

    Keep up the good work👏


    Nik Milev

  2. Brandon G. says:

    Hi Jared. Great job with the option data. The post says Dec 2016 and going backward through time. I can see data for Aug 2016 and backward, but nothing from Aug 2016 and beyond. Will that data become available soon? I have looked at SPY and GOOG, but there doesn’t seem to be anything beyond Aug 2016.



    1. Jared Broad says:

      Hey Brandon! We’ve processed from 2010 -> August 26th, 2016. We’re working on getting the other data in place but as you can imagine its a gigantic task! We’ll post to the community forums once its getting updated each day.

      1. Ernest Shaggleford says:

        Hi Jared,
        will the end point of the options and futures historical data be continually updated to reflect history up to the last real-time trading day?

  3. AlphAngel says:

    Hi, how do we use tehcnical indicators with Futures since we don’t have a constant maturity? do you have the concept of constant future?
    how shoudl we deal with that when we only want to consider the first future or highest volume ones?

    1. Jared Broad says:

      We currently don’t have continuous futures contracts but will be keeping the feature in mind for the future.

  4. Bradley Crossen says:

    Any update on releasing the Data for early time periods? I am looking to stress test my options strategy through 2008.

    1. Jared Broad says:

      Due to OTC naming changes in 2010 we are not able to reliably map the symbols from pre-2010 to present. OTC does not have these mapping changes recorded and there is no dataset we can buy with these naming changes.

  5. shamitha ranasinghe says:

    Hi Jared, this is great work!. Does this include support for Futures Options? E.g Options on WTI crude (CL) etc?

    1. Jared Broad says:

      No sorry this only replies to real options and real futures.

Sign In to comment in this post.