VIX Central

VIX Central Contango

Introduction

The VIX Central Contango dataset by VIX Central tracks VIX Futures (VX) contango data. The data covers 12 Futures contracts closest to expiry/maturity, starts in June 2010, and is delivered on a daily frequency. The dataset is created by QuantConnect downloading data from VIX Central website, which collects and analyses VIX and VX (VIX Futures) data.

Contango and Backwardation are terms used to describe if participants in the Futures market are overpaying or underpaying relative to the "spot" price of the underlying commodity when trading a Futures contract ("spot" price is the price of the actual commodity/asset at a given moment in time). Contango and backwardation can be used to determine forward-looking expectations of the commodity's spot price by the time the Future has expired/matured and is set to be delivered by participants of the Futures market. As Futures near their expiration/maturity date, contango and backwardation curves tend to converge on the spot price of the commodity at the time of expiration.

For more information about the VIX Central Contango dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

VIX Central was founded by Eli Mintz in 2012 with goal of displaying historical VIX term structures in a simple and intuitive interface. VIX Central provides access to real-time and historical VIX data for individual investors.

Getting Started

The following snippet demonstrates how to request data from the VIX Central Contango dataset:

_datasetSymbol = AddData<VIXCentralContango>("VIX", Resolution.Daily).Symbol;
self.dataset_symbol = self.AddData(VIXCentralContango, "VIX", Resolution.Daily).Symbol

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJune 2010
Asset Coverage1 Futures Chain with 12 contracts
Data DensityRegular
ResolutionDaily
TimezoneNew York

Data Point Attributes

The VIX Central Contango dataset provides VIXCentralContango objects, which have the following attributes:

Requesting Data

To add VIX Central Contango data to your algorithm, call the AddData method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class VixCentralContangoAlgorithm(QCAlgorithm):
 
    def Initialize(self) -> None:
        self.SetStartDate(2014, 1, 1)
        self.SetEndDate(2018, 1, 1)
        self.SetCash(25000)
 
        self.dataset_symbol = self.AddData(VIXCentralContango, "VX", Resolution.Daily).Symbol
namespace QuantConnect
{
    public class VixCentralContangoAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2014, 1, 1);
            SetEndDate(2018, 1, 1);
            SetCash(25000);

            _datasetSymbol = AddData<VIXCentralContango>("VX", Resolution.Daily).Symbol;
        }
    }
}

Accessing Data

To get the current VIX Central Contango data, index the current Slice with the dataset Symbol. Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def OnData(self, slice: Slice) -> None:
    if slice.ContainsKey(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.Log(f"{self.dataset_symbol} front month at {slice.Time}: {data_point.FrontMonth}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} front month at {slice.Time}: {dataPoint.FrontMonth}");
    }
}

Historical Data

To get historical VIX Central Contango data, call the History method with the dataset Symbol. If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.History(self.dataset_symbol, 100, Resolution.Daily)

# Dataset objects
history_bars = self.History[VIXCentralContango](self.dataset_symbol, 100, Resolution.Daily)
var history = History<VIXCentralContango>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests.

Remove Subscriptions

To remove your subscription to VIX Central Contango data, call the RemoveSecurity method.

self.RemoveSecurity(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The VIX Central Contango dataset enable you to explore VIX Future contracts pricing data. Examples include the following strategies:

  • Determining forward-looking expectations by Futures market participants of the underlying commodity's spot price by the time of expiration/maturity
  • Creating cash-and-carry arbitrage strategies by trading the spread/convergence of the contango/backwardation curves as a Future nears expiration/maturity

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: