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!