Hi all, I have a question regarding getting adjusted prices in the local LEAN research notebook versus a cloud server (QC website). I'm working inside the research environment (research.ipynb) started through "lean research ...". I originally thought that when calling qb.History, I would be getting adjusted prices; however I don't believe that is the case anymore. An example code snippet (every stock split I've tested is the same) is below which shows that the prices are not adjusted. However, when I run the same code inside a research.ipynb on the QC website, the results are adjusted as expected. I would be grateful for any info resolving this discrepancy.
Code being run (note there was a stock split for GE in this time period):
from QuantConnect import *qb = QuantBook()ticker = "GE"asset = qb.AddEquity(ticker, Resolution.Daily)qb.Securities[ticker].SetDataNormalizationMode(DataNormalizationMode.Adjusted)history = qb.History(qb.Symbol(ticker), datetime(2021, 7, 23, 0, 0), datetime(2021, 8, 5, 0, 0), Resolution.Daily)
Results:
Case 1: Inside the LEAN research via ‘lean research project_name’ running locally(This is after purchasing the individual data file for GE along with the US Equity Security Master)
GE
2021-07-24 12.71 12.88 12.63 12.80
2021-07-31 12.95 13.21 12.92 13.16
2021-08-03 100.60 107.21 100.45 104.89
Case 2: Inside a Quanconnect Algorithm (website) using research.ipynb
2021-07-3180.39458482.03972480.20834281.6982809092309.02021-08-0378.06655683.19597877.95015481.39563631244634.0
Ben Kunsberg
For some reason, I can't edit more than once and the formatting above is different than I expected. For better clarity:
Code:
Case 1: Inside the LEAN research via ‘lean research project_name’ running locally
GE
2021-07-24 12.71 12.88 12.63 12.80
2021-07-31 12.95 13.21 12.92 13.16
2021-08-03 100.60 107.21 100.45 104.89
Case 2: Inside a Quanconnect Algorithm (website) using research.ipynb
2021-07-31 80.39 82.03 80.20 81.69
02021-08-03 78.06 83.19 77.95 81.39
Louis Szeto
Hi Ben
For corporate event adjustment in local machine, you'll also need to subscribe to the US Equity Security Master dataset.
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.
Ben Kunsberg
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!