Hi everyone,
I am trying to get the last price from the last working day but I believe I found an error in the data.
Am I doing something wrong?
In the attached backtest I get the last 8 hourly bars of 10 symbols at the end of the last working day. Retrieving less bars results no history at all (Does somebody knows why?).
Taking the last hourly bar I print the time and the close value. The time indicates the last hour of yesterday (Tue 14 Feb 2023) BUT the close for all the symbols corresponds to the day before yesterday (Mon 13 Feb 2023).
Here are the results:
2023-02-14 00:00:00 Last working day: Tuesday 23.02.14
2023-02-14 00:00:00 The Technical filter function will not be executed if this last working day was a holiday
2023-02-15 00:00:00 23.02.14 23:50 TechnicalFilterFunction()
2023-02-15 00:00:00 Last hourly slice end time: 23.02.14 16:00:00
2023-02-15 00:00:00 TSLA T:23.02.14 15:00:00 C:194.64
2023-02-15 00:00:00 SPY T:23.02.14 15:00:00 C:412.83
2023-02-15 00:00:00 MSFT T:23.02.14 15:00:00 C:271.32
2023-02-15 00:00:00 QQQ T:23.02.14 15:00:00 C:304.50
2023-02-15 00:00:00 NVDA T:23.02.14 15:00:00 C:217.88
2023-02-15 00:00:00 AAPL T:23.02.14 15:00:00 C:153.85
2023-02-15 00:00:00 META T:23.02.14 15:00:00 C:179.43
2023-02-15 00:00:00 AMZN T:23.02.14 15:00:00 C:99.54
2023-02-15 00:00:00 GOOGL T:23.02.14 15:00:00 C:94.61
2023-02-15 00:00:00 GOOG T:23.02.14 15:00:00 C:95.00
Louis Szeto
Hi Ana
Data is not available at realtime for backtesting, usually with 24-48 hours delay, live-trading however will not have this limit. Refer to this doc for reference.
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.
Ana Maria Mueller
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!