I'd like to observe some data in a research notebook. When setting the Data Normalization to either Adjusted or Raw, the History returns the same data. This is concerning to me as Technical Indicators sometimes have to be manually fed data from the History.
How can I ensure the history data being requested is either Adjusted or Raw? I'd like the ability to choose whether my signals are derived form either Adjusted or Raw data.
Also, if I am to use data.Dividends[ticker].Distribution to see dividend payout in the OnData() method, how would I go about seeing the Dividends and other Corporate Actions in the Historical Data should I want to comb through that data further?
Thank you
from QuantConnect import *
qb = QuantBook()
ticker = "IBM"
asset = qb.AddEquity(ticker, Resolution.Daily)
qb.Securities[ticker].SetDataNormalizationMode(DataNormalizationMode.Adjusted)
history = qb.History(qb.Symbol(ticker), 10, Resolution.Daily)
history
Louis Szeto
Hi Felix
The method you’re using is correct. If you need to use raw price, just change DataNormalizationMode.Adjusted into DataNormalizationMode.Raw shall be fine. The reason for getting the same result is that there is no split or dividend event for IBM in the last 10 days, so there will be no price adjustment. Try to use a window like 252 days and you’ll see the difference in the prices before those events happen.
As per the distribution of dividends, we haven’t provided a historical data method to fetch an array-like structure to calculate the distribution for dividends. We recommend importing custom data to do so.
Best
Louis
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.
Felix C
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!