book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

QuantConnect

International Future Universe

Introduction

The International Future Universe dataset by QuantConnect lists the available International Future contracts. The data covers the 3 contracts, FESX, HSI, and NKD, starting in July 1998, and is delivered on daily frequency. This dataset is created by monitoring the trading activity on the EUREX, HKFE, and CME.

This dataset does not contain market data. For market data, see International Futures by TickData and US Futures by AlgoSeek for NKD.

For more information about the International Future Universe dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

The International Futures Universe dataset provides data for contract filtering/selection:

Select Language:
hsi = self.add_future(Futures.Indices.HANG_SENG, Resolution.MINUTE)            # "HSI"
hsi.set_filter(0, 90)
fesx = self.add_future(Futures.Indices.EURO_STOXX_50, Resolution.MINUTE)       # "FESX"
fesx.set_filter(0, 90)
nkd = self.add_future(Futures.Indices.NIKKEI_225_DOLLAR, Resolution.MINUTE)    # "NKD"
nkd.set_filter(0, 90)

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJuly 1998, see Supported Assets below for details
Coverage3 Contracts
Data DensityDense
ResolutionDaily
TimezoneVarious, refer to Supported Assets below
Market HoursRegular and Extended

Example Applications

The International Futures Universe dataset enables you to design Futures strategies accurately. Examples include the following strategies:

  • Buying the Futures contract with the most open interest to reduce slippage and market impact
  • Trade speculation on an International Index
  • Trading bull calendar spreads to reduce volatility and margin requirements

For more example algorithms, see Examples.

Supported Assets

The following table shows the available Futures:

TickerFutureStart DateTime ZoneCurrency
HSIHang Seng Index FuturesJan 2010Asia/Hong KongHKD
FESXEURO STOXX 50 Index FuturesJul 1998Europe/BerlinEUR
NKDNikkei 225 Index FuturesJan 2007America/ChicagoUSD

Data Point Attributes

The International Future Universe dataset provides FutureFilterUniverse, and FuturesChain objects.

FutureFilterUniverse Attributes

FutureFilterUniverse objects have the following attributes:

FuturesChain Attributes

FuturesChain objects have the following attributes:

Requesting Data

To use International Future Universe data to your algorithm, call the add_future method. To define which contracts should be in your universe, specify the filter when requesting the Future data.

The add_future method provides a daily stream of Future chain data. To get the most recent daily chain, call the future_chains method with the underlying Future Symbol in the Slice object received in the on_data event handler.

Select Language:
class InternationalFuturesDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2013, 12, 20) 
        self.set_end_date(2014, 2, 20) 
        self.set_cash(1000000) 
        self.universe_settings.asynchronous = True
        # Request Hang Seng Index Futures data
        future = self.add_future(Futures.Indices.HANG_SENG) 
        # Set filter to obtain the contracts expire within 90 days
        future.set_filter(0, 90)
        self.future_symbol = future.symbol

For more information about creating Future Universes, see Futures.

Accessing Data

For information about accessing International Future Universe data, see Futures.

Historical Data

You can get historical US Future Universe data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Future Universe data in an algorithm, call the history method with the list Future contract Symbol objects. You may obtain all available Future contracts on a date by calling the futures_chain method. Note that this method will return all available contracts despite your previous filter. If there is no data for the period you requested, the history result is empty.

Select Language:
# Subscribe to the underlying Future and save a reference to the Symbol.
symbol = self.add_future(Futures.Indices.HANG_SENG).symbol
# Get the contracts available on this day.
contracts = [x.symbol for x in self.futures_chain(symbol)]

# Request the historical data to obtain the data.
# DataFrame objects
history_df = self.history(contracts, 10, Resolution.DAILY, flatten=True)
open_interest = self.history(OpenInterest, contracts, 10, Resolution.DAILY, flatten=True)

# Open Interest objects
open_interest = self.history[OpenInterest](contracts, 10, Resolution.DAILY)

For more information about historical data in algorithms, see History Requests.

Historical Data In Research

To get historical US Future Universe data in the Research Environment for an entire Futures chain, call the future_history method with the canonical Future Symbol.

Select Language:
qb = QuantBook()
future = qb.add_future(Futures.Indices.HANG_SENG) 
future.set_filter(0, 90)
history = qb.future_history(future.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5), Resolution.DAILY)
history_df = history.data_frame
all_history = history.get_all_data()
expiries = history.get_expiry_dates()

You can also do similar in the research environment like in the algorithm to obtain the price and open interest data.

Select Language:
qb = QuantBook()
end = datetime(2020, 6, 5)
qb.set_start_date(end)
symbol = qb.add_future(Futures.Indices.HANG_SENG).symbol
# Get the contracts available on this day.
contracts = [x.symbol for x in qb.futures_chain(symbol)]

# Request the historical data to obtain the data.
history_df = qb.history(contracts, datetime(2020, 6, 1), end, Resolution.DAILY, flatten=True)
open_interest = qb.history(OpenInterest, contracts, datetime(2020, 6, 1), end, Resolution.DAILY, flatten=True)
For more information about historical data in the Research Environment, see Futures.

Example Applications

The International Futures Universe dataset enables you to design Futures strategies accurately. Examples include the following strategies:

  • Buying the Futures contract with the most open interest to reduce slippage and market impact
  • Trade speculation on an International Index
  • Trading bull calendar spreads to reduce volatility and margin requirements

For more example algorithms, see Examples.

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: