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,010 People Enrolled
Learn algorithmic trading with python for FX. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 20,590 People Enrolled
Learn algorithmic trading with python for Futures. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 7,423 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 | 28,794 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 >
Tactical
Dataset by ExtractAlpha
The Tactical dataset by ExtractAlpha is a stock scoring algorithm that captures the technical dynamics of individual US Equities over one to ten trading day horizons. It can assist a longer-horizon investor in timing their entry or exit points or be used in combination with existing systematic or qualitative strategies with similar holding periods.
The data covers a dynamic universe of around 4,700 US Equities per day on average, starts in January 2000, and is delivered on a daily frequency. The Tactical dataset expands upon simple reversal, liquidity, and seasonality factors to identify stocks that are likely to trend or reverse.
This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.
ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.
The following snippet demonstrates how to request data from the Tactical dataset:
from QuantConnect.DataSource import *
self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaTacticalModel, self.aapl).symbol
using QuantConnect.DataSource;
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<ExtractAlphaTacticalModel>(_symbol).Symbol;
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 2000 |
Asset Coverage | 5,000 US Equities |
Data Density | Sparse |
Resolution | Daily |
Timezone | UTC |
The Tactical dataset enables you to gain insight into short-term stock dynamics for trading. Examples include the following strategies:
For more example algorithms, see Examples.
The Tactical dataset provides ExtractAlphaTacticalModel objects, which have the following attributes:
To add Tactical data to your algorithm, call the AddDataadd_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.
class ExtractAlphaTacticalModelDataAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2019, 1, 1)
self.set_end_date(2020, 6, 1)
self.set_cash(100000)
self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaTacticalModel, self.aapl).symbol
namespace QuantConnect
{
public class ExtractAlphaTacticalModelDataAlgorithm : QCAlgorithm
{
private Symbol _symbol, _datasetSymbol;
public override void Initialize()
{
SetStartDate(2019, 1, 1);
SetEndDate(2020, 6, 1);
SetCash(100000);
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<ExtractAlphaTacticalModel>(_symbol).Symbol;
}
}
}
To get the current Tactical 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 on_data(self, slice: Slice) -> None:
if slice.contains_key(self.dataset_symbol):
data_point = slice[self.dataset_symbol]
self.log(f"{self.dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
if (slice.ContainsKey(_datasetSymbol))
{
var dataPoint = slice[_datasetSymbol];
Log($"{_datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
}
}
To iterate through all of the dataset objects in the current Slice, call the Getget method.
def on_data(self, slice: Slice) -> None:
for dataset_symbol, data_point in slice.get(ExtractAlphaTacticalModel).items():
self.log(f"{dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
foreach (var kvp in slice.Get<ExtractAlphaTacticalModel>())
{
var datasetSymbol = kvp.Key;
var dataPoint = kvp.Value;
Log($"{datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
}
}
To get historical Tactical data, call the Historyhistory 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_df = self.history[ExtractAlphaTacticalModel](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaTacticalModel>(_datasetSymbol, 100, Resolution.Daily);
For more information about historical data, see History Requests.
To remove a subscription, call the RemoveSecurityremove_security method.
self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);
If you subscribe to Tactical data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes.
The Tactical dataset provides ExtractAlphaTacticalModel objects, which have the following attributes:
The following example algorithm creates a dynamic universe of the 100 most liquid US Equities. Each day, it then forms an equal-weighted dollar-neutral portfolio of the 10 companies that are most likely to outperform and the 10 that are most likely to underperform.
from AlgorithmImports import *
from QuantConnect.DataSource import *
class ExtractAlphaTacticalModelAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2021, 10, 10)
self.set_end_date(2023, 10, 10)
self.set_cash(100000)
# A variable to control the time of rebalance
self.last_time = datetime.min
self.add_universe(self.my_coarse_filter_function)
self.universe_settings.resolution = Resolution.MINUTE
def my_coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
# Select non-penny stocks with highest dollar volume due to better informed information from more market activities
# Only the ones with fundamental data are supported by tactical data
sorted_by_dollar_volume = sorted([x for x in coarse if x.has_fundamental_data and x.price > 4],
key=lambda x: x.dollar_volume, reverse=True)
selected = [x.symbol for x in sorted_by_dollar_volume[:100]]
return selected
def on_data(self, slice: Slice) -> None:
if self.last_time > self.time: return
# Trade only based on the updated tactical data
points = slice.Get(ExtractAlphaTacticalModel)
# Long the ones with the highest return estimates riding from tactical strategies
# Short the lowest that predicted stock price goes down
sorted_by_score = sorted([x for x in points.items() if x[1].score], key=lambda x: x[1].score)
long_symbols = [x[0].underlying for x in sorted_by_score[-10:]]
short_symbols = [x[0].underlying for x in sorted_by_score[:10]]
# Liquidate the ones without a strong tactical support
for symbol in [x.symbol for x in self.portfolio.Values if x.invested]:
if symbol not in long_symbols + short_symbols:
self.liquidate(symbol)
# Invest equally and dollar-neutral to evenly dissipate capital risk and hedge systematic risk
long_targets = [PortfolioTarget(symbol, 0.05) for symbol in long_symbols]
short_targets = [PortfolioTarget(symbol, -0.05) for symbol in short_symbols]
self.set_holdings(long_targets + short_targets)
self.last_time = Expiry.END_OF_DAY(self.time)
def on_securities_changed(self, changes: SecurityChanges) -> None:
for security in changes.added_securities:
# Requesting tactical data for trading signal generation
extract_alpha_tactical_model_symbol = self.add_data(ExtractAlphaTacticalModel, security.symbol).symbol
# Historical Data
history = self.history(extract_alpha_tactical_model_symbol, 60, Resolution.DAILY)
self.debug(f"We got {len(history)} items from our history request")
using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Algorithm;
using QuantConnect.Algorithm.Framework.Portfolio;
using QuantConnect.Data;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.DataSource;
namespace QuantConnect
{
public class ExtractAlphaTacticalModelAlgorithm : QCAlgorithm
{
// A variable to control the time of rebalance
private DateTime _time = DateTime.MinValue;
public override void Initialize()
{
SetStartDate(2021, 10, 10);
SetEndDate(2023, 10, 10);
SetCash(100000);
AddUniverse(MyCoarseFilterFunction);
UniverseSettings.Resolution = Resolution.Minute;
}
private IEnumerable<Symbol> MyCoarseFilterFunction(IEnumerable<CoarseFundamental> coarse)
{
// Select non-penny stocks with highest dollar volume due to better informed information from more market activities
// Only the ones with fundamental data are supported by tactical data
return (from c in coarse
where c.HasFundamentalData && c.Price > 4
orderby c.DollarVolume descending
select c.Symbol).Take(100);
}
public override void OnData(Slice slice)
{
if (_time > Time) return;
// Trade only based on the updated tactical data
var points = slice.Get<ExtractAlphaTacticalModel>();
// Long the ones with the highest return estimates riding from tactical strategies
// Short the lowest that predicted stock price goes down
var sortedByScore = from s in points.Values
where (s.Score != null)
orderby s.Score descending
select s.Symbol.Underlying;
var longSymbols = sortedByScore.Take(10).ToList();
var shortSymbols = sortedByScore.TakeLast(10).ToList();
// Liquidate the ones without a strong tactical support
foreach (var kvp in Portfolio)
{
var symbol = kvp.Key;
if (kvp.Value.Invested &&
!longSymbols.Contains(symbol) &&
!shortSymbols.Contains(symbol))
{
Liquidate(symbol);
}
}
// Invest equally and dollar-neutral to evenly dissipate capital risk and hedge systematic risk
var targets = new List<PortfolioTarget>();
targets.AddRange(longSymbols.Select(symbol => new PortfolioTarget(symbol, 0.05m)));
targets.AddRange(shortSymbols.Select(symbol => new PortfolioTarget(symbol, -0.05m)));
SetHoldings(targets);
_time = Expiry.EndOfDay(Time);
}
public override void OnSecuritiesChanged(SecurityChanges changes)
{
foreach(var security in changes.AddedSecurities)
{
// Requesting tactical data for trading signal generation
var extractAlphaTacticalModelSymbol = AddData<ExtractAlphaTacticalModel>(security.Symbol).Symbol;
// Historical Data
var history = History(new[]{extractAlphaTacticalModelSymbol}, 60, Resolution.Daily);
Debug($"We got {history.Count()} items from our history request");
}
}
}
}
The following example algorithm creates a dynamic universe of the 100 most liquid US Equities. Each day, it then forms an equal-weighted dollar-neutral portfolio of the 10 companies that are most likely to outperform and the 10 that are most likely to underperform.
from AlgorithmImports import *
from QuantConnect.DataSource import *
class ExtractAlphaTacticalModelAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2021, 10, 10)
self.set_end_date(2023, 10, 10)
self.set_cash(100000)
self.add_universe(self.my_coarse_filter_function)
self.universe_settings.resolution = Resolution.MINUTE
# Custom alpha model to generate trading signal based on tactical data
self.add_alpha(ExtractAlphaTacticalModelAlphaModel())
# Invest equally and dollar-neutral to evenly dissipate capital risk and hedge systematic risk
self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())
self.set_execution(ImmediateExecutionModel())
def my_coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
# Select non-penny stocks with highest dollar volume due to better informed information from more market activities
# Only the ones with fundamental data are supported by tactical data
sorted_by_dollar_volume = sorted([x for x in coarse if x.has_fundamental_data and x.price > 4],
key=lambda x: x.dollar_volume, reverse=True)
selected = [x.symbol for x in sorted_by_dollar_volume[:100]]
return selected
class ExtractAlphaTacticalModelAlphaModel(AlphaModel):
def __init__(self) -> None:
# A variable to control the time of rebalance
self.day = -1
def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
if self.day == algorithm.time.day: return []
self.day = algorithm.time.day
# Trade only based on the updated tactical data
points = slice.Get(ExtractAlphaTacticalModel)
# Long the ones with the highest return estimates riding from tactical strategies
# Short the lowest that predicted stock price goes down
sorted_by_score = sorted([x for x in points.items() if x[1].score], key=lambda x: x[1].score)
long_symbols = [x[0].underlying for x in sorted_by_score[-10:]]
short_symbols = [x[0].underlying for x in sorted_by_score[:10]]
insights = []
for symbol in long_symbols:
insights.append(Insight.price(symbol, Expiry.END_OF_DAY, InsightDirection.UP))
for symbol in short_symbols:
insights.append(Insight.price(symbol, Expiry.END_OF_DAY, InsightDirection.DOWN))
return insights
def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
for security in changes.added_securities:
# Requesting tactical data for trading signal generation
extract_alpha_tactical_model_symbol = algorithm.add_data(ExtractAlphaTacticalModel, security.symbol).symbol
# Historical Data
history = algorithm.history(extract_alpha_tactical_model_symbol, 60, Resolution.DAILY)
algorithm.debug(f"We got {len(history)} items from our history request")
using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Algorithm;
using QuantConnect.Algorithm.Framework.Portfolio;
using QuantConnect.Algorithm.Framework.Alphas;
using QuantConnect.Algorithm.Framework.Execution;
using QuantConnect.Data;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.DataSource;
namespace QuantConnect
{
public class ExtractAlphaTacticalModelAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2021, 10, 10);
SetEndDate(2023, 10, 10);
SetCash(100000);
AddUniverse(MyCoarseFilterFunction);
UniverseSettings.Resolution = Resolution.Minute;
// Custom alpha model to generate trading signal based on tactical data
AddAlpha(new ExtractAlphaTacticalModelAlphaModel());
// Invest equally and dollar-neutral to evenly dissipate capital risk and hedge systematic risk
SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel());
SetExecution(new ImmediateExecutionModel());
}
private IEnumerable<Symbol> MyCoarseFilterFunction(IEnumerable<CoarseFundamental> coarse)
{
// Select non-penny stocks with highest dollar volume due to better informed information from more market activities
// Only the ones with fundamental data are supported by tactical data
return (from c in coarse
where c.HasFundamentalData && c.Price > 4
orderby c.DollarVolume descending
select c.Symbol).Take(100);
}
}
public class ExtractAlphaTacticalModelAlphaModel: AlphaModel
{
// A variable to control the time of rebalance
public DateTime _time;
public ExtractAlphaTacticalModelAlphaModel()
{
_time = DateTime.MinValue;
}
public override IEnumerable<Insight> Update(QCAlgorithm algorithm, Slice slice)
{
if (_time > algorithm.Time) return new List<Insight>();
// Trade only based on the updated tactical data
var points = slice.Get<ExtractAlphaTacticalModel>();
// Long the ones with the highest return estimates riding from tactical strategies
// Short the lowest that predicted stock price goes down
var sortedByScore = from s in points.Values
where (s.Score != null)
orderby s.Score descending
select s.Symbol.Underlying;
var longSymbols = sortedByScore.Take(10).ToList();
var shortSymbols = sortedByScore.TakeLast(10).ToList();
var insights = new List<Insight>();
insights.AddRange(longSymbols.Select(symbol => new Insight(symbol, Expiry.EndOfDay, InsightType.Price, InsightDirection.Up)));
insights.AddRange(shortSymbols.Select(symbol => new Insight(symbol, Expiry.EndOfDay, InsightType.Price, InsightDirection.Down)));
_time = Expiry.EndOfDay(algorithm.Time);
return insights;
}
public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
{
foreach(var security in changes.AddedSecurities)
{
// Requesting tactical data for trading signal generation
var extractAlphaTacticalModelSymbol = algorithm.AddData<ExtractAlphaTacticalModel>(security.Symbol).Symbol;
// Historical Data
var history = algorithm.History(new[]{extractAlphaTacticalModelSymbol}, 60, Resolution.Daily);
algorithm.Debug($"We got {history.Count()} items from our history request");
}
}
}
}
Tactical is allowed to be used in the cloud for personal and commercial projects with a subscription. The data is permissioned for use within the licensed organization only
Subscription Required | License Now
Tactical can be downloaded on premise with the LEAN CLI, for a charge per file downloaded. This download is for the licensed organization's internal LEAN use only and cannot be redistributed or converted in any format.
Starting at 10 QCC/file | Learn More
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.
lean data download \
--dataset "Tactical" \
--ticker "AAPL, MSFT"
lean data download `
--dataset "Tactical" `
--ticker "AAPL, MSFT"
Download Composite Factor Bundle historical records for your LEAN backtesting and live trading on premise with the LEAN CLI.
Using ExtractAlpha Tactical 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 2 licensing options
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 .