Back

Ex-Dividend Dates

Is there a way to get this information? I would want to close out my shorts before this date passes.
Update Backtest








0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


We currently fire off a dividend event when the dividend would be applied to your portfolio. You could implement this method. The Dividend type. The Dividends type. Short demo algorithm implementing OnData(Dividends) and OnData(Splits).
public void OnData(Dividends data)
{
// Dividends is a dictionary of Dividend data keyed by symbol
}
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


I think one needs this information before the dividend is "paid". Even though (I think) Lean fires this even on the ex-Dividend date and not the true payment date - which is technically incorrect - one still needs to know this information before market open.

TradingDay.EquityDividends might work for the day-of, but I don't think it is implemented.

I am guessing that external data must be used at this point if you want to know the date far in the future.

 

0

Hi Matthew,

It is correct that EquityDividends is not yet implemented, so external data must be used to utilize the ex-dividend date in a backtest. Refer to our previous thread for more information.

Best,
Derek Melchin

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Derek (and Matthew Martin, and Craig McWilliams!)

I wanted to place this message on the other thread, but it is closed from now on: adding the "ex-dividend date" in QC itself would help us building Alpha with this useful information.
As using daa from other sources is mostly not possible on Alphas, that is a pity we cannot currently use this piece of information, so important to develop sound option strategies.

Hopefully, you will add this soon! 

Keep up the good work!

0

Hi all,

One other thing I discovered that may be useful to others. It appears to me that the dividend event does fire at midnight of the ex-Dividend date, so in that sense, you can at least have the information before the market open. So you could close positions on open in response, just not days before.

 

0

Yes Matthew, but midnight is too late in the real-world trading (and Alpha Streams): we need to get that piece of information at the very least the day before...

0

Hi Guys.  I've been coding like a maniac.   I have found a source with a REST API. (Would that work in an Alpha?)     It's IEX Cloud.   I'll let you know when I have an implementation.

0

Hi Craig,

Since IEX is a trusted source,  it's possible to get this data inside an alpha model. Which product are you trying to use? We may implement it ourselves.

Best,
Derek Melchin

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Derek,

That is very good news.   Here is the endpoint:  

https://iexcloud.io/docs/api/#dividends

I seek to write an app that will take in a list of stock symbols and retrieve the dividend data.   Their documentation is comprehensive and some helper API codes are available as well.

 

 

0

Hi Craig,

Thank you for providing the endpoint. To retrieve dividend data from IEX, a paid subscription is required. We will consider building this data source into the LEAN engine.

Best,
Derek Melchin

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed