TickData
US Cash Indices
Introduction
The US Cash Indices dataset by TickData covers 3 US Indices: SPX, VIX, and NDX. The data starts on various dates from Janunary 1998 and is delivered on any frequency from tick to daily. This dataset is created by TickData negotiating directly with exchanges for their official archive and by partnering with real-time data providers who have direct exchange connections and multiple redundant ticker plants.
Additionally, this dataset includes EUREX EU STOXX Index (SX5E).
For more information about the US Cash Indices 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.
Data Summary
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 1998* |
Coverage | 3 US Indices |
Data Density | Dense |
Resolution | Minute, Hour, & Daily |
Timezone | New York |
Market Hours | Regular Only |
Example Applications
The US Cash Indices enables you to incorporate popular US indices into your trading algorithms. Examples include the following use cases:
- Exploring the difference between the Index and the ETF that tracks it
- Using these indices as the underlying asset for US Index Options strategies
- Understanding the stock market's level of expected forward-looking volatility, also known as the "fear index". When the VIX starts moving higher, it is telling you that traders are getting nervous. When the VIX starts moving lower, it is telling you that traders are gaining confidence.
For more example algorithms, see Examples.
Supported Indices
The following table shows the available indices:
Ticker | Index | Expiry | Start Date |
---|---|---|---|
VIX | S&P500 | 30 Days | Jul 2003 |
SPX | S&P500 | - | Jan 1998 |
NDX | NASDAQ-100 | - | Jan 1998 |
VIX - CBOE Volatility Index
The Cboe Volatility Index (VIX) is a real-time index that represents the market's expectations for the relative strength of near-term price changes of the S&P 500 index (SPX). Because it's derived from the prices of SPX index Options with near-term expiration dates, it generates a 30-day forward projection of volatility. Volatility, or how fast prices change, is often seen as a way to gauge market sentiment, and in particular, the degree of fear among market participants.
SPX - S&P 500 Index
The S&P 500 Index, or the Standard & Poor's 500 Index, is a market-capitalization-weighted index of the 500 largest publicly-traded companies in the U.S. It is not an exact list of the top 500 U.S. companies by market capitalization because there are other criteria included in the index. The index is widely regarded as the best gauge of large-cap U.S. Equities.
NDX - Nasdaq 100 Index
The Nasdaq-100 Index is a modified market-capitalization-weighted index composed of securities issued by 100 of the largest non-financial companies listed on the Nasdaq Stock Market (Nasdaq). The index includes companies from various industries except for the financial industry, like commercial and investment banks. These non-financial sectors include retail, biotechnology, industrial, technology, health care, and others.
Requesting Data
To add US Cash Indices data to your algorithm, call the AddIndexadd_index method. Save a reference to the Index Symbol so you can access the data later in your algorithm.
class USCashIndexAlgorithm(QCAlgorithm): def initialize(self) -> None: self.set_start_date(2020, 6, 1) self.set_end_date(2021, 6, 1) self.set_cash(100000) self.vix = self.add_index("VIX").symbol
namespace QuantConnect { public class USCashIndexAlgorithm : QCAlgorithm { private Symbol _symbol; public override void Initialize() { SetStartDate(2020, 6, 1); SetEndDate(2021, 6, 1); SetCash(100000); _symbol = AddIndex("VIX").Symbol; } } }
For more information about creating Index subscriptions, see Requesting Data.
Accessing Data
To get the current US Cash Indices data, index the Barsbars or Ticksticks properties of the current Slice with the Index Symbol. Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.
def on_data(self, slice: Slice) -> None: if self.vix in slice.bars: trade_bar = slice.bars[self.vix] self.log(f"{self.vix} close at {slice.time}: {trade_bar.close}" if self.vix in slice.ticks: ticks = slice.ticks[self.vix] for tick in ticks: self.log(f"{self.vix} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice) { if (slice.Bars.ContainsKey(_symbol)) { var tradeBar = slice.Bars[_symbol]; Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}"); } if (slice.Ticks.ContainsKey(_symbol)) { var ticks = slice.Ticks[_symbol]; foreach (var tick in ticks) { Log($"{_symbol} price at {slice.Time}: {tick.Price}"); } } }
You can also iterate through all of the data objects in the current Slice.
def on_data(self, slice: Slice) -> None: for symbol, trade_bar in slice.bars.items(): self.log(f"{symbol} close at {slice.time}: {trade_bar.close}") for symbol, ticks in slice.ticks.items():: for tick in ticks: self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice) { foreach (var kvp in slice.Bars) { var symbol = kvp.Key; var tradeBar = kvp.Value; Log($"{symbol} price at {slice.Time}: {tradeBar.Close}"); } foreach (var kvp in slice.Ticks) { var symbol = kvp.Key; var ticks = kvp.Value; foreach (var tick in ticks) { Log($"{symbol} price at {slice.Time}: {tick.Price}"); } } }
For more information about accessing US Index data, see Handling Data.
Historical Data
To get historical US Cash Indices data, call the Historyhistory method with the Index Symbol. If there is no data in the period you request, the history result is empty.
# DataFrame history_df = self.history(self.vix, 100, Resolution.DAILY) # TradeBar objects history_bars = self.history[TradeBar](self.vix, 100, Resolution.DAILY) # Tick objects history_ticks = self.history[Tick](self.vix, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects var historyBars = History(_symbol, 100, Resolution.Daily); // Tick objects var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);
For more information about historical data, see History Requests.
Example Applications
The US Cash Indices enables you to incorporate popular US indices into your trading algorithms. Examples include the following use cases:
- Exploring the difference between the Index and the ETF that tracks it
- Using these indices as the underlying asset for US Index Options strategies
- Understanding the stock market's level of expected forward-looking volatility, also known as the "fear index". When the VIX starts moving higher, it is telling you that traders are getting nervous. When the VIX starts moving lower, it is telling you that traders are gaining confidence.
For more example algorithms, see Examples.