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 | 95,957 People Enrolled
Learn algorithmic trading with python for FX. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 20,570 People Enrolled
Learn algorithmic trading with python for Futures. Guided strategy development in easily digestible portions.
Author: QuantConnect
Free | 7,419 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,756 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 >
Upcoming Dividends
Dataset by EOD Historical Data
The Upcoming Dividends dataset, provided by EODHD, offers daily alerts for US Equities that will have a dividend event within the upcoming 7 days. The data starts in January 2015 and is delivered on a daily frequency.
Compared to US Equity Security Master as a benchmark, the Upcoming Dividends dataset has a 98.56% coverage of all dividend events, while having a 99.71% precision on the exact dividend dates of the covered ones and a 99.90% precision within +/- 3 days.
EOD Historical Data (EODHD) is a financial data provider based in France, and founded in April 2015. They focus on providing clean financial data, including stock prices, splits, dividends, fundamentals, macroeconomic indicators, technical indicators, and alternative data sources, through 24/7 API seamlessly. For more information about EODHD, visit https://eodhd.com/.
The following snippet demonstrates how to request data from the Upcoming Dividends dataset:
self.add_data(EODHDUpcomingDividends, "dividends")
self.add_universe(EODHDUpcomingDividends, self.selection_function)
using QuantConnect.DataSource;
AddUniverse<EODHDUpcomingDividends>(SelectionFunction);
AddData<EODHDUpcomingDividends>("dividends");
The following table describes the dataset properties:
Property | Value |
---|---|
Start Date | January 2015 |
Data Density | Sparse |
Resolution | Daily |
Timezone | New York |
The Upcoming Dividends dataset allows traders to trade the price change due to dividends. Examples include the following strategies:
For more example algorithms, see Examples.
The EODHD Upcoming Dividends dataset provides EODHDUpcomingDividends objects, which have the following attributes:
To select a dynamic universe of US Equities based on the Upcoming Dividends dataset, call the AddUniverseadd_universe method with a EODHDUpcomingDividends cast.
def initialize(self) -> None:
self._universe = self.add_universe(EODHDUpcomingDividends, self.universe_selection_filter)
def universe_selection_filter(self, dividends: List[EODHDUpcomingDividends]) -> List[Symbol]:
return [d.symbol for d in dividends if d.dividend_date <= self.time + timedelta(1) and d.dividend > 0.05]
public override void Initialize()
{
_universe = AddUniverse<EODHDUpcomingDividends>(UniverseSelectionFilter);
}
private IEnumerable<Symol> UniverseSelectionFilter(IEnumerable<BaseData> dividends)
{
return from EODHDUpcomingDividends d in dividends
where d.DividendsDate <= Time.AddDays(1) && d.Dividends > 0.05m
select d.Symbol;
}
For more information about universe settings, see Settings.
To add Upcoming Dividends data to your algorithm, call the AddData<EODHDUpcomingDividends>add_data method.
class UpcomingDividendsDataAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2019, 1, 1)
self.set_end_date(2020, 6, 1)
self.set_cash(100000)
self._symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(EODHDUpcomingDividends, "dividends").symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
public class UpcomingDividendsDataAlgorithm : 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<EODHDUpcomingDividends>("dividends").Symbol;
}
}
}
To get the current Upcoming Dividends data, call the Get<EODHDUpcomingDividends>get(EODHDUpcomingDividends) method from the current Slice and index the result with the security 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:
upcomings_dividends = slice.get(EODHDUpcomingDividends)
if upcomings_dividends and self._symbol in upcomings_dividends:
upcomings_dividends_data_point = upcomings_dividends[self._symbol]
self.log(f"{self._symbol} will pay dividend at {upcomings_dividends_data_point.dividend_date} with dividend per share of ${upcomings_dividends_data_point.dividend}")
public override void OnData(Slice slice)
{
var upcomingDividends = slice.Get<EODHDUpcomingDividends>();
if (upcomingDividends.TryGetValue(_symbol, out var upcomingDividendsDataPoint))
{
Log($"{_symbol} will pay dividend at {upcomingDividendsDataPoint.DividendDate} with dividend per share of ${upcomingDividendsDataPoint.Dividend}");
}
}
You can also iterate through all of the dataset objects in the current Slice
def on_data(self, slice: Slice) -> None:
for equity_symbol, upcomings_dividends_data_point in slice.get(EODHDUpcomingDividends).items():
self.log(f"{equity_symbol} will pay dividend at {upcomings_dividends_data_point.dividend_date} with dividend per share of ${upcomings_dividends_data_point.dividend}")
public override void OnData(Slice slice)
{
foreach (var kvp in slice.Get<EODHDUpcomingDividends>())
{
var equitySymbol = kvp.Key;
var upcomingDividendsDataPoint = kvp.Value;
Log($"{equitySymbol} will pay dividend at {upcomingDividendsDataPoint.DividendDate} with dividend per share of ${upcomingDividendsDataPoint.Dividend}");
}
}
To get historical Upcoming Dividends data, call the Historyhistory method with the type EODHDUpcomingDividends cast and the period of request. If there is no data in the period you request, the history result is empty.
history = self.history[EODHDUpcomingDividends](timedelta(100), Resolution.DAILY)
var history = History<EODHDUpcomingDividends>(TimeSpan.FromDays(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);
The EODHD Upcoming Dividends dataset provides EODHDUpcomingDividends objects, which have the following attributes:
The following example algorithm shorts each equity in equal size with an upcoming dividend by the next day. It selects stocks with dividend recording over $0.5 per share to capitalize on the price shock momentum due to dividend payment.
class UpcomingDividendsExampleAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2020, 1, 1)
self.set_end_date(2024, 10, 1)
self.set_cash(100000)
# Trade on a daily basis based on daily upcoming dividend signals.
self.universe_settings.resolution = Resolution.DAILY
# Universe consists of equities with upcoming dividend events.
self._universe = self.add_universe(EODHDUpcomingDividends, self.selection)
def selection(self, dividends: List[EODHDUpcomingDividends]) -> List[Symbol]:
# Select the stocks with upcoming dividend record date, with a sufficient dividend size.
return [x.symbol for x in dividends if x.dividend_date < self.time + timedelta(1) and x.dividend > 0.5]
def on_data(self, slice: Slice) -> None:
# Equally invest in each member of the universe to evenly dissipate the capital risk.
total_count = len(self._universe.selected)
targets = [PortfolioTarget.percent(self, symbol, -1. / total_count) for symbol in self._universe.selected]
self.set_holdings(targets, liquidate_existing_holdings=True)
namespace QuantConnect
{
public class UpcomingDividendsExampleAlgorithm : QCAlgorithm
{
private Universe _universe;
public override void Initialize()
{
SetStartDate(2020, 1, 1);
SetEndDate(2024, 10, 1);
SetCash(100000);
// Trade on daily basis based on daily upcoming dividend signals.
UniverseSettings.Resolution = Resolution.Daily;
// Universe consists of equities with upcoming dividend events.
_universe = AddUniverse<EODHDUpcomingDividends>((dividends) => {
// Select the stocks with upcoming dividend record date, with a sufficient dividend size.
return from EODHDUpcomingDividends d in dividends
where d.DividendDate < Time.AddDays(1) && d.Dividend > 0.5
select d.Symbol;
});
}
public override void OnData(Slice slice)
{
// Equally invest in each member of the universe to evenly dissipate the capital risk.
var totalCount = _universe.Members.Count;
var targets = _universe.Selected
.Select(symbol => (PortfolioTarget)PortfolioTarget.Percent(this, symbol, -1m / totalCount))
.ToList();
SetHoldings(targets, liquidateExistingHoldings=true);
}
}
}
The following example implements a strategy of shorting each equity in equal size with an upcoming dividend by the next day using the framework. It selects stocks with dividend recording over $0.5 per share to capitalize on the price shock momentum due to dividend payment.
class UpcomingDividendsExampleAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2020, 1, 1)
self.set_end_date(2024, 10, 1)
self.set_cash(100000)
# Trade on a daily basis based on upcoming dividend signals daily.
self.universe_settings.resolution = Resolution.DAILY
# Universe consists of equities with upcoming dividend events.
self._universe = self.add_universe(EODHDUpcomingDividends, self.selection)
# A constant alpha model will emit insights for the stocks with dividend events in the upcoming day.
# It is expecting a price shock due to pricing after the dividend, which might affect some momentum traders.
self.add_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.DOWN, timedelta(1)))
# Equal weighting for each signal to dissipate the capital risk evenly.
self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel(Expiry.END_OF_DAY))
def selection(self, splits: List[EODHDUpcomingDividends]) -> List[Symbol]:
# Select the stocks with upcoming dividend record dates with a sufficient dividend size.
return [x.symbol for x in dividends if x.dividend_date < self.time + timedelta(1) and x.dividend > 0.5]
namespace QuantConnect
{
public class UpcomingDividendsExampleAlgorithm : QCAlgorithm
{
private Universe _universe;
public override void Initialize()
{
SetStartDate(2020, 1, 1);
SetEndDate(2024, 10, 1);
SetCash(100000);
// Trade on a daily basis based on upcoming dividend signals daily.
UniverseSettings.Resolution = Resolution.Daily;
// Universe consists of equities with upcoming dividend events.
_universe = AddUniverse<EODHDUpcomingDividends>((dividends) => {
// Select the stocks with upcoming dividend record dates with a sufficient dividend size.
return from EODHDUpcomingDividends d in dividends
where d.DividendDate < Time.AddDays(1) && d.Dividend > 0.5
select d.Symbol;
});
// A constant alpha model will emit insights for the stocks with dividend events in the upcoming day.
// It is expecting a price shock due to pricing after the dividend, which might affect some momentum traders.
AddAlpha(new ConstantAlphaModel(InsightType.Price, InsightDirection.Down, TimeSpan.FromDays(1)));
// Equal weighting for each signal to dissipate the capital risk evenly.
SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel(Expiry.EndOfDay));
}
}
}
Upcoming Dividends 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.
Using Upcoming Dividends 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 .