---
title: "International Futures"
description: "International Futures dataset from TickData."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tickdata/international-futures
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tickdata/international-futures.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/14%20Datasets/05%20TickData/01%20International%20Futures
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# International Futures

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Datasets > [TickData](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tickdata.md) > International Futures

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

The International Futures dataset by TickData provides Futures data, including price, volume, open interest, and expiry. The data covers the 4 contracts, DAX, FESX, HSI, KM, 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](https://www.quantconnect.com/datasets/quantconnect-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](https://www.quantconnect.com/datasets/tickdata-international-futures).

## About the Provider

[TickData](https://www.tickdata.com/) 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:

```python
hsi = self.add_future(Futures.Indices.HANG_SENG, Resolution.MINUTE)           # "HSI"
hsi.set_filter(0, 90)
dax = self.add_future(Futures.Indices.DAX, Resolution.MINUTE)                 # "DAX"
dax.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)
km = self.add_future(Futures.Indices.KOSPI_200, Resolution.MINUTE)            # "KM"
km.set_filter(0, 90)
```

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | July 1998, see `Supported Assets` below for details |
| Coverage | 5 Contracts |
| Data Density | Dense |
| Resolution | Minute, Hour, & Daily |
| Timezone | Various, refer to `Supported Assets` below |
| Market Hours | [Regular and Extended](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/futures/market-hours.md) |

## Volume Discrepancies

For Futures contracts trading in the US, for example, NKD, see [US Futures](https://www.quantconnect.com/datasets/algoseek-us-futures).

## 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.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/futures/requesting-data.md) or [Futures Universes](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/futures.md).

## Accessing Data

To get the current International Futures data, index the `futures_chains` property of the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) 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.

```python
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`.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/futures/handling-data.md).

## 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.

```python
# 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](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md). For more information about the price adjustments for continuous contracts, see [Continous Contracts](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/futures.md#12-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`.

```python
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](https://www.quantconnect.com/docs/v2/research-environment/datasets/futures/key-concepts.md).

## Supported Assets

The following table shows the available Futures:

| Ticker | Future | Start Date | Time Zone | Currency |
| --- | --- | --- | --- | --- |
| DAX | German Index Futures | Jan 2010 | Europe/Berlin | EUR |
| FESX | EURO STOXX 50 Index Futures | Jul 1998 | Europe/Berlin | EUR |
| HSI | Hang Seng Index Futures | Jan 2010 | Asia/Hong Kong | HKD |
| KM | Kospi 200 Index Futures | Jan 2007 | Asia/Seoul | KRW |
| NKD | Nikkei 225 Index Futures | Jan 2007 | America/Chicago | USD |

## 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

### Classic Algorithm Example -- HSI Futures

The following example algorithm uses [ZigZag](https://www.quantconnect.com/docs/v2/writing-algorithms/indicators/supported-indicators/zig-zag.md) to determine the trend of Hang Seng Index. To trade the Indices, we make use of the HSI Futures.

```python
from AlgorithmImports import *

class InternationalFuturesDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        # Set the time zone to HKT to make it more comparable with the exchange.
        self.set_time_zone(TimeZones.HONG_KONG)
        # Set the account currency as HKD to trade HSI Futures.
        self.set_account_currency("HKD", 1000000)
        # Seed the last price of the contracts for filling.
        self.settings.seed_initial_prices = True

        # Request HSI Futures to trade.
        # Note that we will trade the contract with the highest open interest for liquidity.
        self.hsi_future = self.add_future(
            Futures.Indices.HANG_SENG,
            extended_market_hours=True,
            data_mapping_mode=DataMappingMode.LAST_TRADING_DAY,
            contract_depth_offset=0
        )
        # Request the corresponding underlying Index for feeding indicator for trade signal generation.
        hsi_index = self.add_index("HSI").symbol

        # Create a ZigZag indicator to trade Hang Seng Index price pivot points.
        self._zz = self.zz(hsi_index, 0.15, 5, Resolution.DAILY)
        # Warm up indicator for immediate readiness to trade.
        self.warm_up_indicator(hsi_index, self._zz, Resolution.DAILY)

    def on_data(self, slice: Slice) -> None:
        # Only place trade if the Future contracts is in market opening hours to avoid stale fills.
        if self.is_market_open(self.hsi_future.symbol) and self._zz.is_ready:
            pivot = self._zz.pivot_type
            # If the last pivot point is a low point, the current trend is increasing after this low point.
            if pivot == PivotPointType.LOW and not self.portfolio[self.hsi_future.symbol].is_long:
                self.set_holdings(self.hsi_future.mapped, 0.2)
            # If the last pivot point is a high point, the current trend is decreasing after this high point.
            elif pivot == PivotPointType.HIGH and not self.portfolio[self.hsi_future.symbol].is_short:
                self.set_holdings(self.hsi_future.mapped, -0.2)

        # Handle rollover in case the current mapped contract changes.
        for _, changed_event in slice.symbol_changed_events.items():
            old_symbol = changed_event.old_symbol
            new_symbol = self.add_future_contract(changed_event.new_symbol).symbol
            quantity = self.portfolio[old_symbol].quantity
            # Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
            self.liquidate(old_symbol)
            if quantity != 0:
                self.market_order(new_symbol, quantity)
```

### Classic Algorithm Example -- FESX Futures

The following example algorithm uses the [MACD](https://www.quantconnect.com/docs/v2/writing-algorithms/indicators/supported-indicators/moving-average-convergence-divergence.md) indicator to determine the trend of the EuroStoxx50 Index. To trade the Index, we make use of the FESX Futures.

```python
from AlgorithmImports import *

class InternationalFuturesDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        # Set the time zone to Berlin to make it more comparable with the exchange.
        self.set_time_zone(TimeZones.BERLIN)
        # Set the account currency as EUR to trade FSX Futures.
        self.set_account_currency("EUR", 1000000)
        # Seed the last price of the contracts for filling.
        self.settings.seed_initial_prices = True

        # Request FESX Futures to trade.
        # Note that we will trade the contract with the highest open interest for liquidity.
        self.fesx_future = self.add_future(
            Futures.Indices.EURO_STOXX_50,
            extended_market_hours=True,
            data_mapping_mode=DataMappingMode.LAST_TRADING_DAY,
            contract_depth_offset=0
        )
        # Request the corresponding underlying Index for feeding indicator for trade signal generation.
        fesx_index = self.add_index("SX5E").symbol

        # Create a MACD indicator to trade EuroStoxx trend changes on the fast-slow term trend convergence.
        self._macd = self.macd(fesx_index, 12, 26, 9, resolution=Resolution.DAILY)
        # Warm up indicator for immediate readiness to trade.
        self.warm_up_indicator(fesx_index, self._macd, Resolution.DAILY)

    def on_data(self, slice: Slice) -> None:
        # Only place trade if the Future contracts is in market opening hours to avoid stale fills.
        if self.is_market_open(self.fesx_future.symbol) and self._macd.is_ready:
            # To identify a sensitive change in trend, use the change in the histogram value of the MACD.
            histogram = self._macd.histogram
            histogram_chg = histogram.current.value - histogram.previous.value
            # Positive histogram value increasing means the fast trend is rising faster than the slow trend, indicating a strong uptrend.
            if histogram_chg > 0 and histogram.current.value > 0 and not self.portfolio[self.fesx_future.symbol].is_long:
                self.set_holdings(self.fesx_future.mapped, 0.2)
            # Negative histogram value decreasing means the slow trend is dropping faster than the fast trend, indicating a strong downtrend.
            elif histogram_chg < 0 and histogram.current.value < 0 and not self.portfolio[self.fesx_future.symbol].is_short:
                self.set_holdings(self.fesx_future.mapped, -0.2)

        # Handle rollover in case the current mapped contract changes.
        for _, changed_event in slice.symbol_changed_events.items():
            old_symbol = changed_event.old_symbol
            new_symbol = self.add_future_contract(changed_event.new_symbol).symbol
            quantity = self.portfolio[old_symbol].quantity
            # Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
            self.liquidate(old_symbol)
            if quantity != 0:
                self.market_order(new_symbol, quantity)
```

## 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:

*Members of `QuantConnect.Securities.Future.Future` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Securities.Future.Future&language=python*

### FuturesChain Attributes

`FuturesChain` objects have the following attributes:

*Members of `QuantConnect.Data.Market.FuturesChain` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.FuturesChain&language=python*

### OpenInterest Attributes

`OpenInterest` objects have the following attributes:

*Members of `QuantConnect.Data.Market.OpenInterest` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.OpenInterest&language=python*

### DataNormalizationMode Values

The `DataNormalizationMode` enumeration has the following values:

*Members of `QuantConnect.DataNormalizationMode` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.DataNormalizationMode&language=python*

### DataMappingMode Values

The `DataMappingMode` enumeration has the following values:

*Members of `QuantConnect.DataMappingMode` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.DataMappingMode&language=python*
