What is Boot Camp?
Boot Camp is a great way to improve your skills and learn the QuantConnect API in easily digestible portions.
Don't have an account? Join QuantConnect Today
We are dedicated to providing investors with a cutting-edge platform for rapidly creating quant investment strategies. Founded in 2012, we've empowered more than 250,000 quants and engineers to create and trade their ideas.
Quickly and easily started with our API to build your strategy. The learning center lessons are interactive, step-by-step guides to make you productive as fast as possible.
Focus your efforts on driving alpha, not parsing CSV files. Our cloud offers hundreds of terabytes of traditional and alternative data preformatted, cleaned, and instantly accessible by our API.
Coordinate teamwork, control access permissions, and your shared cloud resources. Grow your trading organization safely and efficiently on top of our cloud architecture.
A selection of streaming live-trading strategies written by QuantConnect, and top highlights from the community available to follow and clone. Peer into detailed real-time positions to gain insight for your own trading.
What is Boot Camp?
Boot Camp is a great way to improve your skills and learn the QuantConnect API in easily digestible portions.
A collection of courses from independent educators to improve your quant skill base and create better strategies.
Solidify and expand your quant skill base with courses at QuantConnect
Learn algorithmic trading with python for US Equities. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 96,354 People Enrolled
Learn algorithmic trading with python for FX. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 20,642 People Enrolled
Learn algorithmic trading with python for Futures. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 7,480 People Enrolled
In this algorithmic trading tutorial series you will learn everything you need to know to start writing your own trading bots using Python and the QuantConnect quantitative trading platform.
Author: Louis
Free | 29,043 People Enrolled
Master algorithmic trading on QuantConnect; backtest and live trade Stocks, Options, Futures, Forex, and Crypto.
Author: Cheng Li
Paid | Enroll on Udemy
Learn to use Python, Pandas, Matplotlib, and the QuantConnect Lean Engine to perform financial analysis and trading.
Author: Jose Portilla, Pierian Training
Paid | Enroll on Udemy
Learn to write programs that algorithmically trade cryptocurrencies using QuantConnect (C#).
Author: Eric Summers
Paid | Enroll on Udemy
Organization Notes
Get Started with Algorithm Lab
New Research
Optimizing a Gold-SPY Portfolio Using Hidden Markov Models for Market Downtime
Gold-SPY portfolio optimization using Hidden Markov Models for minimizing market downturn risk....
ReadAlgorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.
Sign Up for FreeAlready have an account Log In.
This account is protected by two-factor authentication.
Request Token Information Reset My TokenCreated | Last Time Used | Agent | |
---|---|---|---|
No entries found |
To continue please enter your email:
(No google account required)
To verify that everything goes well please enter the 6 digit verification code generated by the authenticator application
Algorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.
Sign Up for FreeAlready have an account Log In.
Please stop one of the following coding sessions, or upgrade your account.
NAME | ORGANIZATION |
---|
QuantConnect Datasets
Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.
Datasets >
Dashboard
A transparent, community reporting system. Report suspected issues with our cloud data to be investigated by the QuantConnect Team.
Issue List
Loading...
Data Explorer Issues are a way to report and track data problems. They give the QuantConnect community a way to discuss potential solutions and be notified when they are resolved. If you think you have found a data problem please check the existing open and closed issues first; often another user may have already reported your problem.
Does your issue match any of the already listed issues?
Thank you for your contribution! Our team is currently working on resolving these issues, please subscribe to them to receive updates.
Datasets >
Cash Indices
Dataset by QuantConnect
The Cash Indices dataset by QuantConnect covers 125 US Indices and 3 International indices. The data starts on various dates from January 1998 and is delivered on any frequency from minute to daily.
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.
The Cash Indices dataset does not provide a live data feed. To receive Cash Indices' data in your live algorithm, you must add a brokerage or a third-party data provider (see Cloud Platform > Datasets).
The following snippet demonstrates how to request data from the Cash Indices dataset:
self.vix = self.add_index("VIX", Resolution.DAILY).symbol
_symbol = AddIndex("VIX", Resolution.Daily).Symbol;
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 1998 |
Coverage | 125 US Indices and 3 International indices (HSI, SX5E and N225) |
Data Density | Dense |
Resolution | Minute, Hour, & Daily |
Timezone | New York for US Indices, refer to Supported Assets below for International indices |
Market Hours | Regular Only |
The Cash Indices enables you to incorporate popular indices into your trading algorithms. Examples include the following use cases:
For more example algorithms, see Examples.
The Cash Indices dataset provides TradeBar object.
TradeBar objects have the following attributes:
The following table shows the US Cash indices with Index Option support:
Ticker | Index | Expiry | Start Date |
---|---|---|---|
VIX | S&P500 | 30 Days | Jul 2003 |
SPX | S&P500 | - | Jan 1998 |
NDX | NASDAQ-100 | - | Jan 1998 |
RUT | Russell 2000 | - | Jan 2008 |
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.
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.
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.
The Russell 2000 Index is a small-cap U.S. stock market index that makes up the smallest 2,000 stocks in the Russell Index. It was started by the Frank Russell Company in 1984. The index is maintained by FTSE Russell, a subsidiary of the London Stock Exchange Group (LSEG).
Indices Available (125). Note: QuantConnect is working on its modeling: market hours and symbol properties. | |||||
---|---|---|---|---|---|
AEX | ASX | BKX | BRR | BRTI | BXD |
BXM | BXN | BXR | CEX | CLL | COMP |
COR1M | COR1Y | COR30D | COR3M | COR6M | COR9M |
CXU | DAX | DJCIAGC | DJCICC | DJCIEN | DJCIGC |
DJCIGR | DJCIIK | DJCIKC | DJCISB | DJCISI | DJI |
DJINET | DJR | DJTTR | DJX | DRG | DUX |
DVS | DWCF | DWCPF | DWLG | DWLV | DXL |
DXY | EVZ | FVX | GVZ | HGX | LOVOL |
MID | MIDG | MIDV | MRUT | NDX | NQX |
NYA | NYFANG | NYXBT | OEX | OSX | OVX |
PUT | REIT | RUA | RUI | RUT | RVX |
RXM | SET | SGX | SKEW | SMILE | SMLG |
SP500LVOL | SP600 | SPEN | SPGSCI | SPMPG | SPMPV |
SPRI | SPRO | SPSIBI | SPSPG | SPSPV | SPSV |
SPTMI | SPX | SPXPG | SPXPV | SVX | TNX |
TYX | UKX | UTIL | UTY | VIF | VIN |
VIX | VIX1D | VIX1Y | VIX3M | VIX6M | VIX9D |
VOLI | VPD | VPN | VVIX | VWA | VWB |
VXD | VXN | VXO | VXSLV | VXTH | VXTLT |
W5000 | WPUT | XAU | XAX | XDA | XDB |
XEO | XMI | XNDX | XSP | XSR |
The following table shows the International Cash indices:
Ticker | Index | Start Date | Time Zone | Currency |
---|---|---|---|---|
HSI | Hang Seng Index | Dec 2006 | Asia/Hong Kong | HKD |
SX5E | EUREX EU STOXX | Jul 2003 | Europe/Berlin | EUR |
N225 | Nikkei 225 | Jul 2003 | Asia/Tokyo | JPY |
To add 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 CashIndexAlgorithm(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 CashIndexAlgorithm : 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.
To get the current Cash Indices data, index the Barsbars property 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}")
public override void OnData(Slice slice)
{
if (slice.Bars.ContainsKey(_symbol))
{
var tradeBar = slice.Bars[_symbol];
Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
}
}
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}")
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}");
}
}
For more information about accessing Index data, see Handling Data.
To get historical 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)
// TradeBar objects
var historyBars = History(_symbol, 100, Resolution.Daily);
For more information about historical data, see History Requests.
To remove an Index subscription, call the RemoveSecurityremove_security method.
self.remove_security(self.vix)
RemoveSecurity(_symbol);
The Cash Indices dataset provides TradeBar object.
TradeBar objects have the following attributes:
The following example algorithm tracks the 80-day EMA and 200-day EMA of SPX. When the short EMA crosses above the long EMA, the algorithm buys SPY. Otherwise, it holds cash.
from AlgorithmImports import *
from QuantConnect.DataSource import *
class IndexDataAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2020, 1, 1)
self.set_end_date(2021, 7, 8)
self.set_cash(100000)
# Request SPY data as a trading vehicle for SPX
self.spy = self.add_equity("SPY").symbol
# Request SPX data for trade signal generation
spx = self.add_index("SPX").symbol
# Create short and long-term EMA indicators for trend estimation to trade
self.ema_fast = self.EMA(spx, 80, Resolution.DAILY)
self.ema_slow = self.EMA(spx, 200, Resolution.DAILY)
self.set_warm_up(200, Resolution.DAILY)
# Historical data
history = self.history(spx, 60, Resolution.DAILY)
self.debug(f'We got {len(history.index)} items from our history request')
def on_data(self, slice: Slice) -> None:
# Trade signals required indicators to be ready
if self.is_warming_up or not self.ema_slow.is_ready:
return
# If short-term EMA is above long-term, it indicates an up trend, so we buy SPY
if not self.portfolio.invested and self.ema_fast > self.ema_slow:
self.set_holdings(self.spy, 1)
# If it is the reverse, it indicates a downtrend, and we liquidate any position
elif self.ema_fast < self.ema_slow:
self.liquidate()
using QuantConnect.DataSource;
namespace QuantConnect
{
public class IndexDataAlgorithm : QCAlgorithm
{
private Symbol _spy;
private ExponentialMovingAverage _emaSlow;
private ExponentialMovingAverage _emaFast;
public override void Initialize()
{
SetStartDate(2020, 1, 1);
SetEndDate(2021, 7, 8);
SetCash(1000000);
// Request SPY data as trading vehicle for SPX
_spy = AddEquity("SPY").Symbol;
// Request SPX data for trade signal generation
var spx = AddIndex("SPX").Symbol;
// Create short and long-term EMA indicators for trend estimation to trade
_emaFast = EMA(spx, 80, Resolution.Daily);
_emaSlow = EMA(spx, 200, Resolution.Daily);
SetWarmUp(200, Resolution.Daily);
// Historical data
var history = History(spx, 60, Resolution.Daily);
Debug($"We got {history.Count()} items from our history request");
}
public override void OnData(Slice slice)
{
// Trade signals required indicators to be ready
if (IsWarmingUp || !_emaSlow.IsReady)
{
return;
}
// If short-term EMA is above long-term, it indicates an up trend, so we buy SPY
if (!Portfolio.Invested && _emaFast > _emaSlow)
{
SetHoldings(_spy, 1);
}
// If it is the reverse, it indicates a downtrend, and we liquidate any position
else if (_emaFast < _emaSlow)
{
Liquidate();
}
}
}
}
The following example algorithm tracks the 80-day EMA and 200-day EMA of SPX. When the short EMA crosses above the long EMA, the algorithm buys SPY. Otherwise, it holds cash.
from AlgorithmImports import *
from QuantConnect.DataSource import *
class IndexDataAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2020, 1, 1)
self.set_end_date(2021, 7, 8)
self.set_cash(100000)
# Universe contains only SPY as a trading vehicle for SPX
self.set_universe_selection(ManualUniverseSelectionModel
(
Symbol.create("SPY", SecurityType.EQUITY, Market.USA)
))
# Custom alpha model that emits insights based on SPX index data
self.set_alpha(SpxEmaCrossAlphaModel(self))
# Equally investing can dissipate non-systematic risky event's capital concentration risk evenly
self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel(Expiry.END_OF_MONTH))
class SpxEmaCrossAlphaModel(AlphaModel):
def __init__(self, algorithm: QCAlgorithm) -> None:
# Request SPX data for trade signal generation
spx = algorithm.add_index("SPX").symbol
# Create short and long-term EMA indicators for trend estimation to trade
self.ema_fast = algorithm.EMA(spx, 80, Resolution.DAILY)
self.ema_slow = algorithm.EMA(spx, 200, Resolution.DAILY)
algorithm.set_warm_up(200, Resolution.DAILY)
# Historical data
history = algorithm.history(spx, 60, Resolution.DAILY)
algorithm.debug(f'We got {len(history.index)} items from our history request')
def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
# Trade signals required indicators to be ready
if algorithm.is_warming_up or not self.ema_slow.is_ready:
return []
# If short-term EMA is above long-term, it indicates an up trend, so we buy SPY
if not algorithm.portfolio.invested and self.ema_fast > self.ema_slow:
return [Insight.price(kvp.key, Expiry.END_OF_MONTH, InsightDirection.UP)
for kvp in algorithm.active_securities if kvp.value.is_tradable]
# If it is the reverse, it indicates downtrend, and we liquidate any position
elif self.ema_fast < self.ema_slow:
return [Insight.price(kvp.key, Expiry.END_OF_MONTH, InsightDirection.FLAT)
for kvp in algorithm.active_securities if kvp.value.is_tradable]
return []
using QuantConnect.DataSource;
namespace QuantConnect
{
public class IndexDataAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2020, 1, 1);
SetEndDate(2021, 7, 8);
SetCash(1000000);
// Universe contains only SPY as a trading vehicle for SPX
SetUniverseSelection(new ManualUniverseSelectionModel
(
QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)
));
// Custom alpha model that emits insights based on SPX index data
SetAlpha(new SpxEmaCrossAlphaModel(this));
// Equally invests can dissipate non-systematic risky event's capital concentration risk evenly
SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel(Expiry.EndOfMonth));
}
}
public class SpxEmaCrossAlphaModel : AlphaModel
{
private ExponentialMovingAverage _emaSlow;
private ExponentialMovingAverage _emaFast;
public SpxEmaCrossAlphaModel(QCAlgorithm algorithm)
{
// Request SPX data for trade signal generation
var spx = algorithm.AddIndex("SPX").Symbol;
// Create short and long-term EMA indicators for trend estimation to trade
_emaFast = algorithm.EMA(spx, 80, Resolution.Daily);
_emaSlow = algorithm.EMA(spx, 200, Resolution.Daily);
algorithm.SetWarmUp(200, Resolution.Daily);
// Historical data
var history = algorithm.History(spx, 60, Resolution.Daily);
algorithm.Debug($"We got {history.Count()} items from our history request");
}
public override IEnumerable<Insight> Update(QCAlgorithm algorithm, Slice slice)
{
// Trade signals required indicators to be ready
if (algorithm.IsWarmingUp || !_emaSlow.IsReady)
{
return Enumerable.Empty<Insight>();
}
// If short-term EMA is above long-term, it indicates an up trend, so we buy SPY
if (!algorithm.Portfolio.Invested && _emaFast > _emaSlow)
{
return algorithm.ActiveSecurities
.Where(kvp => kvp.Value.IsTradable)
.Select(kvp => Insight.Price(kvp.Key, Expiry.EndOfMonth, InsightDirection.Up));
}
// If it is the reverse, it indicates downtrend, and we liquidate any position
else if (_emaFast < _emaSlow)
{
return algorithm.ActiveSecurities
.Where(kvp => kvp.Value.IsTradable)
.Select(kvp => Insight.Price(kvp.Key, Expiry.EndOfMonth, InsightDirection.Flat));
}
return Enumerable.Empty<Insight>();
}
}
}
Cash Indices is allowed to be used in the cloud for personal and commercial projects for free. The data is permissioned for use within the licensed organization only
Free | Documentation
LEAN CLI is a cross-platform wrapper on the QuantConnect algorithmic trading engine called LEAN. The CLI makes using LEAN incredibly easy, reducing most of the pain points of developing and managing an algorithmic trading strategy to a few lines of bash.
Using the CLI you can download the same data QuantConnect hosts in the cloud for a small fee. These fees are per file downloaded, and are paid for in QuantConnect-Credits (QCC). We recommend purchasing credits to enable downloading.
The CLI command generator is a helpful tool to generate a copy-paste command to download this dataset from the form below.
Freely harness gigabytes of Cash Indices data in the QuantConnect Cloud for your backtesting and live trading purposes.
What people are saying about this
This product has not received any reviews yet, be the first to post one!
Rate the Module:
Provider offers 1 licensing option
Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.
Dataset Status from to
No Runs
OK
Degraded
Failure
Explore free and paid datasets available on QuantConnect covering fundamentals, pricing, and alternative options.
Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum
Configuration Keys
Environment Variables
Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum
File Link
Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum
Lorem ipsum dolor sit amet conjectura lorem ipsum dolor sit amet conjectura lorem ipsum
Upload a manually created tar or zip file to all cloud data systems.
Add a link and click the Sync Dataset button to upload the dataset
Upload Destinations
The dataset synchronizer is an internal tool for the QuantConnect team to upload data to the
cloud data storage environments. It supports TAR files which are extracted in the root directory
of the cloud data environments.
Take extreme care to carefully structure your data TAR package with
the same folders as the LEAN data folder. Ensure all folders and file names are lowercase as Linux is case-sensitive.
Support
Algorithm Lab is your playground for developing and refining trading algorithms with QuantConnect. Utilize advanced tools, historical data, and robust backtesting to enhance your trading strategies. Transform your ideas into actionable insights and optimize your trading approach with ease.
Sign Up for FreeAlready have an account Log In.
â‘
â‘
â‘
â‘
â‘
Hover and click over the stars to rate us.
It looks like you are not fully satisfied with your experience on QuantConnect, please take a moment to let us know how we can improve our services for you:
If you have a minute to spare, please leave us a review on Trustpilot.
Stories like yours help others see the full potential of QuantConnect.
Organization Name |
---|
Upgrade to Team plan or higher to enable custom invoicing
Changes will be applied to future invoices.
Users will be able to join by following the link in the invitation email.
You’ve been invited by Jared Broad to join his G-Force Organization.
Would you like to accept the invitation?
Are you sure you want to delete the encryption key "undefined"?
Caution: We will not be able to decrypt encrypted projects without the original key.
Drag & Drop or
Keys are added to the local storage in your web browser and not uploaded to QuantConnect. To use an encrypted project on another computer you will need to bring a copy of the key.
This project is encrypted using the key .
This project will be encrypted using the key .