Back

[Update] Dividends, Splits and Custom Price Normalization

We're happy to announce a new feature in QuantConnect -- custom split and dividend handling! Currently all the dividend and splits are factored into the asset price. Starting today you can control how the algorithm models reality!

E.g. Do you want raw asset prices, with dividends paid as cash and splits adjusting the quantity of your holdings? This is the closest possible to reality, and can be achieved with the new setting: DataNormalizationMode.Raw

Would you prefer splits adjusted into the price, but dividends paid in cash? This is ideal for charting since the price is continuous, but the dividends are still paid in cash. You can use this mode with: DataNormalizationMode.SplitAdjusted

How about Total Return charting? Where dividends are added into the price of the asset, so the total asset price includes the sum of dividends? This is a popular technique to account for the receipt and reinvestment of dividends. You can access this mode with: DataNormalizationMode.TotalReturn

The current, default behavior of QuantConnect is to fully adjust for splits and dividends, giving you an adjusted price which always equals today's price. This is ideal for easy charting and simplified portfolio modeling. We kept this as the default since the stock plots rely on adjusted pricing.

To get started with customized price normalization, set the mode on the security during the Initialize() method: e.g.
Securities["MSFT"].SetDataNormalizationMode(DataNormalizationMode.TotalReturn);


You can also bind to Dividends and Splits events:
public void OnData(Splits split) {
split["MSFT"].SplitFactor
}
public void OnData(Dividends dividends) {
dividends["MSFT"].Distribution
}


Check out the QC University algorithm below as an example of how to get started!
Update Backtest






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