TickData
International Futures
Introduction
The International Futures dataset by TickData provides Futures data, including price, volume, open interest, and expiry. The data covers the 3 contracts, FESX, HSI, and NKD, starting in July 1998 and is delivered on any frequency from tick to daily. This dataset is created by TickData, which negotiates directly with exchanges for their official archive and partners with real-time data providers with direct exchange connections and multiple redundant ticker plants.
This dataset also depends on the US Futures Security Master because the US Futures Security Master dataset contains information to construct continuous Futures.
For more information about the International Futures dataset, including CLI commands and pricing, see the dataset listing.
About the Provider
TickData was founded by a futures broker and a programmer in 1984 as the first company in the world to offer historical tick-by-tick prices on the futures and index markets. TickData provides access to comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cash Indices.
Getting Started
The following snippet demonstrates how to request data from the International Futures dataset:
hsi = self.add_future(Futures.Indices.HANG_SENG, Resolution.MINUTE).symbol # "HSI" fesx = self.add_future(Futures.Indices.EURO_STOXX_50, Resolution.MINUTE).symbol # "FESX" nkd = self.add_future(Futures.Indices.NIKKEI_225_DOLLAR, Resolution.MINUTE).symbol # "NKD"
Data Summary
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | July 1998, see Supported Assets below for details |
Coverage | 3 Contracts |
Data Density | Dense |
Resolution | Minute, Hour, & Daily |
Timezone | Various, refer to Supported Assets below |
Market Hours | Regular and Extended |
Example Applications
The International Futures 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.
Volume Discrepancies
Data Point Attributes
The International Futures dataset provides Future
, FuturesChain
, and OpenInterest
objects. To configure the continuous Future settings, use the DataNormalizationMode
and DataMappingMode
enumerations.
Future Attributes
Future
objects have the following attributes:
FuturesChain Attributes
FuturesChain
objects have the following attributes:
OpenInterest Attributes
OpenInterest
objects have the following attributes:
DataNormalizationMode Values
The DataNormalizationMode
enumeration has the following values:
DataMappingMode Values
The DataMappingMode
enumeration has the following values:
Requesting Data
To add International Futures data to your algorithm, call the add_future
method. Save a reference to the Future so you can access the data later in your algorithm.
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 subscriptions, see Requesting Data or Futures Universes.
Accessing Data
To get the current International Futures data, index the futures_chains
property of the current Slice
with the canonical Futures Symbol
. Slice objects deliver unique events to your algorithm as they happen, but the Slice
may not contain data for your Future at every time step.
def on_data(self, slice: Slice) -> None: # Get future chain of the canonical symbol chain = slice.futures_chains.get(self.future_symbol) if chain: # Iterate each contract in the future chain for contract in chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
You can also iterate through all of the FuturesChain
objects in the current Slice
.
def on_data(self, slice: Slice) -> None: # Iterate all future chains for canonical_symbol, chain in slice.futures_chains.items(): # Iterate each contract in the future chain for contract in chain: self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
For more information about accessing Futures data, see Handling Data.
Historical Data
You can get historical International Futures data in an algorithm and the Research Environment.
Historical Data In Algorithms
To get historical International Futures data in an algorithm, call the history
method with the canonical Futures Symbol
or a Futures contract Symbol
. If there is no data in the period you request, the history result is empty.
# DataFrame objects contract_history_df = self.history(contract.symbol, 100, Resolution.MINUTE) continuous_history_df = self.history(self.future_symbol, start=self.time - timedelta(days=15), end=self.time, resolution=Resolution.MINUTE, fill_forward=False, extended_market_hours=False, data_mapping_mode=DataMappingMode.OPEN_INTEREST, data_normalization_mode=DataNormalizationMode.RAW, contract_depth_offset=0) # TradeBar objects contract_history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE) continous_history_trade_bars = self.history[TradeBar](self.future_symbol, 100, Resolution.MINUTE) # QuoteBar objects contract_history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE) continous_history_quote_bars = self.history[QuoteBar](self.future_symbol, 100, Resolution.MINUTE) # Tick objects contract_history_ticks = self.history[Tick](contract.symbol, timedelta(seconds=10), Resolution.TICK) continous_history_ticks = self.history[Tick](self.future_symbol, timedelta(seconds=10), Resolution.TICK)
For more information about historical data in algorithms, see History Requests. For more information about the price adjustments for continuous contracts, see Continous Contracts.
Historical Data In Research
To get historical International Futures data in the Research Environment for an entire Futures chain, call the future_history
method with the canonical Future Symbol
.
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)) history_df = history.data_frame all_history = history.get_all_data() expiries = history.get_expiry_dates()
To get historical data for a single International Futures contract or the continuous Futures 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 Futures.
Example Applications
The International Futures 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.